nav_menu_meta_box_object

FILTER wp-admin\includes\nav-menu.php (ligne 277) github
Filters whether a menu items meta box will be added for the current object type. If a falsey value is returned instead of an object, the menu items meta box for the current meta box object will not be added.

Paramètres

Entrée :
$post_type
Sortie :
@param WP_Post_Type|false $post_type The current object to add a menu items

Utilisation

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

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

Actualités

Chargement des actualités...