Make WordPress Core

Ticket #14541: 14541.diff

File 14541.diff, 1.2 KB (added by markjaquith, 12 years ago)

refresh

  • wp-admin/includes/template.php

    function do_meta_boxes( $screen, $context, $object ) {  
    10001000 * @param string $id String for use in the 'id' attribute of tags.
    10011001 * @param string|object $screen The screen on which to show the box (post, page, link).
    10021002 * @param string $context The context within the page where the boxes should show ('normal', 'advanced').
     1003 * @return boolean False on failure, true on success.
    10031004 */
    10041005function remove_meta_box($id, $screen, $context) {
    10051006        global $wp_meta_boxes;
    function remove_meta_box($id, $screen, $context) {  
    10181019        if ( !isset($wp_meta_boxes[$page][$context]) )
    10191020                $wp_meta_boxes[$page][$context] = array();
    10201021
    1021         foreach ( array('high', 'core', 'default', 'low') as $priority )
    1022                 $wp_meta_boxes[$page][$context][$priority][$id] = false;
     1022        foreach ( array('high', 'core', 'default', 'low') as $priority ) {
     1023                if ( isset($wp_meta_boxes[$page][$context][$priority][$id]) ) {
     1024                        $wp_meta_boxes[$page][$context][$priority][$id] = false;
     1025                        return true;
     1026                }
     1027        }
     1028
     1029        return false;
    10231030}
    10241031
    10251032/**