allowed_block_types_all

FILTER wp-includes\block-editor.php (ligne 127) github
Filters the allowed block types for all editor types.

Paramètres

Entrée :
$allowed_block_types, $block_editor_context
Sortie :
@param bool|string[]           $allowed_block_types  Array of block type slugs, or boolean to enable/disable all.
@param WP_Block_Editor_Context $block_editor_context The current block editor context.

Utilisation

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

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

Actualités

Chargement des actualités...