Changeset 1988517
- Timestamp:
- 12/08/2018 12:44:21 AM (6 years ago)
- Location:
- syntaxhighlighter/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
syntaxhighlighter/trunk/readme.txt
r1987121 r1988517 2 2 Contributors: Viper007Bond, automattic 3 3 Donate link: http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/donate/ 4 Tags: code, sourcecode, php, xhtml, html, css, WordPress.com4 Tags: code, sourcecode, php, xhtml, html, css, WordPress.com 5 5 Requires at least: 4.2.3 6 6 Tested up to: 5.0 … … 11 11 == Description == 12 12 13 14 13 15 SyntaxHighlighter Evolved allows you to easily post syntax-highlighted code to your site without losing its formatting or making any manual changes. It uses the [SyntaxHighlighter JavaScript package by Alex Gorbatchev](http://alexgorbatchev.com/wiki/SyntaxHighlighter). 14 16 … … 35 37 36 38 == ChangeLog == 39 40 41 42 37 43 38 44 = Version 3.4.0 = -
syntaxhighlighter/trunk/syntaxhighlighter.php
r1987121 r1988517 5 5 Plugin Name: SyntaxHighlighter Evolved 6 6 Plugin URI: http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/ 7 Version: 3.4. 07 Version: 3.4. 8 8 Description: Easily post syntax-highlighted code to your site without having to modify the code at all. Uses Alex Gorbatchev's <a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">SyntaxHighlighter</a>. <strong>TIP:</strong> Don't use the Visual editor if you don't want your code mangled. TinyMCE will "clean up" your HTML. 9 9 Author: Alex Mills (Viper007Bond) … … 22 22 class SyntaxHighlighter { 23 23 // All of these variables are private. Filters are provided for things that can be modified. 24 var $pluginver = '3.4. 0'; // Plugin version24 var $pluginver = '3.4.'; // Plugin version 25 25 var $agshver = false; // Alex Gorbatchev's SyntaxHighlighter version (dynamically set below due to v2 vs v3) 26 26 var $shfolder = false; // Controls what subfolder to load SyntaxHighlighter from (v2 or v3) … … 74 74 75 75 // Editor Blocks 76 if ( function_exists( 'parse_blocks' ) ) { 76 if ( 77 function_exists( 'parse_blocks' ) // WordPress 5.0+ 78 || function_exists( 'the_gutenberg_project' ) // Gutenberg plugin for older WordPress 79 ) { 77 80 add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_block_editor_assets' ) ); 78 81 add_action( 'the_content', array( $this, 'enable_brushes_used_in_blocks' ), 0 ); … … 318 321 ); 319 322 320 wp_set_script_translations( 'syntaxhighlighter-blocks', 'syntaxhighlighter' ); 323 // WordPress 5.0+ only, no Gutenberg plugin support 324 if ( function_exists( 'wp_set_script_translations' ) ) { 325 wp_set_script_translations( 'syntaxhighlighter-blocks', 'syntaxhighlighter' ); 326 } 321 327 322 328 natsort( $this->brush_names ); … … 354 360 } 355 361 356 $blocks = parse_blocks( $content ); 362 if ( function_exists( 'parse_blocks' ) ) { // WP 5.0+ 363 $blocks = parse_blocks( $content ); 364 } elseif ( Function_exists( 'gutenberg_parse_blocks' ) ) { // Gutenberg plugin 365 $blocks = gutenberg_parse_blocks( $content ); 366 } else { 367 return $content; 368 } 357 369 358 370 foreach ( $blocks as $block ) {
Note: See TracChangeset
for help on using the changeset viewer.