Changeset 3128891
- Timestamp:
- 07/31/2024 03:17:38 PM (20 months ago)
- Location:
- urvanov-syntax-highlighter/trunk
- Files:
-
- 3 edited
-
class-urvanov-syntax-highlighter-langs.php (modified) (1 diff)
-
class-urvanov-syntax-highlighter-plugin.php (modified) (5 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
urvanov-syntax-highlighter/trunk/class-urvanov-syntax-highlighter-langs.php
r2199554 r3128891 84 84 public function detect($path, $fallback_id = NULL) { 85 85 $this->load(); 86 extract(pathinfo($path)); 86 if ( '' != $path) { 87 extract(pathinfo($path)); 88 } 87 89 88 90 // If fallback id if given -
urvanov-syntax-highlighter/trunk/class-urvanov-syntax-highlighter-plugin.php
r3061820 r3128891 4 4 Plugin URI: https://github.com/urvanov-ru/crayon-syntax-highlighter 5 5 Description: Supports multiple languages, themes, highlighting from a URL, local file or post text. 6 Version: 2.8.3 66 Version: 2.8.37 7 7 Author: Fedor Urvanov, Aram Kocharyan 8 8 Author URI: https://urvanov.ru … … 35 35 36 36 Urvanov_Syntax_Highlighter_Global::set_info(array( 37 'Version' => '2.8.3 6',38 'Date' => '31th March2024',37 'Version' => '2.8.37', 38 'Date' => '31th August 2024', 39 39 'AuthorName' => 'Fedor Urvanov & Aram Kocharyan', 40 40 'PluginURI' => 'https://github.com/urvanov-ru/crayon-syntax-highlighter', … … 741 741 742 742 public static function pre_comment_text($text, $comment, $args ) { 743 // according to 744 // https://developer.wordpress.org/reference/hooks/comment_text/ 745 // this filter calls in different places. 746 // 747 // https://github.com/WordPress/WordPress/blob/01876b090612c0d2825a896a7ba0e7fd6dd6decc/wp-includes/comment.php#L48 748 // calls it with $comment === null 749 // 750 // https://github.com/WordPress/WordPress/blob/bb26471543b104e047f9f4b264810adc372cd6ce/wp-includes/comment-template.php#L1094 751 // calls it with the object $comment = get_comment( $comment_id ); as $comment 752 if ($comment === null) { 753 return $text; 754 } 755 // We process only call with filled $comment 743 756 $comment_id = strval($comment->comment_ID); 744 757 if (array_key_exists($comment_id, self::$comment_captures)) { … … 749 762 } 750 763 751 public static function comment_text($text) { 752 global $comment; 764 public static function comment_text($text, $comment, $args ) { 765 // according to 766 // https://developer.wordpress.org/reference/hooks/comment_text/ 767 // this filter calls in different places. 768 // 769 // https://github.com/WordPress/WordPress/blob/01876b090612c0d2825a896a7ba0e7fd6dd6decc/wp-includes/comment.php#L48 770 // calls it with $comment === null 771 // 772 // https://github.com/WordPress/WordPress/blob/bb26471543b104e047f9f4b264810adc372cd6ce/wp-includes/comment-template.php#L1094 773 // calls it with the object $comment = get_comment( $comment_id ); as $comment 774 if ($comment === null) { 775 return $text; 776 } 777 // We process only call with filled $comment 753 778 $comment_id = strval($comment->comment_ID); 754 779 // Find if this post has Crayons … … 1346 1371 Prevents Crayon from being formatted by the filters, and also keeps original comment formatting. */ 1347 1372 add_filter('comment_text', 'Urvanov_Syntax_Highlighter_Plugin::pre_comment_text', 1, 3); 1348 add_filter('comment_text', 'Urvanov_Syntax_Highlighter_Plugin::comment_text', 100 );1373 add_filter('comment_text', 'Urvanov_Syntax_Highlighter_Plugin::comment_text', 100, 3); 1349 1374 } 1350 1375 -
urvanov-syntax-highlighter/trunk/readme.txt
r3061820 r3128891 4 4 License: GPLv3 or later 5 5 Tags: syntax highlighter, syntax, highlighter, highlighting, crayon, code highlighter, bbpress 6 Requires at least: 6. 37 Tested up to: 6. 4.36 Requires at least: 6.6 7 Tested up to: 6.6.1 8 8 Stable tag: 2.8.36 9 9 … … 334 334 == Changelog == 335 335 336 = 2.8.???????????????????????????????? = 337 * FIXED 338 * Warning message. PHP Deprecated: pathinfo(): Passing null to parameter #1 (https://wordpress.org/support/topic/passing-null-to-string-warning/) 339 * Warning message. Trying to get property 'comment_ID' of non-object (https://wordpress.org/support/topic/comment_id-error/). 340 336 341 = 2.8.36 = 337 342 * FIXED … … 343 348 * Warnings about global comment variable in comment highlighting. 344 349 * Minified min.js files. 350 345 351 = 2.8.34 = 346 352 * ADDED
Note: See TracChangeset
for help on using the changeset viewer.