render_block_core_template_part_file

ACTION wp-includes\blocks\template-part.php (ligne 98) github
Fires when a block template part is loaded from a template part in the theme.

Paramètres

Entrée :
$template_part_id, $attributes, $template_part_file_path, $content
Sortie :
@param string $template_part_id        The requested template part namespaced to the theme.
@param array  $attributes              The block attributes.
@param string $template_part_file_path Absolute path to the template path.
@param string $content                 The template part content.

Utilisation

// Ajouter une fonction au hook action 'render_block_core_template_part_file'
add_action('render_block_core_template_part_file', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($template_part_id, $attributes, $template_part_file_path, $content) {
    // Votre code ici
    error_log('Hook render_block_core_template_part_file déclenché');
}

Actualités

Chargement des actualités...