Skip to content

Commit

Permalink
Merge pull request #40 from KevinBatdorf/fix-header-type-bug
Browse files Browse the repository at this point in the history
Release 1.5.1
  • Loading branch information
KevinBatdorf committed Sep 5, 2022
2 parents 4c0ec84 + 1293700 commit dc7ef00
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code-block-pro.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Code highlighting powered by the VS Code engine
* Requires at least: 6.0
* Requires PHP: 7.0
* Version: 1.5.0
* Version: 1.5.1
* Author: Kevin Batdorf
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: kbat82
Tags: block, code, syntax, highlighting, snippet
Tested up to: 6.0
Stable tag: 1.5.0
Stable tag: 1.5.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -217,6 +217,9 @@ Look under the "Styling" tab and turn on "Clamp Values", which will compute the

== Changelog ==

= 1.5.1 - 2022-09-05 =
- Fix: Fixes a bug where the header type set to none doesn't persist

= 1.5.0 - 2022-09-05 =
- Feature: Add toggle so users can clamp font sizes to reasonable values.
- Show font styling in theme select sidebar
Expand Down
2 changes: 1 addition & 1 deletion src/editor/components/HeaderSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type HeaderSelectProps = {
export const HeaderSelect = ({ attributes, onClick }: HeaderSelectProps) => {
const { headerType, bgColor } = attributes;
const types = {
'': __('None', 'code-block-pro'),
none: __('None', 'code-block-pro'),
headlights: __('Headlights', 'code-block-pro'),
};
return (
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const useDefaults = ({
previousLineHeight,
previousHeaderType,
} = useThemeStore();

useEffect(() => {
if (copyButton || !previousSettings.copyButton) return;
setAttributes({ copyButton: previousSettings.copyButton });
Expand Down

0 comments on commit dc7ef00

Please sign in to comment.