add_meta_boxes_{$post_type} WordPress Action Hook

The add_meta_boxes_{$post_type} hook allows you to add custom meta boxes to any post type on your WordPress site. This is a great way to add extra data to your posts, or to display data from other sources.

do_action( "add_meta_boxes_{$post_type}", WP_Post $post ) #

Fires after all built-in meta boxes have been added, contextually for the given post type.


Description

The dynamic portion of the hook name, $post_type, refers to the post type of the post.

Possible hook names include:

  • add_meta_boxes_post
  • add_meta_boxes_page
  • add_meta_boxes_attachment

Top ↑

Parameters

$post

(WP_Post)Post object.


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.