Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Commit 831736d

Browse files
committed
Bump to v3.1.0
1 parent 9f12f72 commit 831736d

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

index.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Code Syntax Block
44
* Plugin URI: https://github.com/mkaz/code-syntax-block
55
* Description: A plugin to extend Gutenberg code block with syntax highlighting
6-
* Version: 3.0.0
6+
* Version: 3.1.0
77
* Author: Marcus Kazmierczak
88
* Author URI: https://mkaz.blog/
99
* License: GPL2
@@ -14,7 +14,7 @@
1414
*/
1515

1616
// version added, used in URL
17-
const MKAZ_CODE_SYNTAX_BLOCK_VERSION = '3.0.0';
17+
const MKAZ_CODE_SYNTAX_BLOCK_VERSION = '3.1.0';
1818
const MKAZ_CODE_SYNTAX_DEFAULT_SCHEME = 'prism-a11y-dark';
1919
const MKAZ_CODE_SYNTAX_COLOR_SCHEMES = array(
2020
'prism-a11y-dark' => 'A11y Dark',
@@ -53,7 +53,6 @@
5353
filemtime( plugin_dir_path( __FILE__ ) . $editor_style_path )
5454
);
5555

56-
5756
$default_lang = get_option( 'mkaz-code-syntax-default-lang', '' );
5857
wp_add_inline_script(
5958
'mkaz-code-syntax',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mkaz-code-syntax-block",
3-
"version": "3.0.0",
3+
"version": "3.1.0",
44
"license": "GPL-2.0-or-later",
55
"repository": {
66
"type": "git",

readme.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ On the front-end when the post is being viewed, the code will be color syntax hi
2323

2424
### Colors
2525

26-
The default color theme is based off [One Dark](https://github.com/AGMStudio/prism-theme-one-dark). If you want to change the colors, you can download a new theme from the [Prism themes repo](https://github.com/PrismJS/prism-themes) or create your own.
26+
The default color theme is [A11y Dark](https://github.com/PrismJS/prism-themes/blob/master/themes/prism-a11y-dark.css) optimized for accessibility. If you want to change the colorscheme, you can select from the plugin settings page a few different themes shipped with the plugin. You can also use a theme from the [Prism themes repo](https://github.com/PrismJS/prism-themes) or create your own.
2727

2828
The color theme is a single CSS file, there are a couple ways to customize:
2929

@@ -81,13 +81,8 @@ add_filter( 'mkaz_code_syntax_language_list', function() {
8181
} );
8282
```
8383

84-
You can also **set a default language** using the filter `mkaz_code_syntax_default_lang`, by default no default is set requiring you to select the language. By setting a default language when inserting a code block the language will already be set, you can still change if you wish to show code not using the default language.
84+
You can also **set a default language** on the plugin settings page. If you set a default language when inserting a code block the language will be selected by default, you can still change if you wish to show code not using the default language. For the default language value, use an alias from the [supported languages list](https://prismjs.com/#supported-languages).
8585

86-
By adding the following to your theme's function.php would set JavaScript as the default:
87-
88-
```php
89-
add_filter( 'mkaz_code_syntax_default_lang', function() { return 'javascript'; });
90-
```
9186

9287
### Conditional Loading
9388

readme.txt

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Contributors: mkaz, westonruter, memuller, jazanne, jeherve, eclev91
33
Donate link: https://www.paypal.me/marcuskazmierczak
44
Tags: code, code syntax, syntax highlight, code highlighting
55
Requires at least: 5.6
6-
Tested up to: 5.9
6+
Tested up to: 6.0
77
Requires PHP: 5.6
8-
Stable tag: 3.0.0
8+
Stable tag: 3.1.0
99
License: GPLv2 or later
1010
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -36,7 +36,7 @@ The Code Syntax Block plugin uses the Prism autoloader plugin to support all of
3636

3737
= How to customize the color scheme? =
3838

39-
The default color theme is [A11y Dark](https://github.com/PrismJS/prism-themes/blob/master/themes/prism-a11y-dark.css) optimized for accessibility. If you want to change the colorscheme, you can select in the editor from a few different themes shipped with the plugin. You can also use a theme from the [Prism themes repo](https://github.com/PrismJS/prism-themes) or create your own.
39+
The default color theme is [A11y Dark](https://github.com/PrismJS/prism-themes/blob/master/themes/prism-a11y-dark.css) optimized for accessibility. If you want to change the colorscheme, you can select from the plugin settings page a few different themes shipped with the plugin. You can also use a theme from the [Prism themes repo](https://github.com/PrismJS/prism-themes) or create your own.
4040

4141
The color theme is a single CSS file, there are a couple ways to customize:
4242

@@ -86,11 +86,7 @@ Here is an example shortening the list to a smaller set:
8686

8787
= Can I set a default language so I don't have to select each time? =
8888

89-
Yes, use the filter `mkaz_code_syntax_default_lang` to set a default language when inserting a code block. You can still change if you wish to show code not using the default language.
90-
91-
This example would set JavaScript as the default:
92-
93-
add_filter( 'mkaz_code_syntax_default_lang', function() { return 'javascript'; });
89+
Yes, on the plugin settings page in the dashboard you can set a default language when inserting a code block. You can still change if you wish to show code not using the default language.
9490

9591
= Can I override the conditional loading, so assets always load? =
9692

@@ -108,6 +104,13 @@ Example:
108104

109105
== Changelog ==
110106

107+
= 3.1.0
108+
109+
- Add plugin settings page
110+
- Move global scheme setting to settings
111+
- Move default language to settings
112+
- Ugrade Prism to v1.28.0
113+
111114
= 3.0.0
112115

113116
- Remove support pre WP 5.6

0 commit comments

Comments
 (0)