Make WordPress Core


Ignore:
Timestamp:
10/24/2018 12:35:51 AM (7 years ago)
Author:
pento
Message:

Styles: Add helper functions for loading block styles.

Blocks are able to register styles that used in the editor and the frontend, or only in the editor. These functions ensure the correct styles are loaded in the correct place.

See #45065.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/default-filters.php

    r43807 r43812  
    496496add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
    497497add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
     498add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
     499add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
     500add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
     501add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
    498502add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
    499503add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
Note: See TracChangeset for help on using the changeset viewer.