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 |
|---|---|
| 1437 | } |
| 1438 | |
| 1439 | // `apply_block_hooks_to_content` is called above. Ensure it is not called again as a filter. |
| 1440 | $priority = has_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object' ); |
| 1441 | if ( false !== $priority ) { |
| 1442 | remove_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority ); |
| 1443 | } |
| 1444 | |
| 1445 | /** This filter is documented in wp-includes/post-template.php */ |
| 1446 | $response->data['content']['rendered'] = apply_filters( |
| 1447 | 'the_content', |
| 1448 | $response->data['content']['raw'] |
| 1449 | ); |
| 1450 | |
| 1451 | // Restore the filter if it was set initially. |
| 1452 | if ( false !== $priority ) { |
| 1453 | add_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority ); |
| 1454 | } |
| 1455 | |