mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Editor: Rename _should_load_block_editor_scripts_and_styles to wp_should_load_block_editor_scripts_and_styles
Follow-up to [49080]. Props zieladam, frank-klein. See #51330. git-svn-id: https://develop.svn.wordpress.org/trunk@49093 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2170,7 +2170,7 @@ function script_concat_settings() {
|
||||
* @global WP_Screen $current_screen WordPress current screen object.
|
||||
*/
|
||||
function wp_common_block_scripts_and_styles() {
|
||||
if ( is_admin() && ! _should_load_block_editor_scripts_and_styles() ) {
|
||||
if ( is_admin() && ! wp_should_load_block_editor_scripts_and_styles() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2198,11 +2198,10 @@ function wp_common_block_scripts_and_styles() {
|
||||
* should be enqueued on the current screen.
|
||||
*
|
||||
* @since 5.6.0
|
||||
* @access private
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function _should_load_block_editor_scripts_and_styles() {
|
||||
function wp_should_load_block_editor_scripts_and_styles() {
|
||||
global $current_screen;
|
||||
|
||||
$is_block_editor_screen = ( $current_screen instanceof WP_Screen ) && $current_screen->is_block_editor();
|
||||
@@ -2229,7 +2228,7 @@ function _should_load_block_editor_scripts_and_styles() {
|
||||
function wp_enqueue_registered_block_scripts_and_styles() {
|
||||
global $current_screen;
|
||||
|
||||
$load_editor_scripts = _should_load_block_editor_scripts_and_styles();
|
||||
$load_editor_scripts = wp_should_load_block_editor_scripts_and_styles();
|
||||
|
||||
$block_registry = WP_Block_Type_Registry::get_instance();
|
||||
foreach ( $block_registry->get_all_registered() as $block_name => $block_type ) {
|
||||
|
||||
Reference in New Issue
Block a user