Make WordPress Core

Ticket #26698: 26698.2.diff

File 26698.2.diff, 2.7 KB (added by DrewAPicture, 13 years ago)

Example contexts

  • src/wp-admin/includes/template.php

     
    802802 *
    803803 * @since 2.5.0
    804804 *
    805  * @param string $id String for use in the 'id' attribute of tags.
    806  * @param string $title Title of the meta box.
    807  * @param string $callback Function that fills the box with the desired content. The function should echo its output.
    808  * @param string|object $screen Optional. The screen on which to show the box (post, page, link). Defaults to current screen.
    809  * @param string $context Optional. The context within the page where the boxes should show ('normal', 'advanced').
    810  * @param string $priority Optional. The priority within the context where the boxes should show ('high', 'low').
    811  * @param 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).
     805 * @param string           $id            String for use in the 'id' attribute of tags.
     806 * @param string           $title         Title of the meta box.
     807 * @param callback         $callback      Function that fills the box with the desired content.
     808 *                                        The function should echo its output.
     809 * @param string|WP_Screen $screen        Optional. The screen on which to show the box (post,
     810 *                                        page, link). Default is the current screen.
     811 * @param string           $context       Optional. The context within the screen where the boxes
     812 *                                        should display. Available contexts vary from screen to
     813 *                                        screen. Post edit screen contexts include 'normal', 'side',
     814 *                                        and 'advanced'. Comments screen contexts include 'normal'
     815 *                                        and 'side'. Menus meta boxes (accordion sections) all use
     816 *                                        the 'side' context. Global default is 'advanced'.
     817 * @param string           $priority      Optional. The priority within the context where the boxes
     818 *                                        should show ('high', 'low'). Default 'default'.
     819 * @param array            $callback_args Optional. Data that should be set as the $args property
     820 *                                        of the box array (which is the second parameter passed
     821 *                                        to your callback). Default null.
    812822 */
    813823function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null ) {
    814824        global $wp_meta_boxes;