| @@ -1,12 +1,14 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Plugin Name: Code Block Pro |
| 4 | 4 | * Description: Code highlighting powered by the VS Code engine |
| 5 | + * Plugin URI: https://code-block-pro.com/?utm_campaign=plugin&utm_source=plugin-uri | |
| 6 | + * Author: Kevin Batdorf | |
| 7 | + * Author URI: https://code-block-pro.com/?utm_campaign=plugin&utm_source=author-uri | |
| 5 | 8 | * Requires at least: 6.0 |
| 6 | 9 | * Requires PHP: 7.0 |
| 7 | - * Version: 1.1.0 | |
| 8 | - * Author: Kevin Batdorf | |
| 10 | + * Version: 1.13.0 | |
| 9 | 11 | * License: GPL-2.0-or-later |
| 10 | 12 | * License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 11 | 13 | * Text Domain: code-block-pro |
| 12 | 14 | * |
| @@ -15,10 +17,17 @@ | ||
| 15 | 17 | |
| 16 | 18 | add_action('init', function () { |
| 17 | 19 | register_block_type(__DIR__ . '/build'); |
| 18 | 20 | wp_set_script_translations('kevinbatdorf/code-block-pro', 'code-block-pro'); |
| 21 | + wp_add_inline_script('kevinbatdorf-code-block-pro-view-script', 'window.codeBlockPro = ' . wp_json_encode([ | |
| 22 | + 'pluginUrl' => esc_url_raw(plugin_dir_url(__FILE__)), | |
| 23 | + ]) . ';'); | |
| 19 | 24 | }); |
| 25 | + | |
| 20 | 26 | add_action('admin_init', function () { |
| 21 | 27 | wp_add_inline_script('kevinbatdorf-code-block-pro-editor-script', 'window.codeBlockPro = ' . wp_json_encode([ |
| 22 | 28 | 'pluginUrl' => esc_url_raw(plugin_dir_url(__FILE__)), |
| 23 | 29 | ]) . ';'); |
| 24 | 30 | }); |
| 31 | + | |
| 32 | +include_once(__DIR__ . '/php/compatibility.php'); | |
| 33 | +include_once(__DIR__ . '/php/settings.php'); | |