Editor: Consolidate enqueueing block editor assets in `wp-includes/default-filters.php`.
Follow-up to [44157], [46111], [48537], [50620]. See #52920. Built from https://develop.svn.wordpress.org/trunk@50629 git-svn-id: http://core.svn.wordpress.org/trunk@50241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
07b7afd60a
commit
3697386083
|
@ -534,19 +534,19 @@ add_action( 'wp_default_scripts', 'wp_default_scripts' );
|
||||||
add_action( 'wp_default_scripts', 'wp_default_packages' );
|
add_action( 'wp_default_scripts', 'wp_default_packages' );
|
||||||
|
|
||||||
add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
|
add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
|
||||||
add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
|
|
||||||
add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
|
add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
|
||||||
|
add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
|
||||||
add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
|
add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
|
||||||
add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
|
add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
|
||||||
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' );
|
add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 );
|
||||||
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
|
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
|
||||||
|
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' );
|
||||||
|
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
|
||||||
|
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' );
|
||||||
add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
|
add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
|
||||||
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
|
add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
|
||||||
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
|
add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );
|
||||||
add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 );
|
add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 );
|
||||||
add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 );
|
|
||||||
add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' );
|
|
||||||
add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' );
|
|
||||||
|
|
||||||
add_action( 'wp_default_styles', 'wp_default_styles' );
|
add_action( 'wp_default_styles', 'wp_default_styles' );
|
||||||
add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
|
add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 );
|
||||||
|
|
|
@ -2323,16 +2323,6 @@ function enqueue_editor_block_styles_assets() {
|
||||||
wp_enqueue_script( 'wp-block-styles' );
|
wp_enqueue_script( 'wp-block-styles' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Enqueues the assets required for the format library within the block editor.
|
|
||||||
*
|
|
||||||
* @since 5.8.0
|
|
||||||
*/
|
|
||||||
function wp_enqueue_editor_format_library_assets() {
|
|
||||||
wp_enqueue_script( 'wp-format-library' );
|
|
||||||
wp_enqueue_style( 'wp-format-library' );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enqueues the assets required for the block directory within the block editor.
|
* Enqueues the assets required for the block directory within the block editor.
|
||||||
*
|
*
|
||||||
|
@ -2343,6 +2333,16 @@ function wp_enqueue_editor_block_directory_assets() {
|
||||||
wp_enqueue_style( 'wp-block-directory' );
|
wp_enqueue_style( 'wp-block-directory' );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enqueues the assets required for the format library within the block editor.
|
||||||
|
*
|
||||||
|
* @since 5.8.0
|
||||||
|
*/
|
||||||
|
function wp_enqueue_editor_format_library_assets() {
|
||||||
|
wp_enqueue_script( 'wp-format-library' );
|
||||||
|
wp_enqueue_style( 'wp-format-library' );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sanitizes an attributes array into an attributes string to be placed inside a `<script>` tag.
|
* Sanitizes an attributes array into an attributes string to be placed inside a `<script>` tag.
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.8-alpha-50628';
|
$wp_version = '5.8-alpha-50629';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue