Make WordPress Core


Ignore:
Timestamp:
12/14/2018 03:35:55 AM (6 years ago)
Author:
desrosj
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.

Props pento.

Merges [43812] to trunk.

See #45065.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/wp-includes/default-filters.php

    r44118 r44157  
    508508add_action( 'wp_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
    509509add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 );
     510add_action( 'wp_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
     511add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' );
     512add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
     513add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' );
    510514add_action( 'admin_print_scripts-index.php', 'wp_localize_community_events' );
    511515add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );
Note: See TracChangeset for help on using the changeset viewer.