render_block_{$this->name}

FILTER wp-includes\class-wp-block.php (ligne 666) github
Filters the content of a single block. The dynamic portion of the hook name, `$name`, refers to the block name, e.g. "core/paragraph".

Paramètres

Entrée :
$block_content, $this->parsed_block, $this
Sortie :
@param string   $block_content The block content.
@param array    $block         The full block, including name and attributes.
@param WP_Block $instance      The block instance.

Utilisation

// Modifier la valeur avec le filtre 'render_block_{$this->name}'
add_filter('render_block_{$this->name}', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($block_content) {
    // Modifier la valeur
    return $block_content;
}

Actualités

Chargement des actualités...