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 |
---|---|
331 | if ( current_theme_supports( 'wp-block-styles' ) ) { |
332 | wp_enqueue_style( 'wp-block-library-theme' ); |
333 | } |
334 |
|
335 | /* |
336 | * We don't want to load EDITOR scripts in the iframe, only enqueue |
337 | * front-end assets for the content. |
338 | */ |
339 | add_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' ); |
340 | do_action( 'enqueue_block_assets' ); |
341 | remove_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' ); |
342 |
|
343 | $block_registry = WP_Block_Type_Registry::get_instance(); |
344 |
|
345 | /* |
346 | * Additionally, do enqueue `editorStyle` assets for all blocks, which |
347 | * contains editor-only styling for blocks (editor content). |
348 | */ |
349 | foreach ( $block_registry->get_all_registered() as $block_type ) { |