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 |
|---|---|
| 1475 | } |
| 1476 | |
| 1477 | // `apply_block_hooks_to_content` is called above. Ensure it is not called again as a filter. |
| 1478 | $priority = has_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object' ); |
| 1479 | if ( false !== $priority ) { |
| 1480 | remove_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority ); |
| 1481 | } |
| 1482 | |
| 1483 | /** This filter is documented in wp-includes/post-template.php */ |
| 1484 | $response->data['content']['rendered'] = apply_filters( |
| 1485 | 'the_content', |
| 1486 | $response->data['content']['raw'] |
| 1487 | ); |
| 1488 | |
| 1489 | // Restore the filter if it was set initially. |
| 1490 | if ( false !== $priority ) { |
| 1491 | add_filter( 'the_content', 'apply_block_hooks_to_content_from_post_object', $priority ); |
| 1492 | } |
| 1493 | |