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:
Robert Anderson 2020-10-06 04:16:43 +00:00
parent 7d14c81be1
commit 03fe4eb692
2 changed files with 6 additions and 7 deletions

6
package-lock.json generated
View File

@ -5959,7 +5959,7 @@
},
"bl": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz",
"integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==",
"dev": true,
"optional": true,
@ -6150,7 +6150,7 @@
},
"browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
"integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
"dev": true,
"requires": {
@ -8799,7 +8799,7 @@
},
"duplexer": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
"integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
"dev": true
},

View File

@ -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 ) {