Changeset 51393
- Timestamp:
- 07/09/2021 05:56:43 PM (3 years ago)
- Location:
- branches/5.8
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.8
-
branches/5.8/src/wp-includes/default-filters.php
r51347 r51393 567 567 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); 568 568 add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 ); 569 add_action( 'admin_head', 'wp_check_widget_editor_deps' ); 569 570 570 571 // Global styles can be enqueued in both the header and the footer. See https://core.trac.wordpress.org/ticket/53494. -
branches/5.8/src/wp-includes/widgets.php
r51219 r51393 2007 2007 return ob_get_clean(); 2008 2008 } 2009 2010 /** 2011 * The 'wp-editor' script module is exposed as window.wp.editor. This overrides 2012 * the legacy TinyMCE editor module which is required by the widgets editor. 2013 * Because of that conflict, these two shouldn't be enqueued together. See 2014 * https://core.trac.wordpress.org/ticket/53569. 2015 * 2016 * There is also another conflict related to styles where the block widgets 2017 * editor is hidden if a block enqueues 'wp-edit-post' stylesheet. See 2018 * https://core.trac.wordpress.org/ticket/53569. 2019 * 2020 * @since 5.8.0 2021 * @access private 2022 */ 2023 function wp_check_widget_editor_deps() { 2024 global $wp_scripts, $wp_styles; 2025 if ( 2026 $wp_scripts->query( 'wp-edit-widgets', 'enqueued' ) || 2027 $wp_scripts->query( 'wp-customize-widgets', 'enqueued' ) 2028 ) { 2029 if ( $wp_scripts->query( 'wp-editor', 'enqueued' ) ) { 2030 _doing_it_wrong( 2031 'enqueue_script', 2032 '"wp-editor" script should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).', 2033 '5.8.0' 2034 ); 2035 } 2036 if ( $wp_styles->query( 'wp-edit-post', 'enqueued' ) ) { 2037 _doing_it_wrong( 2038 'enqueue_style', 2039 '"wp-edit-post" style should not be enqueued together with the new widgets editor (wp-edit-widgets or wp-customize-widgets).', 2040 '5.8.0' 2041 ); 2042 } 2043 } 2044 }
Note: See TracChangeset
for help on using the changeset viewer.