excerpt_allowed_blocks

FILTER wp-includes\blocks.php (ligne 2181) github
Filters the list of blocks that can contribute to the excerpt. If a dynamic block is added to this list, it must not generate another excerpt, as this will cause an infinite loop to occur.

Paramètres

Entrée :
$allowed_blocks
Sortie :
@param string[] $allowed_blocks The list of names of allowed blocks.

Utilisation

// Modifier la valeur avec le filtre 'excerpt_allowed_blocks'
add_filter('excerpt_allowed_blocks', 'ma_fonction_filtre', 10, 1);

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

Actualités

Chargement des actualités...