use_block_editor_for_post

FUNCTION wp-includes\post.php (ligne 8545) github
Returns whether the post can be edited in the block editor.

Paramètres

Entrée :
$post
Sortie :
@param int|WP_Post $post Post ID or WP_Post object.
@return bool Whether the post can be edited in the block editor.

Utilisation

// Utilisation de la fonction use_block_editor_for_post
$result = use_block_editor_for_post($post);

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...