WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
Line | Code |
---|---|
336 | if ( current_theme_supports( 'wp-block-styles' ) ) { |
337 | wp_enqueue_style( 'wp-block-library-theme' ); |
338 | } |
339 |
|
340 | /* |
341 | * We don't want to load EDITOR scripts in the iframe, only enqueue |
342 | * front-end assets for the content. |
343 | */ |
344 | add_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' ); |
345 | do_action( 'enqueue_block_assets' ); |
346 | remove_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' ); |
347 |
|
348 | $block_registry = WP_Block_Type_Registry::get_instance(); |
349 |
|
350 | /* |
351 | * Additionally, do enqueue `editorStyle` assets for all blocks, which |
352 | * contains editor-only styling for blocks (editor content). |
353 | */ |
354 | foreach ( $block_registry->get_all_registered() as $block_type ) { |