Changeset 3201949
- Timestamp:
- 12/03/2024 09:01:52 PM (12 months ago)
- Location:
- classic-editor/trunk
- Files:
-
- 2 edited
-
classic-editor.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
classic-editor/trunk/classic-editor.php
r3195295 r3201949 6 6 * Plugin URI: https://wordpress.org/plugins/classic-editor/ 7 7 * Description: Enables the WordPress classic editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports the older plugins that extend this screen. 8 * Version: 1.6. 68 * Version: 1.6.7 9 9 * Author: WordPress Contributors 10 10 * Author URI: https://github.com/WordPress/classic-editor/ … … 70 70 add_action( 'admin_print_styles', array( __CLASS__, 'safari_18_temp_fix' ) ); 71 71 72 // Fix for the Categories postbox for WP 6.7.1.72 // Fix for the Categories postbox on the classic Edit Post screen for WP 6.7.1. 73 73 global $wp_version; 74 74 75 75 if ( '6.7.1' === $wp_version && is_admin() ) { 76 add_ action( 'wp_default_scripts', array( __CLASS__, 'replace_post_js' ), 11);76 add_filter( 'script_loader_src', array( __CLASS__, 'replace_post_js_2' ), 11, 2 ); 77 77 } 78 78 … … 1008 1008 } 1009 1009 1010 /** 1011 * Temporary fix for the Categories postbox on the classic Edit Post screen. 1012 * See: https://core.trac.wordpress.org/ticket/62504. 1013 */ 1010 // Back-compat with 1.6.6. 1014 1011 public static function replace_post_js( $scripts ) { 1015 $script = $scripts->query( 'post', 'registered' ); 1016 $suffix = wp_scripts_get_suffix(); 1017 1018 if ( $script ) { 1019 if ( '62504-20241121' === $script->ver ) { 1020 // The script src was replaced from another plugin. 1021 return; 1022 } 1023 1024 $script->src = plugins_url( 'scripts/', __FILE__ ) . "post{$suffix}.js"; 1025 $script->ver = '62504-20241121'; 1026 } else { 1027 $scripts->add( 1028 'post', 1029 plugins_url( 'scripts/', __FILE__ ) . "post{$suffix}.js", 1030 array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-sanitize', 'clipboard' ), 1031 '62504-20241121', 1032 1 1033 ); 1034 $scripts->set_translations( 'post' ); 1035 } 1012 _deprecated_function( __METHOD__, '1.6.7' ); 1013 } 1014 1015 /** 1016 * Fix for the Categories postbox on the classic Edit Post screen for WP 6.7.1. 1017 * See: https://core.trac.wordpress.org/ticket/62504 and 1018 * https://github.com/WordPress/classic-editor/issues/222. 1019 */ 1020 public static function replace_post_js_2( $src, $handle ) { 1021 if ( 'post' === $handle && is_string( $src ) && false === strpos( $src, 'ver=62504-20241121' ) ) { 1022 $suffix = wp_scripts_get_suffix(); 1023 $src = plugins_url( 'scripts/', __FILE__ ) . "post{$suffix}.js"; 1024 $src = add_query_arg( 'ver', '62504-20241121', $src ); 1025 } 1026 1027 return $src; 1036 1028 } 1037 1029 } -
classic-editor/trunk/readme.txt
r3195295 r3201949 1 1 === Classic Editor === 2 2 Contributors: wordpressdotorg, azaozz, melchoyce, chanthaboune, alexislloyd, pento, youknowriad, desrosj, luciano-croce, ironprogrammer 3 Tags: gutenberg, disable, disable gutenberg, editor, classic editor, block editor3 Tags: classic editor, block editor, editor, gutenberg 4 4 Requires at least: 4.9 5 5 Tested up to: 6.7 6 Stable tag: 1.6. 66 Stable tag: 1.6.7 7 7 Requires PHP: 5.2.4 8 8 License: GPLv2 or later … … 29 29 30 30 == Changelog == 31 32 = 1.6.7 = 33 * Fixed loading of script translations when post.js is replaced in WordPress 6.7.1. 31 34 32 35 = 1.6.6 =
Note: See TracChangeset
for help on using the changeset viewer.