| 901 | * @param mixed|WP_Screen $screen Optional. The screen on which to show the box (like a post |
| 902 | * type, 'link', or 'comment'). Default is the current screen. |
| 903 | * @param string $context Optional. The context within the screen where the boxes |
| 904 | * should display. Available contexts vary from screen to |
| 905 | * screen. Post edit screen contexts include 'normal', 'side', |
| 906 | * and 'advanced'. Comments screen contexts include 'normal' |
| 907 | * and 'side'. Menus meta boxes (accordion sections) all use |
| 908 | * the 'side' context. Global default is 'advanced'. |
| 909 | * @param string $priority Optional. The priority within the context where the boxes |
| 910 | * should show ('high', 'low'). Default 'default'. |
| 911 | * @param array $callback_args Optional. Data that should be set as the $args property |
| 912 | * of the box array (which is the second parameter passed |
| 913 | * to your callback). Default null. |
| 914 | */ |
| 915 | function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advanced', $priority = 'default', $callback_args = null ) { |
| 916 | if ( is_array( $screen ) ) { |
| 917 | foreach ( $screen as $screen_single ) { |
| 918 | add_meta_box_single( $id, $title, $callback, $screen_single, $context, $priority, $callback_args ); |
| 919 | } |
| 920 | } else { |
| 921 | add_meta_box_single( $id, $title, $callback, $screen, $context, $priority, $callback_args ); |
| 922 | } |
| 923 | } |
| 924 | /** |
| 925 | * Add a meta box to an edit form. |
| 926 | * |
| 927 | * @since 2.5.0 |
| 928 | * |
| 929 | * @param string $id String for use in the 'id' attribute of tags. |
| 930 | * @param string $title Title of the meta box. |
| 931 | * @param callback $callback Function that fills the box with the desired content. |
| 932 | * The function should echo its output. |