restrict_manage_posts

ACTION wp-admin\includes\class-wp-posts-list-table.php (ligne 593) github
Fires before the Filter button on the Posts and Pages list tables. The Filter button allows sorting by date and/or category on the Posts list table, and sorting by date on the Pages list table.

Paramètres

Entrée :
$this->screen->post_type, $which
Sortie :
@param string $post_type The post type slug.
@param string $which     The location of the extra table nav markup:

Utilisation

// Ajouter une fonction au hook action 'restrict_manage_posts'
add_action('restrict_manage_posts', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($this->screen->post_type, $which) {
    // Votre code ici
    error_log('Hook restrict_manage_posts déclenché');
}

Actualités

Chargement des actualités...