Fix syntax for single- and multi-line comments in wp-admin-directory files.

See #28931.


git-svn-id: https://develop.svn.wordpress.org/trunk@29206 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes (DrewAPicture)
2014-07-17 09:13:53 +00:00
parent 161266c17d
commit 6ddc1e5f6d
61 changed files with 570 additions and 369 deletions
+22 -12
View File
@@ -583,10 +583,10 @@ function _list_meta_row( $entry, &$count ) {
if ( is_serialized( $entry['meta_value'] ) ) {
if ( is_serialized_string( $entry['meta_value'] ) ) {
// this is a serialized string, so we should display it
// This is a serialized string, so we should display it.
$entry['meta_value'] = maybe_unserialize( $entry['meta_value'] );
} else {
// this is a serialized array/object so we should NOT display it
// This is a serialized array/object so we should NOT display it.
--$count;
return;
}
@@ -716,6 +716,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
if ( (int) $tab_index > 0 )
$tab_index_attribute = " tabindex=\"$tab_index\"";
// todo: Remove this?
// 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 />';
$time_adj = current_time('timestamp');
@@ -940,23 +941,30 @@ function add_meta_box( $id, $title, $callback, $screen = null, $context = 'advan
// If core box previously deleted, don't add
if ( false === $wp_meta_boxes[$page][$a_context][$a_priority][$id] )
return;
// If box was added with default priority, give it core priority to maintain sort order
/*
* If box was added with default priority, give it core priority to
* maintain sort order.
*/
if ( 'default' == $a_priority ) {
$wp_meta_boxes[$page][$a_context]['core'][$id] = $wp_meta_boxes[$page][$a_context]['default'][$id];
unset($wp_meta_boxes[$page][$a_context]['default'][$id]);
}
return;
}
// If no priority given and id already present, use existing priority
// If no priority given and id already present, use existing priority.
if ( empty($priority) ) {
$priority = $a_priority;
// 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.
/*
* 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.
*/
} elseif ( 'sorted' == $priority ) {
$title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title'];
$callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback'];
$callback_args = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['args'];
}
// An id can be in only one priority and one context
// An id can be in only one priority and one context.
if ( $priority != $a_priority || $context != $a_context )
unset($wp_meta_boxes[$page][$a_context][$a_priority][$id]);
}
@@ -1340,23 +1348,25 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
function get_settings_errors( $setting = '', $sanitize = false ) {
global $wp_settings_errors;
// If $sanitize is true, manually re-run the sanitization for this option
// This allows the $sanitize_callback from register_setting() to run, adding
// any settings errors you want to show by default.
/*
* If $sanitize is true, manually re-run the sanitization for this option
* This allows the $sanitize_callback from register_setting() to run, adding
* any settings errors you want to show by default.
*/
if ( $sanitize )
sanitize_option( $setting, get_option( $setting ) );
// If settings were passed back from options.php then use them
// If settings were passed back from options.php then use them.
if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && get_transient( 'settings_errors' ) ) {
$wp_settings_errors = array_merge( (array) $wp_settings_errors, get_transient( 'settings_errors' ) );
delete_transient( 'settings_errors' );
}
// Check global in case errors have been added on this pageload
// Check global in case errors have been added on this pageload.
if ( ! count( $wp_settings_errors ) )
return array();
// Filter the results to those of a specific setting if one was set
// Filter the results to those of a specific setting if one was set.
if ( $setting ) {
$setting_errors = array();
foreach ( (array) $wp_settings_errors as $key => $details ) {