WordPress.org

Make WordPress Core

Ticket #18787: 18787.diff

File 18787.diff, 1.1 KB (added by mitchoyoshitaka, 7 years ago)
  • wp-admin/includes/template.php

     
    990990 * @param string $id String for use in the 'id' attribute of tags.
    991991 * @param string $page The type of edit page on which to show the box (post, page, link).
    992992 * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
     993 * @param array $priorities The priorities for which the meta box will be removed.
    993994 */
    994 function remove_meta_box($id, $page, $context) {
     995function remove_meta_box($id, $page, $context, $priorities = array('high', 'core', 'default', 'low')) {
    995996        global $wp_meta_boxes;
    996997
    997998        if ( !isset($wp_meta_boxes) )
     
    10011002        if ( !isset($wp_meta_boxes[$page][$context]) )
    10021003                $wp_meta_boxes[$page][$context] = array();
    10031004
    1004         foreach ( array('high', 'core', 'default', 'low') as $priority )
     1005        foreach ( $priorities as $priority )
    10051006                $wp_meta_boxes[$page][$context][$priority][$id] = false;
    10061007}
    10071008