add_meta_boxes

ACTION woocommerce\src\Internal\Admin\Orders\Edit.php (ligne 170) github
From wp-admin/includes/meta-boxes.php. Fires after all built-in meta boxes have been added. Custom metaboxes may be enqueued here. Note that the documentation for this hook (and for the corresponding 'add_meta_boxes_<SCREEN_ID>' hook) suggest that a post type will be supplied for the first parameter, and and an instance of WP_Post will be supplied as the second parameter. We are not doing that here, however WordPress itself also deviates from this in respect of comments and (though now less relevant) links.

Paramètres

Entrée :
$this->screen_id, $this->order
Sortie :
N/A

Utilisation

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

function ma_fonction_personnalisee($this->screen_id, $this->order) {
    // Votre code ici
    error_log('Hook add_meta_boxes déclenché');
}

Actualités

Chargement des actualités...