Switch language
wpseek on Twitter

A WordPress-centric search engine for devs and theme authors

add_meta_box [ ]

add_meta_box ( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null )
  • (string) $id String for use in the 'id' attribute of tags.
  • (string) $title Title of the meta box.
  • (callback) $callback Function that fills the box with the desired content. The function should echo its output.
  • (string|WP_Screen) $screen Optional. The screen on which to show the box (like a post type, 'link', or 'comment'). Default is the current screen.
  • (string) $context Optional. The context within the screen where the boxes should display. Available contexts vary from screen to screen. Post edit screen contexts include 'normal', 'side', and 'advanced'. Comments screen contexts include 'normal' and 'side'. Menus meta boxes (accordion sections) all use the 'side' context. Global default is 'advanced'.
  • (string) $priority Optional. The priority within the context where the boxes should show ('high', 'low'). Default 'default'.
  • (array) $callback_args Optional. Data that should be set as the $args property of the box array (which is the second parameter passed to your callback). Default null.
Defined at:

Add a meta box to an edit form.



Top Google Search Results

More ...

User Note(s)