do_action( 'add_meta_boxes', string $post_type, WP_Post $post )

Fires after all built-in meta boxes have been added.

Parameters Parameters


(string) Post type.


(WP_Post) Post object.

Top ↑

Source Source

File: wp-admin/includes/meta-boxes.php

View on Trac

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

  1. Skip to note 1 content
    Contributed by Tom Carney

    Best practice is to use add_meta_boxes_{post-type} to create less unnecessary hooks for other post types.

    function adding_custom_meta_boxes( $post_type, $post ) {
            __( 'My Meta Box' ),
    add_action( 'add_meta_boxes', 'adding_custom_meta_boxes', 10, 2 );

You must log in before being able to contribute a note or feedback.