Changeset 29206 for trunk/src/wp-admin/includes/template.php
- Timestamp:
- 07/17/2014 09:13:53 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/template.php
r28976 r29206 584 584 if ( is_serialized( $entry['meta_value'] ) ) { 585 585 if ( is_serialized_string( $entry['meta_value'] ) ) { 586 // this is a serialized string, so we should display it586 // This is a serialized string, so we should display it. 587 587 $entry['meta_value'] = maybe_unserialize( $entry['meta_value'] ); 588 588 } else { 589 // this is a serialized array/object so we should NOT display it589 // This is a serialized array/object so we should NOT display it. 590 590 --$count; 591 591 return; … … 717 717 $tab_index_attribute = " tabindex=\"$tab_index\""; 718 718 719 // todo: Remove this? 719 720 // echo '<label for="timestamp" style="display: block;"><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> '.__( 'Edit timestamp' ).'</label><br />'; 720 721 … … 941 942 if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] ) 942 943 return; 943 // If box was added with default priority, give it core priority to maintain sort order 944 945 /* 946 * If box was added with default priority, give it core priority to 947 * maintain sort order. 948 */ 944 949 if ( 'default' == $a_priority ) { 945 950 $wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id]; … … 948 953 return; 949 954 } 950 // If no priority given and id already present, use existing priority 955 // If no priority given and id already present, use existing priority. 951 956 if ( empty($priority) ) { 952 957 $priority = $a_priority; 953 // else if we're adding to the sorted priority, we don't know the title or callback. Grab them from the previously added context/priority. 958 /* 959 * Else, if we're adding to the sorted priority, we don't know the title 960 * or callback. Grab them from the previously added context/priority. 961 */ 954 962 } elseif ( 'sorted' == $priority ) { 955 963 $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title']; … … 957 965 $callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args']; 958 966 } 959 // An id can be in only one priority and one context 967 // An id can be in only one priority and one context. 960 968 if ( $priority != $a_priority || $context != $a_context ) 961 969 unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]); … … 1341 1349 global $wp_settings_errors; 1342 1350 1343 // If $sanitize is true, manually re-run the sanitization for this option 1344 // This allows the $sanitize_callback from register_setting() to run, adding 1345 // any settings errors you want to show by default. 1351 /* 1352 * If $sanitize is true, manually re-run the sanitization for this option 1353 * This allows the $sanitize_callback from register_setting() to run, adding 1354 * any settings errors you want to show by default. 1355 */ 1346 1356 if ( $sanitize ) 1347 1357 sanitize_option( $setting, get_option( $setting ) ); 1348 1358 1349 // If settings were passed back from options.php then use them 1359 // If settings were passed back from options.php then use them. 1350 1360 if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) { 1351 1361 $wp_settings_errors = array_merge( (array) $wp_settings_errors, get_transient( 'settings_errors' ) ); … … 1353 1363 } 1354 1364 1355 // Check global in case errors have been added on this pageload 1365 // Check global in case errors have been added on this pageload. 1356 1366 if ( ! count( $wp_settings_errors ) ) 1357 1367 return array(); 1358 1368 1359 // Filter the results to those of a specific setting if one was set 1369 // Filter the results to those of a specific setting if one was set. 1360 1370 if ( $setting ) { 1361 1371 $setting_errors = array();
Note: See TracChangeset
for help on using the changeset viewer.