WordPress.org

Make WordPress Core

Ticket #17884: 17884.2.diff

File 17884.2.diff, 2.3 KB (added by scribu, 19 months ago)

refresh for WP 3.6-alpha

  • wp-admin/includes/template.php

    diff --git wp-admin/includes/template.php wp-admin/includes/template.php
    index 788a4bd..10455cd 100644
    function add_settings_section($id, $title, $callback, $page) { 
    10011001                $page = 'reading'; 
    10021002        } 
    10031003 
    1004         if ( !isset($wp_settings_sections) ) 
    1005                 $wp_settings_sections = array(); 
    1006         if ( !isset($wp_settings_sections[$page]) ) 
    1007                 $wp_settings_sections[$page] = array(); 
    1008         if ( !isset($wp_settings_sections[$page][$id]) ) 
    1009                 $wp_settings_sections[$page][$id] = array(); 
    1010  
    10111004        $wp_settings_sections[$page][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback); 
    10121005} 
    10131006 
    function add_settings_field($id, $title, $callback, $page, $section = 'default', 
    10461039                $page = 'reading'; 
    10471040        } 
    10481041 
    1049         if ( !isset($wp_settings_fields) ) 
    1050                 $wp_settings_fields = array(); 
    1051         if ( !isset($wp_settings_fields[$page]) ) 
    1052                 $wp_settings_fields[$page] = array(); 
    1053         if ( !isset($wp_settings_fields[$page][$section]) ) 
    1054                 $wp_settings_fields[$page][$section] = array(); 
    1055  
    10561042        $wp_settings_fields[$page][$section][$id] = array('id' => $id, 'title' => $title, 'callback' => $callback, 'args' => $args); 
    10571043} 
    10581044 
    function add_settings_field($id, $title, $callback, $page, $section = 'default', 
    10721058function do_settings_sections( $page ) { 
    10731059        global $wp_settings_sections, $wp_settings_fields; 
    10741060 
    1075         if ( ! isset( $wp_settings_sections ) || !isset( $wp_settings_sections[$page] ) ) 
     1061        if ( !isset( $wp_settings_sections[$page] ) ) 
    10761062                return; 
    10771063 
    10781064        foreach ( (array) $wp_settings_sections[$page] as $section ) { 
    function do_settings_sections( $page ) { 
    11071093function do_settings_fields($page, $section) { 
    11081094        global $wp_settings_fields; 
    11091095 
    1110         if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) ) 
     1096        if ( !isset($wp_settings_fields[$page][$section]) ) 
    11111097                return; 
    11121098 
    11131099        foreach ( (array) $wp_settings_fields[$page][$section] as $field ) { 
    function do_settings_fields($page, $section) { 
    11481134function add_settings_error( $setting, $code, $message, $type = 'error' ) { 
    11491135        global $wp_settings_errors; 
    11501136 
    1151         if ( !isset($wp_settings_errors) ) 
    1152                 $wp_settings_errors = array(); 
    1153  
    11541137        $new_error = array( 
    11551138                'setting' => $setting, 
    11561139                'code' => $code,