diff --git wp-admin/includes/template.php wp-admin/includes/template.php
index eba7627..7db8095 100644
|
|
function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan |
870 | 870 | } |
871 | 871 | |
872 | 872 | /** |
873 | | * Meta-Box template function |
| 873 | * Meta-Box template function for multiple styles |
| 874 | * |
| 875 | * @param string|object $screen Screen identifier |
| 876 | * @param string $context box context |
| 877 | * @param mixed $object gets passed to the box callback function as first parameter |
| 878 | * @return int number of meta_boxes |
| 879 | */ |
| 880 | function do_meta_boxes( $screen, $context, $object ) { |
| 881 | |
| 882 | $style = apply_filters( 'meta_boxes_style', 'boxes', $screen, $context, $object ); |
| 883 | |
| 884 | switch ( $style ) { |
| 885 | |
| 886 | case 'boxes': |
| 887 | $i = render_meta_boxes( $screen, $context, $object ); |
| 888 | break; |
| 889 | |
| 890 | case 'accordion': |
| 891 | $i = do_accordion_sections( $screen, $context, $object ); |
| 892 | break; |
| 893 | |
| 894 | default: |
| 895 | $i = apply_filters( 'render_meta_boxes_' . $style, 0, $screen, $context, $object ); |
| 896 | |
| 897 | } |
| 898 | |
| 899 | return $i; |
| 900 | } |
| 901 | |
| 902 | /** |
| 903 | * Meta-Box template function for the standard style |
874 | 904 | * |
875 | 905 | * @since 2.5.0 |
876 | 906 | * |
… |
… |
function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan |
879 | 909 | * @param mixed $object gets passed to the box callback function as first parameter |
880 | 910 | * @return int number of meta_boxes |
881 | 911 | */ |
882 | | function do_meta_boxes( $screen, $context, $object ) { |
| 912 | function render_meta_boxes( $screen, $context, $object ) { |
883 | 913 | global $wp_meta_boxes; |
884 | 914 | static $already_sorted = false; |
885 | 915 | |
… |
… |
function do_meta_boxes( $screen, $context, $object ) { |
933 | 963 | echo "</div>"; |
934 | 964 | |
935 | 965 | return $i; |
936 | | |
937 | 966 | } |
938 | 967 | |
939 | 968 | /** |