Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: render_block_core_template_part_none

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
92                     /**
93                      * Fires when a requested block template part does not exist in the database nor in the theme.
94                      *
95                      * @since 5.9.0
96                      *
97                      * @param string $template_part_id        The requested template part namespaced to the theme.
98                      * @param array  $attributes              The block attributes.
99                      * @param string $template_part_file_path Absolute path to the not found template path.
100                      */
101                     do_action( 'render_block_core_template_part_none', $template_part_id, $attributes, $template_part_file_path );
102                }
103           }
104      }
105
106      if ( is_null( $content ) && is_user_logged_in() ) {
107           if ( ! isset( $attributes['slug'] ) ) {
108                // If there is no slug this is a placeholder and we dont want to return any message.
109                return;
110           }