Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: the_content

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1657      $parsed_blocks = parse_blocks( $response->data['content']['raw'] );
1658      $content       = block_core_navigation_insert_hooked_blocks( $parsed_blocks, $post );
1659
1660      // Remove mock Navigation block wrapper.
1661      $content = block_core_navigation_remove_serialized_parent_block( $content );
1662
1663      $response->data['content']['raw'] = $content;
1664
1665      /** This filter is documented in wp-includes/post-template.php */
1666      $response->data['content']['rendered'] = apply_filters( 'the_content', $content );
1667
1668      return $response;
1669 }
1670
1671 /*
1672  *  Before adding our filter, we verify if it's already added in Core.
1673  * However, during the build process, Gutenberg automatically prefixes our functions with "gutenberg_".
1674  * Therefore, we concatenate the Core's function name to circumvent this prefix for our check.
1675  */