diff --git a/wp-admin/about.php b/wp-admin/about.php index b102329ef2..8c415dc318 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -40,7 +40,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); __( 'Major Customizer Improvements, Code Error Checking, and More! %s' ), '🎉' ); - ?> + ?>

@@ -181,7 +181,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); __( 'Lend a Hand with Gutenberg %s' ), '🤝' ); - ?> + ?>

+ ?>

@@ -204,7 +204,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); __( 'Developer Happiness %s' ), '😊' ); - ?> + ?>
@@ -217,7 +217,7 @@ include( ABSPATH . 'wp-admin/admin-header.php' ); __( 'We’ve made numerous improvements to the Customizer JS API in WordPress 4.9, eliminating many pain points and making it just as easy to work with as the PHP API. There are also new base control templates, a date/time control, and section/panel/global notifications to name a few. Check out the full list.' ), 'https://make.wordpress.org/core/2017/11/01/improvements-to-the-customize-js-api-in-4-9/' ); - ?> + ?>

diff --git a/wp-admin/admin.php b/wp-admin/admin.php index a3dab04d3d..fb08b47f1a 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -74,7 +74,8 @@ if ( get_option( 'db_upgraded' ) ) { if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) == 1 ) ) { require_once( ABSPATH . WPINC . '/http.php' ); $response = wp_remote_get( - admin_url( 'upgrade.php?step=1' ), array( + admin_url( 'upgrade.php?step=1' ), + array( 'timeout' => 120, 'httpversion' => '1.1', ) diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index cf4670bbb1..19eaf99072 100644 --- a/wp-admin/async-upload.php +++ b/wp-admin/async-upload.php @@ -63,7 +63,8 @@ if ( isset( $_REQUEST['attachment_id'] ) && ( $id = intval( $_REQUEST['attachmen case 2: add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 ); echo get_media_item( - $id, array( + $id, + array( 'send' => false, 'delete' => true, ) diff --git a/wp-admin/comment.php b/wp-admin/comment.php index d95ae0ded0..1d76632a76 100644 --- a/wp-admin/comment.php +++ b/wp-admin/comment.php @@ -110,49 +110,49 @@ switch ( $action ) { $nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_'; $nonce_action .= $comment_id; - ?> + ?>

-comment_approved != '0' ) { // if not unapproved - $message = ''; - switch ( $comment->comment_approved ) { - case '1': - $message = __( 'This comment is currently approved.' ); - break; - case 'spam': - $message = __( 'This comment is currently marked as spam.' ); - break; - case 'trash': - $message = __( 'This comment is currently in the Trash.' ); - break; - } - if ( $message ) { - echo '

' . $message . '

'; - } -} -?> + if ( $comment->comment_approved != '0' ) { // if not unapproved + $message = ''; + switch ( $comment->comment_approved ) { + case '1': + $message = __( 'This comment is currently approved.' ); + break; + case 'spam': + $message = __( 'This comment is currently marked as spam.' ); + break; + case 'trash': + $message = __( 'This comment is currently in the Trash.' ); + break; + } + if ( $message ) { + echo '

' . $message . '

'; + } + } + ?>

@@ -160,13 +160,13 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved - + - + @@ -175,33 +175,33 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved @@ -229,18 +229,18 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved

- +

- + - comment_approved != '0' ) { // if not unapproved array( 'trashed' => '1', 'ids' => $comment_id, - ), $redir + ), + $redir ); break; case 'untrashcomment': @@ -303,7 +304,8 @@ if ( $comment->comment_approved != '0' ) { // if not unapproved array( 'spammed' => '1', 'ids' => $comment_id, - ), $redir + ), + $redir ); break; case 'unspamcomment': diff --git a/wp-admin/custom-background.php b/wp-admin/custom-background.php index a813897fe9..39282459fd 100644 --- a/wp-admin/custom-background.php +++ b/wp-admin/custom-background.php @@ -221,28 +221,28 @@ class Custom_Background { * @since 3.0.0 */ public function admin_page() { -?> + ?>

- +

- Customizer.' ), - admin_url( 'customize.php?autofocus[control]=background_image' ) - ); - ?> + Customizer.' ), + admin_url( 'customize.php?autofocus[control]=background_image' ) + ); + ?>

- + -updated ) ) { ?> + updated ) ) { ?>

Visit your site to see how it looks.' ), home_url( '/' ) ); ?>

- +

@@ -251,34 +251,34 @@ class Custom_Background {
- + - + - - + + - + - + - +
- comment_post_ID; - if ( current_user_can( 'edit_post', $post_id ) ) { - $post_link = ""; - $post_link .= esc_html( get_the_title( $post_id ) ) . ''; - } else { - $post_link = esc_html( get_the_title( $post_id ) ); - } + if ( current_user_can( 'edit_post', $post_id ) ) { + $post_link = ""; + $post_link .= esc_html( get_the_title( $post_id ) ) . ''; + } else { + $post_link = esc_html( get_the_title( $post_id ) ); + } echo $post_link; - if ( $comment->comment_parent ) { - $parent = get_comment( $comment->comment_parent ); - $parent_link = esc_url( get_comment_link( $parent ) ); - $name = get_comment_author( $parent ); - printf( - /* translators: %s: comment link */ - ' | ' . __( 'In reply to %s.' ), - '' . $name . '' - ); - } - ?> + if ( $comment->comment_parent ) { + $parent = get_comment( $comment->comment_parent ); + $parent_link = esc_url( get_comment_link( $parent ) ); + $name = get_comment_author( $parent ); + printf( + /* translators: %s: comment link */ + ' | ' . __( 'In reply to %s.' ), + '' . $name . '' + ); + } + ?>
- comment_approved != '0' ) { // if not unapproved get_comment_date( __( 'Y/m/d' ), $comment ), get_comment_date( __( 'g:i a' ), $comment ) ); - if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) { - echo '' . $submitted . ''; - } else { - echo $submitted; - } + if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) { + echo '' . $submitted . ''; + } else { + echo $submitted; + } ?>
- +

comment_ID}" ); ?>">

- admin_image_div_callback ) { - call_user_func( $this->admin_image_div_callback ); - } else { - $background_styles = ''; - if ( $bgcolor = get_background_color() ) { - $background_styles .= 'background-color: #' . $bgcolor . ';'; - } + admin_image_div_callback ) { + call_user_func( $this->admin_image_div_callback ); + } else { + $background_styles = ''; + if ( $bgcolor = get_background_color() ) { + $background_styles .= 'background-color: #' . $bgcolor . ';'; + } - $background_image_thumb = get_background_image(); - if ( $background_image_thumb ) { - $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', $background_image_thumb ) ) ) ); - $background_position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); - $background_position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) ); - $background_size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) ); - $background_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ); - $background_attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ); + $background_image_thumb = get_background_image(); + if ( $background_image_thumb ) { + $background_image_thumb = esc_url( set_url_scheme( get_theme_mod( 'background_image_thumb', str_replace( '%', '%%', $background_image_thumb ) ) ) ); + $background_position_x = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) ); + $background_position_y = get_theme_mod( 'background_position_y', get_theme_support( 'custom-background', 'default-position-y' ) ); + $background_size = get_theme_mod( 'background_size', get_theme_support( 'custom-background', 'default-size' ) ); + $background_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) ); + $background_attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) ); - // Background-image URL must be single quote, see below. - $background_styles .= " background-image: url('$background_image_thumb');" + // Background-image URL must be single quote, see below. + $background_styles .= " background-image: url('$background_image_thumb');" . " background-size: $background_size;" . " background-position: $background_position_x $background_position_y;" . " background-repeat: $background_repeat;" . " background-attachment: $background_attachment;"; - } - ?> + } + ?>
- +
@@ -287,34 +287,34 @@ class Custom_Background {
- -
- + +
+
- -
- + +
+
@@ -322,8 +322,8 @@ class Custom_Background {
- - + +


@@ -334,7 +334,7 @@ class Custom_Background {

@@ -342,68 +342,68 @@ class Custom_Background {
- + - array( - 'label' => __( 'Top Left' ), - 'icon' => 'dashicons dashicons-arrow-left-alt', - ), - 'center top' => array( - 'label' => __( 'Top' ), - 'icon' => 'dashicons dashicons-arrow-up-alt', - ), - 'right top' => array( - 'label' => __( 'Top Right' ), - 'icon' => 'dashicons dashicons-arrow-right-alt', - ), - ), - array( - 'left center' => array( - 'label' => __( 'Left' ), - 'icon' => 'dashicons dashicons-arrow-left-alt', - ), - 'center center' => array( - 'label' => __( 'Center' ), - 'icon' => 'background-position-center-icon', - ), - 'right center' => array( - 'label' => __( 'Right' ), - 'icon' => 'dashicons dashicons-arrow-right-alt', - ), - ), - array( - 'left bottom' => array( - 'label' => __( 'Bottom Left' ), - 'icon' => 'dashicons dashicons-arrow-left-alt', - ), - 'center bottom' => array( - 'label' => __( 'Bottom' ), - 'icon' => 'dashicons dashicons-arrow-down-alt', - ), - 'right bottom' => array( - 'label' => __( 'Bottom Right' ), - 'icon' => 'dashicons dashicons-arrow-right-alt', - ), - ), -); -?> + $background_position_options = array( + array( + 'left top' => array( + 'label' => __( 'Top Left' ), + 'icon' => 'dashicons dashicons-arrow-left-alt', + ), + 'center top' => array( + 'label' => __( 'Top' ), + 'icon' => 'dashicons dashicons-arrow-up-alt', + ), + 'right top' => array( + 'label' => __( 'Top Right' ), + 'icon' => 'dashicons dashicons-arrow-right-alt', + ), + ), + array( + 'left center' => array( + 'label' => __( 'Left' ), + 'icon' => 'dashicons dashicons-arrow-left-alt', + ), + 'center center' => array( + 'label' => __( 'Center' ), + 'icon' => 'background-position-center-icon', + ), + 'right center' => array( + 'label' => __( 'Right' ), + 'icon' => 'dashicons dashicons-arrow-right-alt', + ), + ), + array( + 'left bottom' => array( + 'label' => __( 'Bottom Left' ), + 'icon' => 'dashicons dashicons-arrow-left-alt', + ), + 'center bottom' => array( + 'label' => __( 'Bottom' ), + 'icon' => 'dashicons dashicons-arrow-down-alt', + ), + 'right bottom' => array( + 'label' => __( 'Bottom Right' ), + 'icon' => 'dashicons dashicons-arrow-right-alt', + ), + ), + ); + ?>
- +
- $input ) : ?> + $input ) : ?>
- + >
- - + +
- __( 'Thumbnail' ), 'medium' => __( 'Medium' ), 'large' => __( 'Large' ), diff --git a/wp-admin/custom-header.php b/wp-admin/custom-header.php index 2930dada8f..9460c80ca6 100644 --- a/wp-admin/custom-header.php +++ b/wp-admin/custom-header.php @@ -380,7 +380,7 @@ class Custom_Image_Header { }); })(jQuery); - + ?> -process_default_headers(); -?> + ?>

- +

- Customizer.' ), - admin_url( 'customize.php?autofocus[control]=header_image' ) - ); - ?> + Customizer.' ), + admin_url( 'customize.php?autofocus[control]=header_image' ) + ); + ?>

- + -updated ) ) { ?> + updated ) ) { ?>

Visit your site to see how it looks.' ), home_url( '/' ) ); ?>

- +

- + - + - + - +
- admin_image_div_callback ) { - call_user_func( $this->admin_image_div_callback ); - } else { - $custom_header = get_custom_header(); - $header_image = get_header_image(); + admin_image_div_callback ) { + call_user_func( $this->admin_image_div_callback ); + } else { + $custom_header = get_custom_header(); + $header_image = get_header_image(); - if ( $header_image ) { - $header_image_style = 'background-image:url(' . esc_url( $header_image ) . ');'; - } else { - $header_image_style = ''; - } + if ( $header_image ) { + $header_image_style = 'background-image:url(' . esc_url( $header_image ) . ');'; + } else { + $header_image_style = ''; + } - if ( $custom_header->width ) { - $header_image_style .= 'max-width:' . $custom_header->width . 'px;'; - } - if ( $custom_header->height ) { - $header_image_style .= 'height:' . $custom_header->height . 'px;'; - } - ?> + if ( $custom_header->width ) { + $header_image_style .= 'max-width:' . $custom_header->width . 'px;'; + } + if ( $custom_header->height ) { + $header_image_style .= 'height:' . $custom_header->height . 'px;'; + } + ?> - +


- %1$d × %2$d pixels will be used as-is.' ) . '
', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) ); - } elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) { - if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) { - printf( - /* translators: %s: size in pixels */ - __( 'Images should be at least %s wide.' ) . ' ', - sprintf( - /* translators: %d: custom header width */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'width' ) - ) - ); - } - } elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) { - if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) { - printf( - /* translators: %s: size in pixels */ - __( 'Images should be at least %s tall.' ) . ' ', - sprintf( - /* translators: %d: custom header height */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'height' ) - ) - ); - } - } - if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) { - if ( current_theme_supports( 'custom-header', 'width' ) ) { - printf( - /* translators: %s: size in pixels */ - __( 'Suggested width is %s.' ) . ' ', - sprintf( - /* translators: %d: custom header width */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'width' ) - ) - ); - } - if ( current_theme_supports( 'custom-header', 'height' ) ) { - printf( - /* translators: %s: size in pixels */ - __( 'Suggested height is %s.' ) . ' ', - sprintf( - /* translators: %d: custom header height */ - '' . __( '%d pixels' ) . '', - get_theme_support( 'custom-header', 'height' ) - ) - ); - } - } - ?> + %1$d × %2$d pixels will be used as-is.' ) . '
', get_theme_support( 'custom-header', 'width' ), get_theme_support( 'custom-header', 'height' ) ); + } elseif ( current_theme_supports( 'custom-header', 'flex-height' ) ) { + if ( ! current_theme_supports( 'custom-header', 'flex-width' ) ) { + printf( + /* translators: %s: size in pixels */ + __( 'Images should be at least %s wide.' ) . ' ', + sprintf( + /* translators: %d: custom header width */ + '' . __( '%d pixels' ) . '', + get_theme_support( 'custom-header', 'width' ) + ) + ); + } + } elseif ( current_theme_supports( 'custom-header', 'flex-width' ) ) { + if ( ! current_theme_supports( 'custom-header', 'flex-height' ) ) { + printf( + /* translators: %s: size in pixels */ + __( 'Images should be at least %s tall.' ) . ' ', + sprintf( + /* translators: %d: custom header height */ + '' . __( '%d pixels' ) . '', + get_theme_support( 'custom-header', 'height' ) + ) + ); + } + } + if ( current_theme_supports( 'custom-header', 'flex-height' ) || current_theme_supports( 'custom-header', 'flex-width' ) ) { + if ( current_theme_supports( 'custom-header', 'width' ) ) { + printf( + /* translators: %s: size in pixels */ + __( 'Suggested width is %s.' ) . ' ', + sprintf( + /* translators: %d: custom header width */ + '' . __( '%d pixels' ) . '', + get_theme_support( 'custom-header', 'width' ) + ) + ); + } + if ( current_theme_supports( 'custom-header', 'height' ) ) { + printf( + /* translators: %s: size in pixels */ + __( 'Suggested height is %s.' ) . ' ', + sprintf( + /* translators: %d: custom header height */ + '' . __( '%d pixels' ) . '', + get_theme_support( 'custom-header', 'height' ) + ) + ); + } + } + ?>


- - + +

- 'custom-header', - 'step' => 2, - '_wpnonce-custom-header-upload' => wp_create_nonce( 'custom-header-upload' ), - ), admin_url( 'themes.php' ) - ) - ); - ?> + 'custom-header', + 'step' => 2, + '_wpnonce-custom-header-upload' => wp_create_nonce( 'custom-header-upload' ), + ), + admin_url( 'themes.php' ) + ) + ); + ?>


- + - + - default_headers ) ) : ?>

- show_header_selector( 'uploaded' ); - ?> + show_header_selector( 'uploaded' ); + ?>
- +

- +

- + show_header_selector( 'default' ); ?> @@ -684,7 +685,7 @@ if ( $default_image && get_header_image() != $default_image ) :
- +

@@ -703,50 +704,50 @@ if ( $default_image && get_header_image() != $default_image ) :

- '; - if ( $default_color ) { - echo ' ' . sprintf( _x( 'Default: %s', 'color' ), esc_html( $default_color ) ) . ''; - } - ?> + echo ''; + if ( $default_color ) { + echo ' ' . sprintf( _x( 'Default: %s', 'color' ), esc_html( $default_color ) ) . ''; + } + ?>

- - +
-"/> - + - +

- - + +

diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 677e3dfbb0..6be549ad3a 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -158,7 +158,7 @@ if ( $viewable ) { /* translators: Publish box date format, see https://secure.php.net/date */ $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) ); -$messages['post'] = array( +$messages['post'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __( 'Post updated.' ) . $view_post_link_html, 2 => __( 'Custom field updated.' ), @@ -172,7 +172,7 @@ $messages['post'] = array( 9 => sprintf( __( 'Post scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_post_link_html, 10 => __( 'Post draft updated.' ) . $preview_post_link_html, ); -$messages['page'] = array( +$messages['page'] = array( 0 => '', // Unused. Messages start at index 1. 1 => __( 'Page updated.' ) . $view_page_link_html, 2 => __( 'Custom field updated.' ), @@ -394,7 +394,8 @@ do_action( 'do_meta_boxes', $post_type, 'advanced', $post ); do_action( 'do_meta_boxes', $post_type, 'side', $post ); add_screen_option( - 'layout_columns', array( + 'layout_columns', + array( 'max' => 2, 'default' => 2, ) @@ -586,7 +587,7 @@ $referer = wp_get_referer(); - - +
-public ? get_sample_permalink_html( $post->ID ) : ''; + public ? get_sample_permalink_html( $post->ID ) : ''; - // As of 4.4, the Get Shortlink button is hidden by default. - if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) { - $shortlink = wp_get_shortlink( $post->ID, 'post' ); + // As of 4.4, the Get Shortlink button is hidden by default. + if ( has_filter( 'pre_get_shortlink' ) || has_filter( 'get_shortlink' ) ) { + $shortlink = wp_get_shortlink( $post->ID, 'post' ); - if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) { - $sample_permalink_html .= ''; + if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) { + $sample_permalink_html .= ''; + } } - } - if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) { - $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status; - ?> + if ( $post_type_object->public && ! ( 'pending' == get_post_status( $post ) && ! current_user_can( $post_type_object->cap->publish_posts ) ) ) { + $has_sample_permalink = $sample_permalink_html && 'auto-draft' != $post->post_status; + ?>
- +
- + ?>
- + - + ?>
-post_content, 'content', array( - '_content_editor_dfw' => $_content_editor_dfw, - 'drag_drop_upload' => true, - 'tabfocus_elements' => 'content-html,save-post', - 'editor_height' => 300, - 'tinymce' => array( - 'resize' => false, - 'wp_autoresize_on' => $_wp_editor_expand, - 'add_unload_trigger' => false, - 'wp_keep_scroll_position' => ! $is_IE, - ), - ) -); -?> + post_content, + 'content', + array( + '_content_editor_dfw' => $_content_editor_dfw, + 'drag_drop_upload' => true, + 'tabfocus_elements' => 'content-html,save-post', + 'editor_height' => 300, + 'tinymce' => array( + 'resize' => false, + 'wp_autoresize_on' => $_wp_editor_expand, + 'add_unload_trigger' => false, + 'wp_keep_scroll_position' => ! $is_IE, + ), + ) + ); + ?>
0' ); ?>   -post_status ) { - echo ''; - if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) { - /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */ - printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); - } else { - /* translators: 1: Post edited date, 2: Post edited time */ - printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); + post_status ) { + echo ''; + if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) { + /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */ + printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); + } else { + /* translators: 1: Post edited date, 2: Post edited time */ + printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); + } + echo ''; } - echo ''; -} ?>
-comment_post_ID > 0 ) : $comment_link = get_comment_link( $comment ); -?> + ?>
@@ -284,5 +284,5 @@ do_action( "{$taxonomy}_edit_form", $tag, $taxonomy ); - 20, 'option' => 'edit_' . $tax->name . '_per_page', ) @@ -95,7 +96,8 @@ switch ( $wp_list_table->current_action() ) { array( 'error' => true, 'message' => 4, - ), $referer + ), + $referer ); } @@ -187,7 +189,8 @@ switch ( $wp_list_table->current_action() ) { array( 'error' => true, 'message' => 5, - ), $referer + ), + $referer ); } break; @@ -337,8 +340,8 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {

-
@@ -401,160 +404,160 @@ if ( current_user_can( $tax->cap->edit_terms ) ) { * @param string $taxonomy The taxonomy slug. */ do_action( "{$taxonomy}_pre_add_form", $taxonomy ); -?> + ?>

labels->add_new_item; ?>

+ > - +

- +

- +
- 0, - 'hide_if_empty' => false, - 'taxonomy' => $taxonomy, - 'name' => 'parent', - 'orderby' => 'name', - 'hierarchical' => true, - 'show_option_none' => __( 'None' ), - ); + 0, + 'hide_if_empty' => false, + 'taxonomy' => $taxonomy, + 'name' => 'parent', + 'orderby' => 'name', + 'hierarchical' => true, + 'show_option_none' => __( 'None' ), + ); - /** - * Filters the taxonomy parent drop-down on the Edit Term page. - * - * @since 3.7.0 - * @since 4.2.0 Added `$context` parameter. - * - * @param array $dropdown_args { - * An array of taxonomy parent drop-down arguments. - * - * @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false. - * @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false. - * @type string $taxonomy The taxonomy slug. - * @type string $name Value of the name attribute to use for the drop-down select element. - * Default 'parent'. - * @type string $orderby The field to order by. Default 'name'. - * @type bool $hierarchical Whether the taxonomy is hierarchical. Default true. - * @type string $show_option_none Label to display if there are no terms. Default 'None'. - * } - * @param string $taxonomy The taxonomy slug. - * @param string $context Filter context. Accepts 'new' or 'edit'. - */ - $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' ); + /** + * Filters the taxonomy parent drop-down on the Edit Term page. + * + * @since 3.7.0 + * @since 4.2.0 Added `$context` parameter. + * + * @param array $dropdown_args { + * An array of taxonomy parent drop-down arguments. + * + * @type int|bool $hide_empty Whether to hide terms not attached to any posts. Default 0|false. + * @type bool $hide_if_empty Whether to hide the drop-down if no terms exist. Default false. + * @type string $taxonomy The taxonomy slug. + * @type string $name Value of the name attribute to use for the drop-down select element. + * Default 'parent'. + * @type string $orderby The field to order by. Default 'name'. + * @type bool $hierarchical Whether the taxonomy is hierarchical. Default true. + * @type string $show_option_none Label to display if there are no terms. Default 'None'. + * } + * @param string $taxonomy The taxonomy slug. + * @param string $context Filter context. Accepts 'new' or 'edit'. + */ + $dropdown_args = apply_filters( 'taxonomy_parent_dropdown_args', $dropdown_args, $taxonomy, 'new' ); - wp_dropdown_categories( $dropdown_args ); - ?> - + wp_dropdown_categories( $dropdown_args ); + ?> +

- +

-labels->add_new_item ); -submit_button( $tax->labels->add_new_item ); + if ( 'category' == $taxonomy ) { + /** + * Fires at the end of the Edit Category form. + * + * @since 2.1.0 + * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * + * @param object $arg Optional arguments cast to an object. + */ + do_action( 'edit_category_form', (object) array( 'parent' => 0 ) ); + } elseif ( 'link_category' == $taxonomy ) { + /** + * Fires at the end of the Edit Link form. + * + * @since 2.3.0 + * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * + * @param object $arg Optional arguments cast to an object. + */ + do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) ); + } else { + /** + * Fires at the end of the Add Tag form. + * + * @since 2.7.0 + * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * + * @param string $taxonomy The taxonomy slug. + */ + do_action( 'add_tag_form', $taxonomy ); + } -if ( 'category' == $taxonomy ) { /** - * Fires at the end of the Edit Category form. + * Fires at the end of the Add Term form for all taxonomies. * - * @since 2.1.0 - * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. * - * @param object $arg Optional arguments cast to an object. - */ - do_action( 'edit_category_form', (object) array( 'parent' => 0 ) ); -} elseif ( 'link_category' == $taxonomy ) { - /** - * Fires at the end of the Edit Link form. - * - * @since 2.3.0 - * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. - * - * @param object $arg Optional arguments cast to an object. - */ - do_action( 'edit_link_category_form', (object) array( 'parent' => 0 ) ); -} else { - /** - * Fires at the end of the Add Tag form. - * - * @since 2.7.0 - * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * @since 3.0.0 * * @param string $taxonomy The taxonomy slug. */ - do_action( 'add_tag_form', $taxonomy ); -} - -/** - * Fires at the end of the Add Term form for all taxonomies. - * - * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. - * - * @since 3.0.0 - * - * @param string $taxonomy The taxonomy slug. - */ -do_action( "{$taxonomy}_add_form", $taxonomy ); -?> + do_action( "{$taxonomy}_add_form", $taxonomy ); + ?>
@@ -587,15 +590,15 @@ do_action( "{$taxonomy}_add_form", $taxonomy ); ); ?>

- +

category to tag converter.' ), esc_url( $import_link ) ); ?>

- +

tag to category converter.' ), esc_url( $import_link ) ); ?>

- try{document.forms.addtag['tag-name'].focus();}catch(e){} -inline_edit(); diff --git a/wp-admin/edit.php b/wp-admin/edit.php index b1ad058912..24a02d05b1 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -127,7 +127,8 @@ if ( $doaction ) { 'trashed' => $trashed, 'ids' => join( ',', $post_ids ), 'locked' => $locked, - ), $sendback + ), + $sendback ); break; case 'untrash': @@ -290,7 +291,8 @@ get_current_screen()->set_screen_reader_content( ); add_screen_option( - 'per_page', array( + 'per_page', + array( 'default' => 20, 'option' => 'edit_' . $post_type . '_per_page', ) diff --git a/wp-admin/export.php b/wp-admin/export.php index 89e5d34da6..cb088bafc2 100644 --- a/wp-admin/export.php +++ b/wp-admin/export.php @@ -23,7 +23,7 @@ $title = __( 'Export' ); * @since 3.5.0 */ function export_add_js() { -?> + ?> -posts WHERE post_type = %s AND post_status != 'auto-draft' ORDER BY post_date DESC - ", $post_type + ", + $post_type ) ); @@ -224,7 +225,7 @@ function export_date_options( $post_type = 'post' ) { false ), 'objects' ); foreach ( $post_stati as $status ) : - ?> + ?> @@ -280,9 +281,10 @@ foreach ( get_post_types( array( '_builtin' => false, 'can_export' => true, - ), 'objects' + ), + 'objects' ) as $post_type ) : -?> + ?>

diff --git a/wp-admin/import.php b/wp-admin/import.php index 48051c940e..0877d1e581 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -65,7 +65,7 @@ $parent_file = 'tools.php'; ' . esc_html( $_GET['invalid'] ) . '' ); - ?> + ?>

@@ -96,7 +96,7 @@ if ( empty( $importers ) ) { echo '

' . __( 'No importers are available.' ) . '

'; // TODO: make more helpful } else { uasort( $importers, '_usort_by_first_member' ); -?> + ?> 'activate', 'plugin' => $plugin_file, 'from' => 'import', - ), admin_url( 'plugins.php' ) - ), 'activate-plugin_' . $plugin_file + ), + admin_url( 'plugins.php' ) + ), + 'activate-plugin_' . $plugin_file ); $action = sprintf( '%s', @@ -142,8 +144,10 @@ if ( empty( $importers ) ) { 'action' => 'install-plugin', 'plugin' => $plugin_slug, 'from' => 'import', - ), self_admin_url( 'update.php' ) - ), 'install-plugin_' . $plugin_slug + ), + self_admin_url( 'update.php' ) + ), + 'install-plugin_' . $plugin_slug ); $action = sprintf( '%5$s', @@ -166,7 +170,8 @@ if ( empty( $importers ) ) { $url = add_query_arg( array( 'import' => $importer_id, - ), self_admin_url( 'admin.php' ) + ), + self_admin_url( 'admin.php' ) ); $action = sprintf( '%3$s', @@ -188,7 +193,8 @@ if ( empty( $importers ) ) { 'TB_iframe' => 'true', 'width' => 600, 'height' => 550, - ), network_admin_url( 'plugin-install.php' ) + ), + network_admin_url( 'plugin-install.php' ) ); $action .= sprintf( ' | %3$s', @@ -212,7 +218,7 @@ if ( empty( $importers ) ) { } ?>
- $taxonomy->name, 'descendants_and_self' => $cat_id, 'selected_cats' => $checked_categories, @@ -547,7 +548,8 @@ function _wp_ajax_add_hierarchical_term() { ob_start(); wp_terms_checklist( - 0, array( + 0, + array( 'taxonomy' => $taxonomy->name, 'descendants_and_self' => $term_id, 'selected_cats' => $checked_categories, @@ -998,7 +1000,8 @@ function wp_ajax_get_tagcloud() { } $tags = get_terms( - $taxonomy, array( + $taxonomy, + array( 'number' => 45, 'orderby' => 'count', 'order' => 'DESC', @@ -1020,7 +1023,8 @@ function wp_ajax_get_tagcloud() { // We need raw tag names here, so don't filter the output $return = wp_generate_tag_cloud( - $tags, array( + $tags, + array( 'filter' => 0, 'format' => 'list', ) @@ -1460,7 +1464,8 @@ function wp_ajax_add_meta() { 'meta_key' => $key, 'meta_value' => $value, 'meta_id' => $mid, - ), $c + ), + $c ), 'position' => 0, 'supplemental' => array( 'postid' => $meta->post_id ), @@ -1625,7 +1630,8 @@ function wp_ajax_menu_get_metabox() { $item = apply_filters( 'nav_menu_meta_box_object', $menus_meta_box_object ); ob_start(); call_user_func_array( - $callback, array( + $callback, + array( null, array( 'id' => 'add-' . $item->name, @@ -3166,7 +3172,8 @@ function wp_ajax_query_themes() { } $args = wp_parse_args( - wp_unslash( $_REQUEST['request'] ), array( + wp_unslash( $_REQUEST['request'] ), + array( 'per_page' => 20, 'fields' => $theme_field_defaults, ) @@ -3196,7 +3203,8 @@ function wp_ajax_query_themes() { array( 'theme' => $theme->slug, '_wpnonce' => wp_create_nonce( 'install-theme_' . $theme->slug ), - ), $update_php + ), + $update_php ); if ( current_user_can( 'switch_themes' ) ) { @@ -3206,7 +3214,8 @@ function wp_ajax_query_themes() { 'action' => 'enable', '_wpnonce' => wp_create_nonce( 'enable-theme_' . $theme->slug ), 'theme' => $theme->slug, - ), network_admin_url( 'themes.php' ) + ), + network_admin_url( 'themes.php' ) ); } else { $theme->activate_url = add_query_arg( @@ -3214,7 +3223,8 @@ function wp_ajax_query_themes() { 'action' => 'activate', '_wpnonce' => wp_create_nonce( 'switch-theme_' . $theme->slug ), 'stylesheet' => $theme->slug, - ), admin_url( 'themes.php' ) + ), + admin_url( 'themes.php' ) ); } } @@ -3223,7 +3233,8 @@ function wp_ajax_query_themes() { $theme->customize_url = add_query_arg( array( 'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ), - ), wp_customize_url( $theme->slug ) + ), + wp_customize_url( $theme->slug ) ); } @@ -3666,7 +3677,8 @@ function wp_ajax_install_theme() { include_once( ABSPATH . 'wp-admin/includes/theme.php' ); $api = themes_api( - 'theme_information', array( + 'theme_information', + array( 'slug' => $slug, 'fields' => array( 'sections' => false ), ) @@ -3719,7 +3731,8 @@ function wp_ajax_install_theme() { 'action' => 'enable', '_wpnonce' => wp_create_nonce( 'enable-theme_' . $slug ), 'theme' => $slug, - ), network_admin_url( 'themes.php' ) + ), + network_admin_url( 'themes.php' ) ); } else { $status['activateUrl'] = add_query_arg( @@ -3727,7 +3740,8 @@ function wp_ajax_install_theme() { 'action' => 'activate', '_wpnonce' => wp_create_nonce( 'switch-theme_' . $slug ), 'stylesheet' => $slug, - ), admin_url( 'themes.php' ) + ), + admin_url( 'themes.php' ) ); } } @@ -3736,7 +3750,8 @@ function wp_ajax_install_theme() { $status['customizeUrl'] = add_query_arg( array( 'return' => urlencode( network_admin_url( 'theme-install.php', 'relative' ) ), - ), wp_customize_url( $slug ) + ), + wp_customize_url( $slug ) ); } @@ -3950,7 +3965,8 @@ function wp_ajax_install_plugin() { include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); $api = plugins_api( - 'plugin_information', array( + 'plugin_information', + array( 'slug' => sanitize_key( wp_unslash( $_POST['slug'] ) ), 'fields' => array( 'sections' => false, @@ -4010,7 +4026,8 @@ function wp_ajax_install_plugin() { '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $install_status['file'] ), 'action' => 'activate', 'plugin' => $install_status['file'], - ), $plugins_url + ), + $plugins_url ); } @@ -4220,7 +4237,8 @@ function wp_ajax_search_plugins() { /** @var WP_Plugins_List_Table $wp_list_table */ $wp_list_table = _get_list_table( - 'WP_Plugins_List_Table', array( + 'WP_Plugins_List_Table', + array( 'screen' => get_current_screen(), ) ); @@ -4235,11 +4253,13 @@ function wp_ajax_search_plugins() { // Set the correct requester, so pagination works. $_SERVER['REQUEST_URI'] = add_query_arg( array_diff_key( - $_POST, array( + $_POST, + array( '_ajax_nonce' => null, 'action' => null, ) - ), network_admin_url( 'plugins.php', 'relative' ) + ), + network_admin_url( 'plugins.php', 'relative' ) ); $GLOBALS['s'] = wp_unslash( $_POST['s'] ); @@ -4269,7 +4289,8 @@ function wp_ajax_search_install_plugins() { /** @var WP_Plugin_Install_List_Table $wp_list_table */ $wp_list_table = _get_list_table( - 'WP_Plugin_Install_List_Table', array( + 'WP_Plugin_Install_List_Table', + array( 'screen' => get_current_screen(), ) ); @@ -4284,11 +4305,13 @@ function wp_ajax_search_install_plugins() { // Set the correct requester, so pagination works. $_SERVER['REQUEST_URI'] = add_query_arg( array_diff_key( - $_POST, array( + $_POST, + array( '_ajax_nonce' => null, 'action' => null, ) - ), network_admin_url( 'plugin-install.php', 'relative' ) + ), + network_admin_url( 'plugin-install.php', 'relative' ) ); $wp_list_table->prepare_items(); diff --git a/wp-admin/includes/class-automatic-upgrader-skin.php b/wp-admin/includes/class-automatic-upgrader-skin.php index 571068d691..5f8360f066 100644 --- a/wp-admin/includes/class-automatic-upgrader-skin.php +++ b/wp-admin/includes/class-automatic-upgrader-skin.php @@ -83,7 +83,8 @@ class Automatic_Upgrader_Skin extends WP_Upgrader_Skin { // Only allow basic HTML in the messages, as it'll be used in emails/logs rather than direct browser output. $string = wp_kses( - $string, array( + $string, + array( 'a' => array( 'href' => true, ), diff --git a/wp-admin/includes/class-core-upgrader.php b/wp-admin/includes/class-core-upgrader.php index f39c300be1..58daba77ea 100644 --- a/wp-admin/includes/class-core-upgrader.php +++ b/wp-admin/includes/class-core-upgrader.php @@ -180,7 +180,9 @@ class Core_Upgrader extends WP_Upgrader { $original_result = $result; $result = new WP_Error( - 'rollback_was_required', $this->strings['rollback_was_required'], (object) array( + 'rollback_was_required', + $this->strings['rollback_was_required'], + (object) array( 'update' => $original_result, 'rollback' => $rollback_result, ) @@ -189,10 +191,14 @@ class Core_Upgrader extends WP_Upgrader { } /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ - do_action( 'upgrader_process_complete', $this, array( - 'action' => 'update', - 'type' => 'core', - ) ); + do_action( + 'upgrader_process_complete', + $this, + array( + 'action' => 'update', + 'type' => 'core', + ) + ); // Clear the current updates delete_site_transient( 'update_core' ); diff --git a/wp-admin/includes/class-language-pack-upgrader.php b/wp-admin/includes/class-language-pack-upgrader.php index 8e808608fa..3982306aec 100644 --- a/wp-admin/includes/class-language-pack-upgrader.php +++ b/wp-admin/includes/class-language-pack-upgrader.php @@ -275,12 +275,16 @@ class Language_Pack_Upgrader extends WP_Upgrader { remove_action( 'upgrader_process_complete', 'wp_update_themes' ); /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ - do_action( 'upgrader_process_complete', $this, array( - 'action' => 'update', - 'type' => 'translation', - 'bulk' => true, - 'translations' => $language_updates_results, - ) ); + do_action( + 'upgrader_process_complete', + $this, + array( + 'action' => 'update', + 'type' => 'translation', + 'bulk' => true, + 'translations' => $language_updates_results, + ) + ); // Re-add upgrade hooks. add_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 ); @@ -337,7 +341,8 @@ class Language_Pack_Upgrader extends WP_Upgrader { if ( ! $mo || ! $po ) { return new WP_Error( - 'incompatible_archive_pomo', $this->strings['incompatible_archive'], + 'incompatible_archive_pomo', + $this->strings['incompatible_archive'], /* translators: 1: .po, 2: .mo */ sprintf( __( 'The language pack is missing either the %1$s or %2$s files.' ), diff --git a/wp-admin/includes/class-plugin-upgrader.php b/wp-admin/includes/class-plugin-upgrader.php index bd00b7283f..c80c9c4c97 100644 --- a/wp-admin/includes/class-plugin-upgrader.php +++ b/wp-admin/includes/class-plugin-upgrader.php @@ -306,12 +306,16 @@ class Plugin_Upgrader extends WP_Upgrader { wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ - do_action( 'upgrader_process_complete', $this, array( - 'action' => 'update', - 'type' => 'plugin', - 'bulk' => true, - 'plugins' => $plugins, - ) ); + do_action( + 'upgrader_process_complete', + $this, + array( + 'action' => 'update', + 'type' => 'plugin', + 'bulk' => true, + 'plugins' => $plugins, + ) + ); $this->skin->bulk_footer(); diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php index 9d1a7993f8..cf8ee0d88a 100644 --- a/wp-admin/includes/class-theme-installer-skin.php +++ b/wp-admin/includes/class-theme-installer-skin.php @@ -67,7 +67,8 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { 'action' => 'activate', 'template' => urlencode( $template ), 'stylesheet' => urlencode( $stylesheet ), - ), admin_url( 'themes.php' ) + ), + admin_url( 'themes.php' ) ); $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); diff --git a/wp-admin/includes/class-theme-upgrader-skin.php b/wp-admin/includes/class-theme-upgrader-skin.php index 68569321b6..395429620f 100644 --- a/wp-admin/includes/class-theme-upgrader-skin.php +++ b/wp-admin/includes/class-theme-upgrader-skin.php @@ -51,7 +51,8 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin { 'action' => 'activate', 'template' => urlencode( $template ), 'stylesheet' => urlencode( $stylesheet ), - ), admin_url( 'themes.php' ) + ), + admin_url( 'themes.php' ) ); $activate_link = wp_nonce_url( $activate_link, 'switch-theme_' . $stylesheet ); diff --git a/wp-admin/includes/class-theme-upgrader.php b/wp-admin/includes/class-theme-upgrader.php index 1a561ab69c..eec26d5e0e 100644 --- a/wp-admin/includes/class-theme-upgrader.php +++ b/wp-admin/includes/class-theme-upgrader.php @@ -111,7 +111,8 @@ class Theme_Upgrader extends WP_Upgrader { // We don't have the parent theme, let's install it. $api = themes_api( - 'theme_information', array( + 'theme_information', + array( 'slug' => $theme_info->get( 'Template' ), 'fields' => array( 'sections' => false, @@ -418,7 +419,9 @@ class Theme_Upgrader extends WP_Upgrader { /** This action is documented in wp-admin/includes/class-wp-upgrader.php */ do_action( - 'upgrader_process_complete', $this, array( + 'upgrader_process_complete', + $this, + array( 'action' => 'update', 'type' => 'theme', 'bulk' => true, @@ -468,7 +471,8 @@ class Theme_Upgrader extends WP_Upgrader { // A proper archive should have a style.css file in the single subdirectory if ( ! file_exists( $working_directory . 'style.css' ) ) { return new WP_Error( - 'incompatible_archive_theme_no_style', $this->strings['incompatible_archive'], + 'incompatible_archive_theme_no_style', + $this->strings['incompatible_archive'], /* translators: %s: style.css */ sprintf( __( 'The theme is missing the %s stylesheet.' ), @@ -478,7 +482,8 @@ class Theme_Upgrader extends WP_Upgrader { } $info = get_file_data( - $working_directory . 'style.css', array( + $working_directory . 'style.css', + array( 'Name' => 'Theme Name', 'Template' => 'Template', ) @@ -486,7 +491,8 @@ class Theme_Upgrader extends WP_Upgrader { if ( empty( $info['Name'] ) ) { return new WP_Error( - 'incompatible_archive_theme_no_name', $this->strings['incompatible_archive'], + 'incompatible_archive_theme_no_name', + $this->strings['incompatible_archive'], /* translators: %s: style.css */ sprintf( __( 'The %s stylesheet doesn’t contain a valid theme header.' ), @@ -498,7 +504,8 @@ class Theme_Upgrader extends WP_Upgrader { // If it's not a child theme, it must have at least an index.php to be legit. if ( empty( $info['Template'] ) && ! file_exists( $working_directory . 'index.php' ) ) { return new WP_Error( - 'incompatible_archive_theme_no_index', $this->strings['incompatible_archive'], + 'incompatible_archive_theme_no_index', + $this->strings['incompatible_archive'], /* translators: %s: index.php */ sprintf( __( 'The theme is missing the %s file.' ), diff --git a/wp-admin/includes/class-walker-nav-menu-edit.php b/wp-admin/includes/class-walker-nav-menu-edit.php index d53c0c8988..f1baecd611 100644 --- a/wp-admin/includes/class-walker-nav-menu-edit.php +++ b/wp-admin/includes/class-walker-nav-menu-edit.php @@ -152,7 +152,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { @@ -232,7 +232,7 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { ), 'delete-menu_item_' . $item_id ); - ?> + ?> "> | diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index 59b16a59e8..f999ff24ed 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -336,7 +336,8 @@ class WP_Automatic_Updater { // Boom, This sites about to get a whole new splash of paint! $upgrade_result = $upgrader->upgrade( - $upgrader_item, array( + $upgrader_item, + array( 'clear_update_cache' => false, // Always use partial builds if possible for core updates. 'pre_check_md5' => false, @@ -574,7 +575,8 @@ class WP_Automatic_Updater { } update_site_option( - 'auto_core_update_failed', array( + 'auto_core_update_failed', + array( 'attempted' => $core_update->current, 'current' => $wp_version, 'error_code' => $error_code, @@ -600,7 +602,8 @@ class WP_Automatic_Updater { */ protected function send_email( $type, $core_update, $result = null ) { update_site_option( - 'auto_core_update_notified', array( + 'auto_core_update_notified', + array( 'type' => $type, 'email' => get_site_option( 'admin_email' ), 'version' => $core_update->current, diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 7ab35735a7..7d2068fc49 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -158,7 +158,8 @@ class WP_Comments_List_Table extends WP_List_Table { $total_comments = get_comments( array_merge( - $args, array( + $args, + array( 'count' => true, 'offset' => 0, 'number' => 0, @@ -224,7 +225,7 @@ class WP_Comments_List_Table extends WP_List_Table { ), // singular not used /* translators: %s: current user's comments count */ - 'mine' => _nx_noop( + 'mine' => _nx_noop( 'Mine (%s)', 'Mine (%s)', 'comments' @@ -277,11 +278,13 @@ class WP_Comments_List_Table extends WP_List_Table { if ( 'mine' === $status ) { $current_user_id = get_current_user_id(); - $num_comments->mine = get_comments( array( - 'user_id' => $current_user_id, - 'count' => true, - ) ); - $link = add_query_arg( 'user_id', $current_user_id, $link ); + $num_comments->mine = get_comments( + array( + 'user_id' => $current_user_id, + 'count' => true, + ) + ); + $link = add_query_arg( 'user_id', $current_user_id, $link ); } else { $link = remove_query_arg( 'user_id', $link ); } @@ -367,49 +370,50 @@ class WP_Comments_List_Table extends WP_List_Table { if ( ! isset( $has_items ) ) { $has_items = $this->has_items(); } -?> + ?>
- + - 'post-query-submit' ) ); -} + 'post-query-submit' ) ); + } -if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $has_items ) { - wp_nonce_field( 'bulk-destroy', '_destroy_nonce' ); - $title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); - submit_button( $title, 'apply', 'delete_all', false ); -} + if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_user_can( 'moderate_comments' ) && $has_items ) { + wp_nonce_field( 'bulk-destroy', '_destroy_nonce' ); + $title = ( 'spam' === $comment_status ) ? esc_attr__( 'Empty Spam' ) : esc_attr__( 'Empty Trash' ); + submit_button( $title, 'apply', 'delete_all', false ); + } /** * Fires after the Filter submit button for comment types. * @@ -490,7 +494,7 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us $this->screen->render_screen_reader_content( 'heading_list' ); -?> + ?> @@ -516,7 +520,7 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us
-display_tablenav( 'bottom' ); } @@ -676,10 +680,10 @@ if ( ( 'spam' === $comment_status || 'trash' === $comment_status ) && current_us */ public function column_cb( $comment ) { if ( $this->user_can ) { - ?> + ?> - user_can ) { /** This filter is documented in wp-admin/includes/comment.php */ $comment_content = apply_filters( 'comment_edit_pre', $comment->comment_content ); - ?> + ?> - $author_ip, 'mode' => 'detail', - ), admin_url( 'edit-comments.php' ) + ), + admin_url( 'edit-comments.php' ) ); if ( 'spam' === $comment_status ) { $author_ip_url = add_query_arg( 'comment_status', 'spam', $author_ip_url ); diff --git a/wp-admin/includes/class-wp-internal-pointers.php b/wp-admin/includes/class-wp-internal-pointers.php index a2194df686..18ea79b5a4 100644 --- a/wp-admin/includes/class-wp-internal-pointers.php +++ b/wp-admin/includes/class-wp-internal-pointers.php @@ -180,8 +180,8 @@ final class WP_Internal_Pointers { } $js_args = array( - 'content' => $content, - 'position' => $position, + 'content' => $content, + 'position' => $position, 'pointerClass' => 'wp-pointer arrow-bottom', 'pointerWidth' => 420, ); diff --git a/wp-admin/includes/class-wp-links-list-table.php b/wp-admin/includes/class-wp-links-list-table.php index ae83ae2f5e..f3b519613a 100644 --- a/wp-admin/includes/class-wp-links-list-table.php +++ b/wp-admin/includes/class-wp-links-list-table.php @@ -100,9 +100,9 @@ class WP_Links_List_Table extends WP_List_Table { if ( 'top' != $which ) { return; } -?> + ?>
- $cat_id, 'name' => 'cat_id', @@ -117,9 +117,9 @@ class WP_Links_List_Table extends WP_List_Table { echo ''; wp_dropdown_categories( $dropdown_options ); submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); -?> + ?>
-link_name = esc_attr( $link->link_name ); $link->link_category = wp_get_link_cats( $link->link_id ); -?> + ?> single_row_columns( $link ); ?> - '', 'singular' => '', 'ajax' => false, @@ -274,7 +275,8 @@ class WP_List_Table { */ protected function set_pagination_args( $args ) { $args = wp_parse_args( - $args, array( + $args, + array( 'total_items' => 0, 'total_pages' => 0, 'per_page' => 0, @@ -360,13 +362,13 @@ class WP_List_Table { if ( ! empty( $_REQUEST['detached'] ) ) { echo ''; } -?> + ?> - + ?> - + ?>
-modes as $mode => $title ) { - $classes = array( 'view-' . $mode ); - if ( $current_mode === $mode ) { - $classes[] = 'current'; - } - printf( - "%s\n", - esc_url( add_query_arg( 'mode', $mode ) ), - implode( ' ', $classes ), - $title - ); -} + modes as $mode => $title ) { + $classes = array( 'view-' . $mode ); + if ( $current_mode === $mode ) { + $classes[] = 'current'; + } + printf( + "%s\n", + esc_url( add_query_arg( 'mode', $mode ) ), + implode( ' ', $classes ), + $title + ); + } ?>
-modes as $mode => $title ) { array( 'p' => $post_id, 'comment_status' => 'approved', - ), admin_url( 'edit-comments.php' ) + ), + admin_url( 'edit-comments.php' ) ) ), $approved_comments_number, @@ -699,7 +703,8 @@ foreach ( $this->modes as $mode => $title ) { array( 'p' => $post_id, 'comment_status' => 'moderated', - ), admin_url( 'edit-comments.php' ) + ), + admin_url( 'edit-comments.php' ) ) ), $pending_comments_number, @@ -1152,7 +1157,7 @@ foreach ( $this->modes as $mode => $title ) { $this->display_tablenav( 'top' ); $this->screen->render_screen_reader_content( 'heading_list' ); -?> + ?> @@ -1161,10 +1166,10 @@ foreach ( $this->modes as $mode => $title ) { > display_rows_or_placeholder(); ?> @@ -1177,7 +1182,7 @@ foreach ( $this->modes as $mode => $title ) {
-display_tablenav( 'bottom' ); } @@ -1209,7 +1214,7 @@ foreach ( $this->modes as $mode => $title ) {
bulk_actions( $which ); ?>
- extra_tablenav( $which ); $this->pagination( $which ); @@ -1217,7 +1222,7 @@ foreach ( $this->modes as $mode => $title ) {
- + ?>
-is_trash ) { - $this->months_dropdown( 'attachment' ); - } + is_trash ) { + $this->months_dropdown( 'attachment' ); + } - /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ - do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); + /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ + do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); - submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); -} + submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + } -if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { - submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); -} + if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_items() ) { + submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); + } ?>
-is_trash && current_user_can( 'edit_others_posts' ) && $this->has_it $views = $this->get_views(); $this->screen->render_screen_reader_content( 'heading_views' ); -?> + ?>
view_switcher( $mode ); ?> @@ -252,28 +252,28 @@ if ( $this->is_trash && current_user_can( 'edit_others_posts' ) && $this->has_it ?> -extra_tablenav( 'bar' ); /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */ $views = apply_filters( "views_{$this->screen->id}", array() ); // Back compat for pre-4.0 view links. -if ( ! empty( $views ) ) { - echo ''; -} -?> + if ( ! empty( $views ) ) { + echo ''; + } + ?>
- ID ) ) { - ?> + ?> - + ?> - post_type ); if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { -?> + ?> post_parent ) ) { -?> + ?> $post->post_parent, 'media[]' => $post->ID, '_wpnonce' => wp_create_nonce( 'bulk-' . $this->_args['plural'] ), - ), 'upload.php' + ), + 'upload.php' ); printf( '
%s', @@ -631,11 +632,11 @@ if ( ! empty( $views ) ) { continue; } $post_owner = ( get_current_user_id() == $post->post_author ) ? 'self' : 'other'; - ?> + ?> single_row_columns( $post ); ?> - true, 'offset' => 0, 'number' => 0, @@ -275,14 +276,14 @@ class WP_MS_Sites_List_Table extends WP_List_Table { public function column_cb( $blog ) { if ( ! is_main_site( $blog['blog_id'] ) ) : $blogname = untrailingslashit( $blog['domain'] . $blog['path'] ); - ?> + ?> - $blog['blog_id'], - 'fields' => 'ID', - 'number' => 1, - 'count_total' => true, - ) ); + $blog_users = new WP_User_Query( + array( + 'blog_id' => $blog['blog_id'], + 'fields' => 'ID', + 'number' => 1, + 'count_total' => true, + ) + ); $user_count = $blog_users->get_total(); wp_cache_set( $blog['blog_id'] . '_user_count', $user_count, 'blog-details', 12 * HOUR_IN_SECONDS ); } diff --git a/wp-admin/includes/class-wp-ms-themes-list-table.php b/wp-admin/includes/class-wp-ms-themes-list-table.php index 36a0743bd3..294f2c82f8 100644 --- a/wp-admin/includes/class-wp-ms-themes-list-table.php +++ b/wp-admin/includes/class-wp-ms-themes-list-table.php @@ -153,7 +153,9 @@ class WP_MS_Themes_List_Table extends WP_List_Table { $total_this_page = $totals[ $status ]; wp_localize_script( - 'updates', '_wpUpdatesItemCounts', array( + 'updates', + '_wpUpdatesItemCounts', + array( 'themes' => $totals, 'totals' => wp_get_update_data(), ) @@ -423,7 +425,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'theme' => $theme_key, 'paged' => $page, 's' => $s, - ), $url + ), + $url ); if ( $this->is_site_themes ) { @@ -448,7 +451,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'theme' => $theme_key, 'paged' => $page, 's' => $s, - ), $url + ), + $url ); if ( $this->is_site_themes ) { @@ -475,7 +479,8 @@ class WP_MS_Themes_List_Table extends WP_List_Table { 'theme_status' => $context, 'paged' => $page, 's' => $s, - ), 'themes.php' + ), + 'themes.php' ); /* translators: %s: theme name */ diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index 3482c3cf7a..ad4f2b1062 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -143,10 +143,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $installed_plugins = $this->get_installed_plugins(); $args = array( - 'page' => $paged, - 'per_page' => $per_page, + 'page' => $paged, + 'per_page' => $per_page, // Send the locale to the API so it can provide context-sensitive results. - 'locale' => get_user_locale(), + 'locale' => get_user_locale(), ); switch ( $tab ) { @@ -256,7 +256,9 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } wp_localize_script( - 'updates', '_wpUpdatesItemCounts', array( + 'updates', + '_wpUpdatesItemCounts', + array( 'plugins' => $js_plugins, 'totals' => wp_get_update_data(), ) @@ -273,7 +275,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
- screen->id}", $views ); $this->screen->render_screen_reader_content( 'heading_views' ); -?> + ?>
- +
-display_tablenav( 'top' ); -?> + ?>
-screen->render_screen_reader_content( 'heading_list' ); -?> + screen->render_screen_reader_content( 'heading_list' ); + ?>
> display_rows_or_placeholder(); ?>
-display_tablenav( 'bottom' ); } @@ -365,7 +367,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { if ( 'top' === $which ) { wp_referer_field(); - ?> + ?>
pagination( $which ); ?>
- wp_create_nonce( 'activate-plugin_' . $status['file'] ), 'action' => 'activate', 'plugin' => $status['file'], - ), network_admin_url( 'plugins.php' ) + ), + network_admin_url( 'plugins.php' ) ); if ( is_network_admin() ) { @@ -621,7 +624,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); $last_updated_timestamp = strtotime( $plugin['last_updated'] ); - ?> + ?>
= 1000000 ) { $active_installs_millions = floor( $plugin['active_installs'] / 1000000 ); - $active_installs_text = sprintf( + $active_installs_text = sprintf( _nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ), number_format_i18n( $active_installs_millions ) ); @@ -728,7 +731,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
- $js_plugins, 'totals' => wp_get_update_data(), ) diff --git a/wp-admin/includes/class-wp-post-comments-list-table.php b/wp-admin/includes/class-wp-post-comments-list-table.php index f49d039778..29dc286310 100644 --- a/wp-admin/includes/class-wp-post-comments-list-table.php +++ b/wp-admin/includes/class-wp-post-comments-list-table.php @@ -49,13 +49,13 @@ class WP_Post_Comments_List_Table extends WP_Comments_List_Table { $singular = $this->_args['singular']; wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' ); -?> + ?> > - + ?>
-months_dropdown( $this->screen->post_type ); - $this->categories_dropdown( $this->screen->post_type ); + $this->months_dropdown( $this->screen->post_type ); + $this->categories_dropdown( $this->screen->post_type ); - /** - * Fires before the Filter button on the Posts and Pages list tables. - * - * The Filter button allows sorting by date and/or category on the - * Posts list table, and sorting by date on the Pages list table. - * - * @since 2.1.0 - * @since 4.4.0 The `$post_type` parameter was added. - * @since 4.6.0 The `$which` parameter was added. - * - * @param string $post_type The post type slug. - * @param string $which The location of the extra table nav markup: - * 'top' or 'bottom' for WP_Posts_List_Table, - * 'bar' for WP_Media_List_Table. - */ - do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); + /** + * Fires before the Filter button on the Posts and Pages list tables. + * + * The Filter button allows sorting by date and/or category on the + * Posts list table, and sorting by date on the Pages list table. + * + * @since 2.1.0 + * @since 4.4.0 The `$post_type` parameter was added. + * @since 4.6.0 The `$which` parameter was added. + * + * @param string $post_type The post type slug. + * @param string $which The location of the extra table nav markup: + * 'top' or 'bottom' for WP_Posts_List_Table, + * 'bar' for WP_Media_List_Table. + */ + do_action( 'restrict_manage_posts', $this->screen->post_type, $which ); - $output = ob_get_clean(); + $output = ob_get_clean(); - if ( ! empty( $output ) ) { - echo $output; - submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); - } -} + if ( ! empty( $output ) ) { + echo $output; + submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) ); + } + } -if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) { - submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); -} -?> + if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) && $this->has_items() ) { + submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false ); + } + ?>
-is_trash && current_user_can( get_post_type_object( $this->screen->p */ public function column_cb( $post ) { if ( current_user_can( 'edit_post', $post->ID ) ) : - ?> + ?>
@@ -869,7 +871,7 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p ?>
- is_trash && current_user_can( get_post_type_object( $this->screen->p } else { $classes .= ' level-0'; } - ?> + ?> single_row_columns( $post ); ?> - is_trash && current_user_can( get_post_type_object( $this->screen->p 'author' => true, ); - ?> + ?>
is_trash && current_user_can( get_post_type_object( $this->screen->p $bulk = 0; while ( $bulk < 2 ) { - ?> + ?> - + ?>
- - @@ -837,7 +837,7 @@ final class WP_Screen { } ?> - @@ -890,10 +890,10 @@ final class WP_Screen { - show_screen_options() ) : - ?> + ?> @@ -968,7 +968,8 @@ if ( $this->show_screen_options() ) : */ public function render_screen_options( $options = array() ) { $options = wp_parse_args( - $options, array( + $options, + array( 'wrap' => true, ) ); @@ -1121,12 +1122,12 @@ if ( $this->show_screen_options() ) : ?> - + ?> show_screen_options() ) : // This needs a submit button add_filter( 'screen_options_show_submit', '__return_true' ); -?> + ?>
-screen->taxonomy; $args = wp_parse_args( - $this->callback_args, array( + $this->callback_args, + array( 'page' => 1, 'number' => 20, 'search' => '', @@ -385,7 +386,7 @@ class WP_Terms_List_Table extends WP_List_Table { urlencode( wp_unslash( $uri ) ), $edit_link ); - $name = sprintf( + $name = sprintf( '%s', esc_url( $edit_link ), /* translators: %s: taxonomy term name */ @@ -607,7 +608,7 @@ class WP_Terms_List_Table extends WP_List_Table { if ( ! current_user_can( $tax->cap->edit_terms ) ) { return; } -?> + ?>
- + ?>
items; foreach ( $themes as $theme ) { - ?> + ?>
single_row( $theme ); ?>
- theme_installer(); @@ -270,7 +270,8 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { array( 'tab' => 'theme-information', 'theme' => $theme->slug, - ), self_admin_url( 'theme-install.php' ) + ), + self_admin_url( 'theme-install.php' ) ); $actions = array(); @@ -279,14 +280,16 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { array( 'action' => 'install-theme', 'theme' => $theme->slug, - ), self_admin_url( 'update.php' ) + ), + self_admin_url( 'update.php' ) ); $update_url = add_query_arg( array( 'action' => 'upgrade-theme', 'theme' => $theme->slug, - ), self_admin_url( 'update.php' ) + ), + self_admin_url( 'update.php' ) ); $status = $this->_get_theme_status( $theme ); @@ -346,10 +349,12 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {

-
+
+ ?> +
- + ?>
has_items() ) : ?> @@ -272,7 +272,7 @@ class WP_Users_List_Table extends WP_List_Table { - +?>
- + ?>
id, 'normal', '' ); ?> @@ -242,7 +242,7 @@ function wp_dashboard() {
- + ?>
'; } -?> + ?>

@@ -458,7 +458,7 @@ function wp_network_dashboard_right_now() { 'submit_sites' ) ); ?>

-ID; -?> + ?>
@@ -692,7 +692,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $actions_string .= "$sep$link"; } } -?> + ?>
  • > @@ -702,28 +702,28 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {

    - ' . get_comment_author_link( $comment ) . '', - $comment_post_link, - '' . __( '[Pending]' ) . '' - ); - } else { - printf( - /* translators: 1: comment author, 2: notification if the comment is pending */ - __( 'From %1$s %2$s' ), - '' . get_comment_author_link( $comment ) . '', - '' . __( '[Pending]' ) . '' - ); - } - ?> + if ( $comment_post_link ) { + printf( + /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */ + __( 'From %1$s on %2$s %3$s' ), + '' . get_comment_author_link( $comment ) . '', + $comment_post_link, + '' . __( '[Pending]' ) . '' + ); + } else { + printf( + /* translators: 1: comment author, 2: notification if the comment is pending */ + __( 'From %1$s %2$s' ), + '' . get_comment_author_link( $comment ) . '', + '' . __( '[Pending]' ) . '' + ); + } + ?>

    - comment_type ) { case 'pingback': @@ -736,28 +736,28 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { $type = ucwords( $comment->comment_type ); } $type = esc_html( $type ); - ?> + ?>

    - $type", - $comment_post_link, - '' . __( '[Pending]' ) . '' - ); - } else { - printf( - /* translators: 1: type of comment, 2: notification if the comment is pending */ - _x( '%1$s %2$s', 'dashboard' ), - "$type", - '' . __( '[Pending]' ) . '' - ); - } - ?> + if ( $comment_post_link ) { + printf( + /* translators: 1: type of comment, 2: post link, 3: notification if the comment is pending */ + _x( '%1$s on %2$s %3$s', 'dashboard' ), + "$type", + $comment_post_link, + '' . __( '[Pending]' ) . '' + ); + } else { + printf( + /* translators: 1: type of comment, 2: notification if the comment is pending */ + _x( '%1$s %2$s', 'dashboard' ), + "$type", + '' . __( '[Pending]' ) . '' + ); + } + ?>

    @@ -768,7 +768,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
  • - $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[ $widget_control_id ], ) @@ -1760,7 +1762,8 @@ function wp_welcome_panel() { if ( current_theme_supports( 'widgets' ) && current_theme_supports( 'menus' ) ) { printf( __( 'Manage widgets or menus' ), - admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) + admin_url( 'widgets.php' ), + admin_url( 'nav-menus.php' ) ); } elseif ( current_theme_supports( 'widgets' ) ) { echo '' . __( 'Manage widgets' ) . ''; diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index 9d80b78925..0b3dfdea8c 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -445,7 +445,7 @@ function export_wp( $args = array() ) { - + - + - + term_id ); ?> slug ); ?> @@ -477,8 +477,8 @@ function export_wp( $args = array() ) { wxr_term_meta( $c ); ?> - - + + term_id ); ?> slug ); ?> @@ -488,8 +488,8 @@ function export_wp( $args = array() ) { wxr_term_meta( $t ); ?> - - + + term_id ); ?> taxonomy ); ?> @@ -501,43 +501,43 @@ function export_wp( $args = array() ) { wxr_term_meta( $t ); ?> - - + + -in_the_loop = true; + // Fake being in the loop. + $wp_query->in_the_loop = true; - // Fetch 20 posts at a time rather than loading the entire table into memory. - while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { - $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')'; - $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); + // Fetch 20 posts at a time rather than loading the entire table into memory. + while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { + $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')'; + $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); - // Begin Loop. - foreach ( $posts as $post ) { - setup_postdata( $post ); - $is_sticky = is_sticky( $post->ID ) ? 1 : 0; - ?> + // Begin Loop. + foreach ( $posts as $post ) { + setup_postdata( $post ); + $is_sticky = is_sticky( $post->ID ) ? 1 : 0; + ?> - <?php - /** This filter is documented in wp-includes/feed.php */ - echo apply_filters( 'the_title_rss', $post->post_title ); - ?> + <?php + /** This filter is documented in wp-includes/feed.php */ + echo apply_filters( 'the_title_rss', $post->post_title ); + ?> @@ -545,28 +545,28 @@ if ( $post_ids ) { - post_content ) ); - ?> + post_content ) ); + ?> - post_excerpt ) ); - ?> + post_excerpt ) ); + ?> ID ); ?> post_date ); ?> @@ -580,40 +580,40 @@ if ( $post_ids ) { post_type ); ?> post_password ); ?> - post_type == 'attachment' ) : ?> + post_type == 'attachment' ) : ?> ID ) ); ?> - - get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); - foreach ( $postmeta as $meta ) : - /** - * Filters whether to selectively skip post meta used for WXR exports. - * - * Returning a truthy value to the filter will skip the current meta - * object from being exported. - * - * @since 3.3.0 - * - * @param bool $skip Whether to skip the current post meta. Default false. - * @param string $meta_key Current meta key. - * @param object $meta Current meta object. - */ - if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) { - continue; - } - ?> + + get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); + foreach ( $postmeta as $meta ) : + /** + * Filters whether to selectively skip post meta used for WXR exports. + * + * Returning a truthy value to the filter will skip the current meta + * object from being exported. + * + * @since 3.3.0 + * + * @param bool $skip Whether to skip the current post meta. Default false. + * @param string $meta_key Current meta key. + * @param object $meta Current meta object. + */ + if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) { + continue; + } + ?> meta_key ); ?> meta_value ); ?> -get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); - $comments = array_map( 'get_comment', $_comments ); - foreach ( $comments as $c ) : - ?> + $_comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); + $comments = array_map( 'get_comment', $_comments ); + foreach ( $comments as $c ) : + ?> comment_ID ); ?> comment_author ); ?> @@ -627,39 +627,39 @@ endforeach; comment_type ); ?> comment_parent ); ?> user_id ); ?> -get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) ); -foreach ( $c_meta as $meta ) : - /** - * Filters whether to selectively skip comment meta used for WXR exports. - * - * Returning a truthy value to the filter will skip the current meta - * object from being exported. - * - * @since 4.0.0 - * - * @param bool $skip Whether to skip the current comment meta. Default false. - * @param string $meta_key Current meta key. - * @param object $meta Current meta object. - */ - if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) { - continue; - } - ?> + get_results( $wpdb->prepare( "SELECT * FROM $wpdb->commentmeta WHERE comment_id = %d", $c->comment_ID ) ); + foreach ( $c_meta as $meta ) : + /** + * Filters whether to selectively skip comment meta used for WXR exports. + * + * Returning a truthy value to the filter will skip the current meta + * object from being exported. + * + * @since 4.0.0 + * + * @param bool $skip Whether to skip the current comment meta. Default false. + * @param string $meta_key Current meta key. + * @param object $meta Current meta object. + */ + if ( apply_filters( 'wxr_export_skip_commentmeta', false, $meta->meta_key, $meta ) ) { + continue; + } + ?> meta_key ); ?> meta_value ); ?> - + - + - + ?> - $new_file, 'url' => $url, 'type' => $type, - ), 'wp_handle_sideload' === $action ? 'sideload' : 'upload' + ), + 'wp_handle_sideload' === $action ? 'sideload' : 'upload' ); } @@ -982,7 +984,8 @@ function download_url( $url, $timeout = 300 ) { } $response = wp_safe_remote_get( - $url, array( + $url, + array( 'timeout' => $timeout, 'stream' => true, 'filename' => $tmpfname, @@ -1679,7 +1682,8 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false, } $credentials = get_option( - 'ftp_credentials', array( + 'ftp_credentials', + array( 'hostname' => '', 'username' => '', ) @@ -1786,35 +1790,35 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false, */ $types = apply_filters( 'fs_ftp_connection_types', $types, $credentials, $type, $error, $context ); -?> + ?>
    -" . __( 'Connection Information' ) . ""; -?> + " . __( 'Connection Information' ) . ""; + ?>

    - + ?>

    - $text ) : - ?> + foreach ( $types as $name => $text ) : + ?> - + ?>
    - +
    >

    -'; + + + foreach ( (array) $extra_fields as $field ) { + if ( isset( $submitted_form[ $field ] ) ) { + echo ''; + } + } + ?>

    @@ -1899,7 +1903,7 @@ foreach ( (array) $extra_fields as $field ) {

    - array( + 'a' => array( 'href' => array(), - 'target' => array() + 'target' => array(), ), - 'br' => array() + 'br' => array(), ); $allowed_protocols = array( 'http', 'https' ); $group_html = ''; @@ -2041,7 +2045,7 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) { $file_basename = 'wp-personal-data-file-' . $stripped_email . '-' . $obscura; $html_report_filename = $file_basename . '.html'; $html_report_pathname = wp_normalize_path( $exports_dir . $html_report_filename ); - $file = fopen( $html_report_pathname, 'w' ); + $file = fopen( $html_report_pathname, 'w' ); if ( false === $file ) { wp_send_json_error( __( 'Unable to open export file (HTML report) for writing.' ) ); } @@ -2060,22 +2064,22 @@ function wp_privacy_generate_personal_data_export_file( $request_id ) { fwrite( $file, "\n" ); fwrite( $file, "\n" ); fwrite( $file, "" ); - fwrite( $file, "" ); + fwrite( $file, 'body { color: black; font-family: Arial, sans-serif; font-size: 11pt; margin: 15px auto; width: 860px; }' ); + fwrite( $file, 'table { background: #f0f0f0; border: 1px solid #ddd; margin-bottom: 20px; width: 100%; }' ); + fwrite( $file, 'th { padding: 5px; text-align: left; width: 20%; }' ); + fwrite( $file, 'td { padding: 5px; }' ); + fwrite( $file, 'tr:nth-child(odd) { background-color: #fafafa; }' ); + fwrite( $file, '</style>' ); + fwrite( $file, '<title>' ); fwrite( $file, esc_html( $title ) ); - fwrite( $file, "" ); + fwrite( $file, '' ); fwrite( $file, "\n" ); // Body. fwrite( $file, "\n" ); // Heading. - fwrite( $file, "

    " . esc_html__( 'Personal Data Export' ) . "

    " ); + fwrite( $file, '

    ' . esc_html__( 'Personal Data Export' ) . '

    ' ); // And now, all the Groups. $groups = get_post_meta( $request_id, '_export_data_grouped', true ); @@ -2197,9 +2201,9 @@ function wp_privacy_send_personal_data_export_email( $request_id ) { $expiration = apply_filters( 'wp_privacy_export_expiration', 3 * DAY_IN_SECONDS ); $expiration_date = date_i18n( get_option( 'date_format' ), time() + $expiration ); -/* translators: Do not translate EXPIRATION, LINK, SITENAME, SITEURL: those are placeholders. */ -$email_text = __( -'Howdy, + /* translators: Do not translate EXPIRATION, LINK, SITENAME, SITEURL: those are placeholders. */ + $email_text = __( + 'Howdy, Your request for an export of personal data has been completed. You may download your personal data by clicking on the link below. For privacy @@ -2211,7 +2215,7 @@ so please download it before then. Regards, All at ###SITENAME### ###SITEURL###' -); + ); /** * Filters the text of the email sent with a personal data export file. @@ -2229,10 +2233,10 @@ All at ###SITENAME### */ $content = apply_filters( 'wp_privacy_personal_data_email_content', $email_text, $request_id ); - $email_address = $request->email; + $email_address = $request->email; $export_file_url = get_post_meta( $request_id, '_export_file_url', true ); - $site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); - $site_url = home_url(); + $site_name = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); + $site_url = home_url(); $content = str_replace( '###EXPIRATION###', $expiration_date, $content ); $content = str_replace( '###LINK###', esc_url_raw( $export_file_url ), $content ); @@ -2313,9 +2317,9 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde // If we are not yet on the last page of the last exporter, return now. /** This filter is documented in wp-admin/includes/ajax-actions.php */ - $exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() ); + $exporters = apply_filters( 'wp_privacy_personal_data_exporters', array() ); $is_last_exporter = $exporter_index === count( $exporters ); - $exporter_done = $response['done']; + $exporter_done = $response['done']; if ( ! $is_last_exporter || ! $exporter_done ) { return $response; } @@ -2339,8 +2343,8 @@ function wp_privacy_process_personal_data_export_page( $response, $exporter_inde $groups[ $group_id ]['items'][ $item_id ] = array(); } - $old_item_data = $groups[ $group_id ]['items'][ $item_id ]; - $merged_item_data = array_merge( $export_datum['data'], $old_item_data ); + $old_item_data = $groups[ $group_id ]['items'][ $item_id ]; + $merged_item_data = array_merge( $export_datum['data'], $old_item_data ); $groups[ $group_id ]['items'][ $item_id ] = $merged_item_data; } diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php index 84ac3da933..740405d328 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -80,7 +80,7 @@ function wp_image_editor( $post_id, $msg = false ) {
    - +
    @@ -103,7 +103,7 @@ function wp_image_editor( $post_id, $msg = false ) {
    - +
    @@ -152,7 +152,7 @@ function wp_image_editor( $post_id, $msg = false ) { + ?>
    @@ -203,13 +203,13 @@ function wp_image_editor( $post_id, $msg = false ) { ) ) ) { $note_no_rotate = ''; - ?> + ?> - ' . __( 'Image rotation is not supported by your web host.' ) . '

    '; - ?> + ?> @@ -243,7 +243,7 @@ function wp_image_editor( $post_id, $msg = false ) {
    - $locale, 'version' => $wp_version, - ), 'http://api.wordpress.org/core/importers/1.1/' + ), + 'http://api.wordpress.org/core/importers/1.1/' ); $options = array( 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ) ); diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index c941e625e3..e6fc3d558e 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -263,12 +263,12 @@ function _cleanup_image_add_caption( $matches ) { * @param string $html */ function media_send_to_editor( $html ) { -?> + ?> - $title, 'post_content' => $content, 'post_excerpt' => $excerpt, - ), $post_data + ), + $post_data ); // This should never be set as it would then overwrite an existing attachment. @@ -458,7 +459,8 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data 'post_parent' => $post_id, 'post_title' => $title, 'post_content' => $content, - ), $post_data + ), + $post_data ); // This should never be set as it would then overwrite an existing attachment. @@ -484,24 +486,24 @@ function media_handle_sideload( $file_array, $post_id, $desc = null, $post_data */ function wp_iframe( $content_func /* ... */ ) { _wp_admin_html_begin(); -?> + ?> <?php bloginfo( 'name' ); ?> › <?php _e( 'Uploads' ); ?> — <?php _e( 'WordPress' ); ?> - + wp_enqueue_style( 'deprecated-media' ); + } + wp_enqueue_style( 'ie' ); + ?> -; /** This action is documented in wp-admin/admin-header.php */ do_action( 'admin_head' ); -if ( is_string( $content_func ) ) { - /** - * Fires in the admin header for each specific form tab in the legacy - * (pre-3.5.0) media upload popup. - * - * The dynamic portion of the hook, `$content_func`, refers to the form - * callback for the media upload type. Possible values include - * 'media_upload_type_form', 'media_upload_type_url_form', and - * 'media_upload_library_form'. - * - * @since 2.5.0 - */ - do_action( "admin_head_{$content_func}" ); -} + if ( is_string( $content_func ) ) { + /** + * Fires in the admin header for each specific form tab in the legacy + * (pre-3.5.0) media upload popup. + * + * The dynamic portion of the hook, `$content_func`, refers to the form + * callback for the media upload type. Possible values include + * 'media_upload_type_form', 'media_upload_type_url_form', and + * 'media_upload_library_form'. + * + * @since 2.5.0 + */ + do_action( "admin_head_{$content_func}" ); + } -$body_id_attr = ''; -if ( isset( $GLOBALS['body_id'] ) ) { - $body_id_attr = ' id="' . $GLOBALS['body_id'] . '"'; -} -?> + $body_id_attr = ''; + if ( isset( $GLOBALS['body_id'] ) ) { + $body_id_attr = ' id="' . $GLOBALS['body_id'] . '"'; + } + ?> class="wp-core-ui no-js"> - + ?> - + ?>
    - +

    @@ -2067,15 +2076,15 @@ do_action( 'pre-plupload-upload-ui' );

    - +
    @@ -2094,18 +2103,18 @@ do_action( 'post-plupload-upload-ui' );

    - +

    - + ?>
    - + - +

    - +
    -' . esc_html( $id->get_error_message() ) . '
    '; - exit; + if ( $id ) { + if ( ! is_wp_error( $id ) ) { + add_filter( 'attachment_fields_to_edit', 'media_post_single_attachment_fields_to_edit', 10, 2 ); + echo get_media_items( $id, $errors ); + } else { + echo '
    ' . esc_html( $id->get_error_message() ) . '
    '; + exit; + } } -} -?> + ?>

    - +

    - + ?>
    - +

    @@ -2240,10 +2249,10 @@ var addExtImage = { if ( f.alt.value ) alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); - + if ( ! apply_filters( 'disable_captions', '' ) ) { + ?> if ( f.caption.value ) { caption = f.caption.value.replace(/\r\n|\r/g, '\n'); caption = caption.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){ @@ -2252,7 +2261,7 @@ if ( ! apply_filters( 'disable_captions', '' ) ) { caption = caption.replace(/\s*\n\s*/g, '
    '); } - + cls = caption ? '' : ' class="'+t.align+'"'; @@ -2318,20 +2327,20 @@ jQuery(document).ready( function($) {
    - +
    - + ?>
    - + - + | |
    - + ?>
    @@ -2550,127 +2563,127 @@ function media_upload_library_form( $errors ) {

    - add_query_arg( 'paged', '%#%' ), - 'format' => '', - 'prev_text' => __( '«' ), - 'next_text' => __( '»' ), - 'total' => ceil( $wp_query->found_posts / 10 ), - 'current' => $q['paged'], - ) -); + add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __( '«' ), + 'next_text' => __( '»' ), + 'total' => ceil( $wp_query->found_posts / 10 ), + 'current' => $q['paged'], + ) + ); -if ( $page_links ) { - echo "
    $page_links
    "; -} -?> + if ( $page_links ) { + echo "
    $page_links
    "; + } + ?>
    -posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; + $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; -$arc_result = $wpdb->get_results( $arc_query ); + $arc_result = $wpdb->get_results( $arc_query ); -$month_count = count( $arc_result ); -$selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0; + $month_count = count( $arc_result ); + $selected_month = isset( $_GET['m'] ) ? $_GET['m'] : 0; -if ( $month_count && ! ( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { -?> + if ( $month_count && ! ( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { + ?> - + - +
    @@ -2680,8 +2693,8 @@ foreach ( $arc_result as $arc_row ) { - - + +
    - - + +

    - +

    -'; $end = ''; } -?> + ?>

    - + ?>
    @@ -2937,9 +2950,9 @@ function edit_form_image_editor( $post ) { + ?>
    - post_mime_type ) ) { echo ': ' . __( 'Displayed on attachment pages.' ); } - ?> + ?> post_content, 'attachment_content', $editor_args ); ?> @@ -3055,7 +3068,7 @@ function attachment_submitbox_metadata() { $media_dims = apply_filters( 'media_meta', $media_dims, $post ); $att_url = wp_get_attachment_url( $post->ID ); -?> + ?>
    @@ -3077,7 +3090,7 @@ function attachment_submitbox_metadata() { } else { echo strtoupper( str_replace( 'image/', '', $post->post_mime_type ) ); } - ?> + ?>
    @@ -3122,7 +3135,7 @@ function attachment_submitbox_metadata() { if ( empty( $meta[ $key ] ) ) { continue; } - ?> + ?>
    + ?>
    - + ?>
    - + ?>
    -post_type; $post_type_object = get_post_type_object( $post_type ); $can_publish = current_user_can( $post_type_object->cap->publish_posts ); -?> + ?>
    - +
    - +
    -post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { - $private_style = ''; - if ( 'private' == $post->post_status ) { - $private_style = 'style="display:none"'; - } -?> + post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { + $private_style = ''; + if ( 'private' == $post->post_status ) { + $private_style = 'style="display:none"'; + } + ?> type="submit" name="save" id="save-post" value="" class="button" /> post_status && $can_publish ) { ?> @@ -51,44 +51,44 @@ if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pendi
    - +
    -post_status ) { - $preview_button_text = __( 'Preview Changes' ); -} else { - $preview_button_text = __( 'Preview' ); -} + post_status ) { + $preview_button_text = __( 'Preview Changes' ); + } else { + $preview_button_text = __( 'Preview' ); + } -$preview_button = sprintf( - '%1$s %2$s', - $preview_button_text, - /* translators: accessibility text */ - __( '(opens in a new tab)' ) -); -?> + $preview_button = sprintf( + '%1$s %2$s', + $preview_button_text, + /* translators: accessibility text */ + __( '(opens in a new tab)' ) + ); + ?>
    - +
    - + post_status ) { @@ -109,22 +109,22 @@ do_action( 'post_submitbox_minor_actions', $post ); _e( 'Draft' ); break; } -?> + ?> -post_status || 'private' == $post->post_status || $can_publish ) { - $private_style = ''; - if ( 'private' == $post->post_status ) { - $private_style = 'style="display:none"'; - } -?> + post_status || 'private' == $post->post_status || $can_publish ) { + $private_style = ''; + if ( 'private' == $post->post_status ) { + $private_style = 'style="display:none"'; + } + ?> class="edit-post-status hide-if-no-js" role="button">
    - + ID ) ); ?> /> />
    - + ID ) ); ?> />
    />
    @@ -193,57 +193,57 @@ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_
    -ID ) { - if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date - /* translators: Post date information. %s: Date on which the post is currently scheduled to be published */ - $stamp = __( 'Scheduled for: %s' ); - } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published - /* translators: Post date information. %s: Date on which the post was published */ - $stamp = __( 'Published on: %s' ); - } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified - $stamp = __( 'Publish immediately' ); - } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified - /* translators: Post date information. %s: Date on which the post is to be published */ - $stamp = __( 'Schedule for: %s' ); - } else { // draft, 1 or more saves, date specified - /* translators: Post date information. %s: Date on which the post is to be published */ - $stamp = __( 'Publish on: %s' ); - } - $date = date_i18n( $datef, strtotime( $post->post_date ) ); -} else { // draft (no saves, and thus no date specified) - $stamp = __( 'Publish immediately' ); - $date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) ); -} - -if ( ! empty( $args['args']['revisions_count'] ) ) : -?> -
    ID ) { + if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + /* translators: Post date information. %s: Date on which the post is currently scheduled to be published */ + $stamp = __( 'Scheduled for: %s' ); + } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published + /* translators: Post date information. %s: Date on which the post was published */ + $stamp = __( 'Published on: %s' ); + } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified + $stamp = __( 'Publish immediately' ); + } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + /* translators: Post date information. %s: Date on which the post is to be published */ + $stamp = __( 'Schedule for: %s' ); + } else { // draft, 1 or more saves, date specified + /* translators: Post date information. %s: Date on which the post is to be published */ + $stamp = __( 'Publish on: %s' ); + } + $date = date_i18n( $datef, strtotime( $post->post_date ) ); + } else { // draft (no saves, and thus no date specified) + $stamp = __( 'Publish immediately' ); + $date = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) ); + } + + if ( ! empty( $args['args']['revisions_count'] ) ) : + ?> +
    + ' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); - ?> + ?>
    - + if ( $can_publish ) : // Contributors don't get to choose the date of publish + ?>
    - +
    - +
    -post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) : ?> + post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) : ?>

    - + - +
    - -
    -ID ) ) { - if ( ! EMPTY_TRASH_DAYS ) { - $delete_text = __( 'Delete Permanently' ); - } else { - $delete_text = __( 'Move to Trash' ); - } + +
    + ID ) ) { + if ( ! EMPTY_TRASH_DAYS ) { + $delete_text = __( 'Delete Permanently' ); + } else { + $delete_text = __( 'Move to Trash' ); + } + ?> + } + ?>
    -post_status, array( 'publish', 'future', 'private' ) ) || 0 == $post->ID ) { - if ( $can_publish ) : - if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : - ?> + post_status, array( 'publish', 'future', 'private' ) ) || 0 == $post->ID ) { + if ( $can_publish ) : + if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : + ?> - - + + - + ?> - + - +
    - + ?>
    - +
    - +
    @@ -418,7 +418,7 @@ function attachment_submit_meta_box( $post ) {
    - + ?>
    @@ -459,7 +459,7 @@ function post_format_meta_box( $post, $box ) {
    - + ?>
    @@ -521,10 +521,10 @@ function post_tags_meta_box( $post, $box ) {
      - +

      -checklist" data-wp-lists="list:" class="categorychecklist form-no-clear"> ID, array( + $post->ID, + array( 'taxonomy' => $tax_name, 'popular_cats' => $popular_ids, ) ); -?> + ?>
      cap->edit_terms ) ) : ?> @@ -657,18 +658,18 @@ function post_categories_meta_box( $post, $box ) { * @param object $post */ function post_excerpt_meta_box( $post ) { -?> + ?>

      -Learn more about manual excerpts.' ), __( 'https://codex.wordpress.org/Excerpt' ) ); -?> + ?>

      -'; } -?> + ?>

      -pingbacks, no other action necessary.' ), __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) ); -?> + ?>

      - + ?>
      -ID ); -foreach ( $metadata as $key => $value ) { - if ( is_protected_meta( $metadata[ $key ]['meta_key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ]['meta_key'] ) ) { - unset( $metadata[ $key ] ); + ID ); + foreach ( $metadata as $key => $value ) { + if ( is_protected_meta( $metadata[ $key ]['meta_key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ]['meta_key'] ) ) { + unset( $metadata[ $key ] ); + } } -} -list_meta( $metadata ); -meta_form( $post ); -?> + list_meta( $metadata ); + meta_form( $post ); + ?>

      -use in your theme.' ), __( 'https://codex.wordpress.org/Using_Custom_Fields' ) ); -?> + ?>

      - + ?>


      @@ -777,7 +778,7 @@ function post_comment_status_meta_box( $post ) { do_action( 'post_comment_status_meta_box-options', $post ); ?>

      -post_name, $post ); -?> + ?> - + ?> - 'authors', @@ -919,10 +920,10 @@ function page_attributes_meta_box( $post ) { $dropdown_args = apply_filters( 'page_attributes_dropdown_pages_args', $dropdown_args, $post ); $pages = wp_dropdown_pages( $dropdown_args ); if ( ! empty( $pages ) ) : -?> + ?>

      - - + page_template ) ? $post->page_template : false; ?>

      - +

      -post_type, 'page-attributes' ) ) : ?> + post_type, 'page-attributes' ) ) : ?>

      - -post_type && get_current_screen()->get_help_tabs() ) : ?> + + post_type && get_current_screen()->get_help_tabs() ) : ?>

      - + ?> - + ?>

      + _blank — new window or tab.' ); ?>

      + _top — current window or tab, with no frames.' ); ?>

      + _none — same window or tab.' ); ?>

      - + ?> @@ -1280,7 +1281,7 @@ function link_xfn_meta_box( $link ) {

      XFN.' ); ?>

      - + ?> @@ -1321,7 +1322,7 @@ function link_advanced_meta_box( $link ) { - + ?>


      - '', 'light' => '', - ), $_wp_admin_css_colors + ), + $_wp_admin_css_colors ) ); } @@ -897,7 +899,7 @@ function admin_color_scheme_picker( $user_id ) { endforeach; - ?> + ?> -
      -

      + review the guide and update your privacy policy.' ), esc_url( admin_url( 'tools.php?wp-privacy-policy-guide=1' ) ) ); - ?>

      + ?> +

      $old_data ) { @@ -1466,7 +1470,7 @@ final class WP_Privacy_Policy_Content { if ( ! empty( $old_data['updated'] ) ) { // 'updated' is now 'added'. - $done[] = array( + $done[] = array( 'plugin_name' => $old_data['plugin_name'], 'policy_text' => $old_data['policy_text'], 'added' => $old_data['updated'], @@ -1497,11 +1501,11 @@ final class WP_Privacy_Policy_Content { */ public static function get_suggested_policy_text() { $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); - $checked = array(); - $time = time(); - $update_cache = false; - $new = self::$policy_content; - $old = array(); + $checked = array(); + $time = time(); + $update_cache = false; + $new = self::$policy_content; + $old = array(); if ( $policy_page_id ) { $old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' ); @@ -1516,18 +1520,18 @@ final class WP_Privacy_Policy_Content { // Use the new plugin name in case it was changed, translated, etc. if ( $old_data['plugin_name'] !== $new_data['plugin_name'] ) { $old_data['plugin_name'] = $new_data['plugin_name']; - $update_cache = true; + $update_cache = true; } // A plugin was re-activated. if ( ! empty( $old_data['removed'] ) ) { unset( $old_data['removed'] ); $old_data['added'] = $time; - $update_cache = true; + $update_cache = true; } $checked[] = $old_data; - $found = true; + $found = true; } elseif ( $new_data['plugin_name'] === $old_data['plugin_name'] ) { // The info for the policy was updated. $checked[] = array( @@ -1535,7 +1539,7 @@ final class WP_Privacy_Policy_Content { 'policy_text' => $new_data['policy_text'], 'updated' => $time, ); - $found = $update_cache = true; + $found = $update_cache = true; } if ( $found ) { @@ -1636,10 +1640,10 @@ final class WP_Privacy_Policy_Content { $content_array = self::get_suggested_policy_text(); - $content = ''; - $toc = array( '
    • ' . __( 'Introduction' ) . '
    • ' ); - $date_format = __( 'F j, Y' ); - $copy = __( 'Copy' ); + $content = ''; + $toc = array( '
    • ' . __( 'Introduction' ) . '
    • ' ); + $date_format = __( 'F j, Y' ); + $copy = __( 'Copy' ); $return_to_top = '' . __( '↑ Return to Top' ) . ''; foreach ( $content_array as $section ) { @@ -1647,14 +1651,14 @@ final class WP_Privacy_Policy_Content { if ( ! empty( $section['removed'] ) ) { $class = ' text-removed'; - $date = date_i18n( $date_format, $section['removed'] ); + $date = date_i18n( $date_format, $section['removed'] ); $meta = sprintf( __( 'Removed %s.' ), $date ); $removed = __( 'You deactivated this plugin on %s and may no longer need this policy.' ); $removed = '

      ' . sprintf( $removed, $date ) . '

      '; } elseif ( ! empty( $section['updated'] ) ) { $class = ' text-updated'; - $date = date_i18n( $date_format, $section['updated'] ); + $date = date_i18n( $date_format, $section['updated'] ); $meta = sprintf( __( 'Updated %s.' ), $date ); } @@ -1663,8 +1667,8 @@ final class WP_Privacy_Policy_Content { } $plugin_name = esc_html( $section['plugin_name'] ); - $toc_id = 'wp-privacy-policy-guide-' . sanitize_title( $plugin_name ); - $toc[] = sprintf( '
    • %2$s' . $meta . '
    • ', $toc_id, $plugin_name ); + $toc_id = 'wp-privacy-policy-guide-' . sanitize_title( $plugin_name ); + $toc[] = sprintf( '
    • %2$s' . $meta . '
    • ', $toc_id, $plugin_name ); $content .= '
      '; $content .= ' '; @@ -1676,12 +1680,12 @@ final class WP_Privacy_Policy_Content { $content .= $return_to_top; if ( empty( $section['removed'] ) ) { - $content .= '
      '; - $content .= ''; - $content .= '
      '; + $content .= ''; + $content .= '
      '; } $content .= "
      \n"; // End of .privacy-text-section. @@ -1727,17 +1731,17 @@ final class WP_Privacy_Policy_Content { */ public static function get_default_content( $descr = false ) { $suggested_text = $descr ? '' . __( 'Suggested text:' ) . ' ' : ''; - $content = ''; + $content = ''; // Start of the suggested privacy policy text. $descr && $content .= '
      '; - $content .= + $content .= '

      ' . __( 'Who we are' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should note your site URL, as well as the name of the company, organization, or individual behind it, and some accurate contact information.' ) . '

      ' . '

      ' . __( 'The amount of information you may be required to show will vary depending on your local or national business regulations. You may, for example, be required to display a physical address, a registered address, or your company registration number.' ) . '

      '; - $content .= + $content .= /* translators: %s Site URL */ '

      ' . $suggested_text . sprintf( __( 'Our website address is: %s.' ), get_bloginfo( 'url', 'display' ) ) . '

      ' . @@ -1749,29 +1753,29 @@ final class WP_Privacy_Policy_Content { '

      ' . __( 'Personal data is not just created by a user’s interactions with your site. Personal data is also generated from technical processes such as contact forms, comments, cookies, analytics, and third party embeds.' ) . '

      ' . '

      ' . __( 'By default WordPress does not collect any personal data about visitors, and only collects the data shown on the User Profile screen from registered users. However some of your plugins may collect personal data. You should add the relevant information below.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'Comments' ) . '

      '; $descr && $content .= '

      ' . __( 'In this subsection you should note what information is captured through comments. We have noted the data which WordPress collects by default.' ) . '

      '; - $content .= + $content .= '

      ' . $suggested_text . __( 'When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.' ) . '

      ' . '

      ' . __( 'An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.' ) . '

      ' . '

      ' . __( 'Media' ) . '

      '; $descr && $content .= '

      ' . __( 'In this subsection you should note what information may be disclosed by users who can upload media files. All uploaded files are usually publicly accessible.' ) . '

      '; - $content .= + $content .= '

      ' . $suggested_text . __( 'If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.' ) . '

      ' . '

      ' . __( 'Contact forms' ) . '

      '; $descr && $content .= '

      ' . __( 'By default, WordPress does not include a contact form. If you use a contact form plugin, use this subsection to note what personal data is captured when someone submits a contact form, and how long you keep it. For example, you may note that you keep contact form submissions for a certain period for customer service purposes, but you do not use the information submitted through them for marketing purposes.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'Cookies' ) . '

      '; $descr && $content .= '

      ' . __( 'In this subsection you should list the cookies your web site uses, including those set by your plugins, social media, and analytics. We have provided the cookies which WordPress installs by default.' ) . '

      '; - $content .= + $content .= '

      ' . $suggested_text . __( 'If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.' ) . '

      ' . '

      ' . __( 'If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.' ) . '

      ' . '

      ' . __( 'When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.' ) . '

      ' . @@ -1786,63 +1790,63 @@ final class WP_Privacy_Policy_Content { '

      ' . __( 'In this subsection you should note what analytics package you use, how users can opt out of analytics tracking, and a link to your analytics provider’s privacy policy, if any.' ) . '

      ' . '

      ' . __( 'By default WordPress does not collect any analytics data. However, many web hosting accounts collect some anonymous analytics data. You may also have installed a WordPress plugin that provides analytics services. In that case, add information from that plugin here.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'Who we share your data with' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should name and list all third party providers with whom you share site data, including partners, cloud-based services, payment processors, and third party service providers, and note what data you share with them and why. Link to their own privacy policies if possible.' ) . '

      ' . '

      ' . __( 'By default WordPress does not share any personal data with anyone.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'How long we retain your data' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should explain how long you retain personal data collected or processed by the web site. While it is your responsibility to come up with the schedule of how long you keep each dataset for and why you keep it, that information does need to be listed here. For example, you may want to say that you keep contact form entries for six months, analytics records for a year, and customer purchase records for ten years.' ) . '

      '; - $content .= + $content .= '

      ' . $suggested_text . __( 'If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.' ) . '

      ' . '

      ' . __( 'For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.' ) . '

      ' . '

      ' . __( 'What rights you have over your data' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should explain what rights your users have over their data and how they can invoke those rights.' ) . '

      '; - $content .= + $content .= '

      ' . $suggested_text . __( 'If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.' ) . '

      ' . '

      ' . __( 'Where we send your data' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should list all transfers of your site data outside the European Union and describe the means by which that data is safeguarded to European data protection standards. This could include your web hosting, cloud storage, or other third party services.' ) . '

      ' . '

      ' . __( 'European data protection law requires data about European residents which is transferred outside the European Union to be safeguarded to the same standards as if the data was in Europe. So in addition to listing where data goes, you should describe how you ensure that these standards are met either by yourself or by your third party providers, whether that is through an agreement such as Privacy Shield, model clauses in your contracts, or binding corporate rules.' ) . '

      '; - $content .= + $content .= '

      ' . $suggested_text . __( 'Visitor comments may be checked through an automated spam detection service.' ) . '

      ' . '

      ' . __( 'Your contact information' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should provide a contact method for privacy-specific concerns. If you are required to have a Data Protection Officer, list their name and full contact details here as well.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'Additional information' ) . '

      '; $descr && $content .= '

      ' . __( 'If you use your site for commercial purposes and you engage in more complex collection or processing of personal data, you should note the following information in your privacy policy in addition to the information we have already discussed.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'How we protect your data' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should explain what measures you have taken to protect your users’ data. This could include technical measures such as encryption; security measures such as two factor authentication; and measures such as staff training in data protection. If you have carried out a Privacy Impact Assessment, you can mention it here too.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'What data breach procedures we have in place' ) . '

      '; $descr && $content .= '

      ' . __( 'In this section you should explain what procedures you have in place to deal with data breaches, either potential or real, such as internal reporting systems, contact mechanisms, or bug bounties.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'What third parties we receive data from' ) . '

      '; $descr && $content .= '

      ' . __( 'If your web site receives data about users from third parties, including advertisers, this information must be included within the section of your privacy policy dealing with third party data.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'What automated decision making and/or profiling we do with user data' ) . '

      '; $descr && $content .= '

      ' . __( 'If your web site provides a service which includes automated decision making - for example, allowing customers to apply for credit, or aggregating their data into an advertising profile - you must note that this is taking place, and include information about how that information is used, what decisions are made with that aggregated data, and what rights users have over decisions made without human intervention.' ) . '

      '; - $content .= + $content .= '

      ' . __( 'Industry regulatory disclosure requirements' ) . '

      '; $descr && $content .= '

      ' . __( 'If you are a member of a regulated industry, or if you are subject to additional privacy laws, you may be required to disclose that information here.' ) . '

      ' . diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index c5b73c1752..2b60a22b87 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -961,11 +961,11 @@ function can_edit_network( $network_id ) { * @access private */ function _thickbox_path_admin_subfolder() { -?> + ?> -

      - + ?>

      @@ -1084,7 +1084,7 @@ function confirm_delete_users( $users ) { endif; submit_button( __( 'Confirm Deletion' ), 'primary' ); - ?> +?> + ?> - array( 'label' => __( 'Info' ), 'url' => 'site-info.php', @@ -1173,7 +1174,8 @@ function network_edit_site_nav( $args = array() ) { // Parse arguments $r = wp_parse_args( - $args, array( + $args, + array( 'blog_id' => isset( $_GET['blog_id'] ) ? (int) $_GET['blog_id'] : 0, 'links' => $links, 'selected' => 'site-info', diff --git a/wp-admin/includes/nav-menu.php b/wp-admin/includes/nav-menu.php index 3276b56406..395f787ab7 100644 --- a/wp-admin/includes/nav-menu.php +++ b/wp-admin/includes/nav-menu.php @@ -105,7 +105,8 @@ function _wp_ajax_menu_quick_search( $request = array() ) { } } elseif ( 'taxonomy' == $matches[1] ) { $terms = get_terms( - $matches[2], array( + $matches[2], + array( 'name__like' => $query, 'number' => 10, ) @@ -149,7 +150,8 @@ function wp_nav_menu_setup() { if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) { $user = wp_get_current_user(); update_user_option( - $user->ID, 'managenav-menuscolumnshidden', + $user->ID, + 'managenav-menuscolumnshidden', array( 0 => 'link-target', 1 => 'css-classes', @@ -439,7 +441,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
        'post_date', 'order' => 'DESC', 'posts_per_page' => 15, @@ -530,7 +533,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) { } else { $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1; array_unshift( - $posts, (object) array( + $posts, + (object) array( 'front_or_home' => true, 'ID' => 0, 'object_id' => $_nav_menu_placeholder, @@ -551,7 +555,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $box ) { if ( $post_type->has_archive ) { $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval( $_nav_menu_placeholder ) - 1 : -1; array_unshift( - $posts, (object) array( + $posts, + (object) array( 'ID' => 0, 'object_id' => $_nav_menu_placeholder, 'object' => $post_type_name, @@ -677,8 +682,10 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { $num_pages = ceil( wp_count_terms( - $taxonomy_name, array_merge( - $args, array( + $taxonomy_name, + array_merge( + $args, + array( 'number' => '', 'offset' => '', ) @@ -763,7 +770,8 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
          'count', 'order' => 'DESC', 'number' => 10, @@ -800,7 +808,8 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { if ( isset( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ) ) { $searched = esc_attr( $_REQUEST[ 'quick-search-taxonomy-' . $taxonomy_name ] ); $search_results = get_terms( - $taxonomy_name, array( + $taxonomy_name, + array( 'name__like' => $searched, 'fields' => 'all', 'orderby' => 'count', @@ -1096,7 +1105,8 @@ function _wp_delete_orphaned_draft_menu_items() { */ function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selected_title ) { $unsorted_menu_items = wp_get_nav_menu_items( - $nav_menu_selected_id, array( + $nav_menu_selected_id, + array( 'orderby' => 'ID', 'output' => ARRAY_A, 'output_key' => 'ID', diff --git a/wp-admin/includes/network.php b/wp-admin/includes/network.php index cefd63f564..9c05ec8d6a 100644 --- a/wp-admin/includes/network.php +++ b/wp-admin/includes/network.php @@ -217,7 +217,7 @@ function network_step1( $errors = false ) { } if ( allow_subdomain_install() && allow_subdirectory_install() ) : - ?> + ?>

          @@ -250,7 +250,7 @@ function network_step1( $errors = false ) { -' . $hostname . '' ); - ?> + ?> @@ -411,15 +411,15 @@ function network_step2( $errors = false ) { } else { if ( is_multisite() ) { $subdomain_install = is_subdomain_install(); -?> + ?>

          -get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = 1 AND meta_key = 'subdomain_install'" ); -?> + ?>

          - + ?>

          @@ -459,9 +459,9 @@ function network_step2( $errors = false ) { } ?>

          - + ?>
          1. '); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); - '', 'SECURE_AUTH_KEY' => '', @@ -498,58 +498,58 @@ define('BLOG_ID_CURRENT_SITE', 1); 'LOGGED_IN_SALT' => '', 'NONCE_SALT' => '', ); -foreach ( $keys_salts as $c => $v ) { - if ( defined( $c ) ) { - unset( $keys_salts[ $c ] ); + foreach ( $keys_salts as $c => $v ) { + if ( defined( $c ) ) { + unset( $keys_salts[ $c ] ); + } } -} -if ( ! empty( $keys_salts ) ) { - $keys_salts_str = ''; - $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); - if ( is_wp_error( $from_api ) ) { - foreach ( $keys_salts as $c => $v ) { - $keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );"; + if ( ! empty( $keys_salts ) ) { + $keys_salts_str = ''; + $from_api = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/salt/' ); + if ( is_wp_error( $from_api ) ) { + foreach ( $keys_salts as $c => $v ) { + $keys_salts_str .= "\ndefine( '$c', '" . wp_generate_password( 64, true, true ) . "' );"; + } + } else { + $from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) ); + foreach ( $keys_salts as $c => $v ) { + $keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );"; + } } - } else { - $from_api = explode( "\n", wp_remote_retrieve_body( $from_api ) ); - foreach ( $keys_salts as $c => $v ) { - $keys_salts_str .= "\ndefine( '$c', '" . substr( array_shift( $from_api ), 28, 64 ) . "' );"; - } - } - $num_keys_salts = count( $keys_salts ); -?> + $num_keys_salts = count( $keys_salts ); + ?>

            - wp-config.php' - ); - } else { - printf( - /* translators: %s: wp-config.php */ - __( 'These unique authentication keys are also missing from your %s file.' ), - 'wp-config.php' - ); - } + wp-config.php' + ); + } else { + printf( + /* translators: %s: wp-config.php */ + __( 'These unique authentication keys are also missing from your %s file.' ), + 'wp-config.php' + ); + } ?>

            - +
          2. - + $web_config_file = ' @@ -558,13 +558,13 @@ if ( iis7_supports_permalinks() ) : '; - if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { - $web_config_file .= ' + if ( is_multisite() && get_site_option( 'ms_files_rewriting' ) ) { + $web_config_file .= ' '; - } + } $web_config_file .= ' @@ -603,16 +603,16 @@ if ( iis7_supports_permalinks() ) : 'web.config', '' . $home_path . '' ); - echo '

            '; - if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) { - echo '

            ' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '

            '; - } - ?> + echo '

            '; + if ( ! $subdomain_install && WP_CONTENT_DIR != ABSPATH . 'wp-content' ) { + echo '

            ' . __( 'Warning:' ) . ' ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '

            '; + } + ?>
          - + -

          - + ?> - + ?> - + ?> - __( '%s plugin' ), 'multiple_text' => __( '%s plugins' ), ) @@ -331,7 +332,7 @@ function install_search_form( $deprecated = true ) { * @since 2.8.0 */ function install_plugins_upload() { -?> + ?>

          @@ -341,7 +342,7 @@ function install_plugins_upload() {
          - wp_unslash( $_REQUEST['plugin'] ), + 'plugin_information', + array( + 'slug' => wp_unslash( $_REQUEST['plugin'] ), ) ); @@ -690,13 +692,13 @@ function install_plugin_information() { 'number' => $api->num_ratings, ) ); -?> + ?> - ratings ) && array_sum( (array) $api->ratings ) > 0 ) { - ?> + ?>

          ratings ) && array_sum( (array) $api->ratings ) > 0 ) { } } if ( ! empty( $api->contributors ) ) { - ?> + ?>

            contributors ) ) { $contrib_name = esc_html( $contrib_name ); $contrib_profile = esc_url( $contrib_details['profile'] ); - $contrib_avatar = esc_url( add_query_arg( 's', '36', $contrib_details['avatar'] ) ); + $contrib_avatar = esc_url( add_query_arg( 's', '36', $contrib_details['avatar'] ) ); echo "
          • {$contrib_name}
          • "; } diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index bb90aff606..6f6935fac4 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -239,7 +239,8 @@ function edit_post( $post_data = null ) { if ( post_type_supports( $ptype->name, 'revisions' ) ) { $revisions = wp_get_post_revisions( - $post_ID, array( + $post_ID, + array( 'order' => 'ASC', 'posts_per_page' => 1, ) @@ -955,8 +956,10 @@ function has_meta( $postid ) { $wpdb->prepare( "SELECT meta_key, meta_value, meta_id, post_id FROM $wpdb->postmeta WHERE post_id = %d - ORDER BY meta_key,meta_id", $postid - ), ARRAY_A + ORDER BY meta_key,meta_id", + $postid + ), + ARRAY_A ); } @@ -1701,7 +1704,7 @@ function _admin_notice_post_locked() { - +?>

      $term, 'fields' => 'ids', 'hide_empty' => false, diff --git a/wp-admin/includes/revision.php b/wp-admin/includes/revision.php index f431493fc1..1f03ae7108 100644 --- a/wp-admin/includes/revision.php +++ b/wp-admin/includes/revision.php @@ -110,7 +110,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { if ( ! $diff && 'post_title' === $field ) { // It's a better user experience to still show the Title, even if it didn't change. // No, you didn't see this. - $diff = ''; + $diff = '
      '; // In split screen mode, show the title before/after side by side. if ( true === $args['show_split_view'] ) { @@ -124,7 +124,7 @@ function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) { } } - $diff .= ''; + $diff .= ''; $diff .= '
      '; } @@ -167,7 +167,8 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null $now_gmt = time(); $revisions = wp_get_post_revisions( - $post->ID, array( + $post->ID, + array( 'order' => 'ASC', 'check_enabled' => false, ) @@ -194,7 +195,9 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id, $from = null $modified_gmt = strtotime( $revision->post_modified_gmt . ' +0000' ); if ( $can_restore ) { $restore_link = str_replace( - '&', '&', wp_nonce_url( + '&', + '&', + wp_nonce_url( add_query_arg( array( 'revision' => $revision->ID, @@ -394,7 +397,7 @@ function wp_print_revision_templates() { __( 'Autosave by %s' ), '{{ data.attributes.author.name }}' ); - ?> + ?> <# } else if ( data.attributes.current ) { #> <# } else { #> <# } #> {{ data.attributes.timeAgo }} diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php index a41f9b5e5b..4611eadc9f 100644 --- a/wp-admin/includes/schema.php +++ b/wp-admin/includes/schema.php @@ -1027,7 +1027,8 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam if ( 1 == $network_id ) { $wpdb->insert( - $wpdb->site, array( + $wpdb->site, + array( 'domain' => $domain, 'path' => $path, ) @@ -1035,7 +1036,8 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam $network_id = $wpdb->insert_id; } else { $wpdb->insert( - $wpdb->site, array( + $wpdb->site, + array( 'domain' => $domain, 'path' => $path, 'id' => $network_id, @@ -1082,7 +1084,7 @@ We hope you enjoy your new site. Thanks! --The Team @ SITE_NAME' ); - $misc_exts = array( + $misc_exts = array( // Images. 'jpg', 'jpeg', @@ -1179,7 +1181,8 @@ We hope you enjoy your new site. Thanks! $current_site->path = $path; $current_site->site_name = ucfirst( $domain ); $wpdb->insert( - $wpdb->blogs, array( + $wpdb->blogs, + array( 'site_id' => $network_id, 'blog_id' => 1, 'domain' => $domain, @@ -1207,7 +1210,8 @@ We hope you enjoy your new site. Thanks! $errstr = ''; $hostname = substr( md5( time() ), 0, 6 ) . '.' . $domain; // Very random hostname! $page = wp_remote_get( - 'http://' . $hostname, array( + 'http://' . $hostname, + array( 'timeout' => 5, 'httpversion' => '1.1', ) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 2de6c20ffb..22ef697fe9 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -39,7 +39,8 @@ require_once( ABSPATH . 'wp-admin/includes/class-wp-internal-pointers.php' ); */ function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) { wp_terms_checklist( - $post_id, array( + $post_id, + array( 'taxonomy' => 'category', 'descendants_and_self' => $descendants_and_self, 'selected_cats' => $selected_cats, @@ -128,7 +129,8 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) { $args['popular_cats'] = $r['popular_cats']; } else { $args['popular_cats'] = get_terms( - $taxonomy, array( + $taxonomy, + array( 'fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', @@ -139,7 +141,8 @@ function wp_terms_checklist( $post_id = 0, $args = array() ) { } if ( $descendants_and_self ) { $categories = (array) get_terms( - $taxonomy, array( + $taxonomy, + array( 'child_of' => $descendants_and_self, 'hierarchical' => 0, 'hide_empty' => 0, @@ -204,7 +207,8 @@ function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $ech } $terms = get_terms( - $taxonomy, array( + $taxonomy, + array( 'orderby' => 'count', 'order' => 'DESC', 'number' => $number, @@ -262,7 +266,8 @@ function wp_link_category_checklist( $link_id = 0 ) { } $categories = get_terms( - 'link_category', array( + 'link_category', + array( 'orderby' => 'name', 'hide_empty' => 0, ) @@ -404,7 +409,9 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $ * @param array $args An array of default args. */ $content = apply_filters( - 'wp_comment_reply', '', array( + 'wp_comment_reply', + '', + array( 'position' => $position, 'checkbox' => $checkbox, 'mode' => $mode, @@ -424,9 +431,9 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $ } } -?> + ?>
      - +
      - +
      - + - + ?> - + ?> @@ -558,14 +567,14 @@ function list_meta( $meta ) { - +
      - + ?>

      @@ -689,18 +698,18 @@ function meta_form( $post = null ) {
      - + @@ -715,20 +724,24 @@ foreach ( $keys as $key ) {
      - 'newmeta-submit', - 'data-wp-lists' => 'add:the-list:newmeta', - ) -); -?> + 'newmeta-submit', + 'data-wp-lists' => 'add:the-list:newmeta', + ) + ); + ?>
      - +
      -' . "\n"; } -?> + ?>

      -

      + ?>

      () @@ -942,9 +955,9 @@ function wp_import_upload_form( $action ) {

      - +
      -id; - $hidden = get_hidden_meta_boxes( $screen ); + $hidden = get_hidden_meta_boxes( $screen ); ?>

      - + - + ?>

      diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 425460e7dd..f67886aaf1 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -183,7 +183,8 @@ function get_theme_update_available( $theme ) { 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800, - ), $update['url'] + ), + $update['url'] ); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. $update_url = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet ); diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index d8e1fe84d9..171aa84c52 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -34,7 +34,8 @@ function get_core_updates( $options = array() ) { array( 'available' => true, 'dismissed' => false, - ), $options + ), + $options ); $dismissed = get_site_option( 'dismissed_update_core' ); @@ -549,7 +550,8 @@ function wp_theme_update_row( $theme_key, $theme ) { 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800, - ), $current->response[ $theme_key ]['url'] + ), + $current->response[ $theme_key ]['url'] ); /** @var WP_MS_Themes_List_Table $wp_list_table */ diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 85439b430a..f8b871db49 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -147,7 +147,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : $cat_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) ); if ( $cat_id == null ) { $wpdb->insert( - $wpdb->sitecategories, array( + $wpdb->sitecategories, + array( 'cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, @@ -162,7 +163,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : } $wpdb->insert( - $wpdb->terms, array( + $wpdb->terms, + array( 'term_id' => $cat_id, 'name' => $cat_name, 'slug' => $cat_slug, @@ -170,7 +172,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : ) ); $wpdb->insert( - $wpdb->term_taxonomy, array( + $wpdb->term_taxonomy, + array( 'term_id' => $cat_id, 'taxonomy' => 'category', 'description' => '', @@ -206,7 +209,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : } $wpdb->insert( - $wpdb->posts, array( + $wpdb->posts, + array( 'post_author' => $user_id, 'post_date' => $now, 'post_date_gmt' => $now_gmt, @@ -225,7 +229,8 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : ) ); $wpdb->insert( - $wpdb->term_relationships, array( + $wpdb->term_relationships, + array( 'term_taxonomy_id' => $cat_tt_id, 'object_id' => 1, ) @@ -248,7 +253,8 @@ To get started with moderating, editing, and deleting comments, please visit the Commenter avatars come from Gravatar.' ); $wpdb->insert( - $wpdb->comments, array( + $wpdb->comments, + array( 'comment_post_ID' => 1, 'comment_author' => $first_comment_author, 'comment_author_email' => $first_comment_email, @@ -275,12 +281,14 @@ Commenter avatars come from Gravatar.'
      The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickeys to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.
      As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!" - ), admin_url() + ), + admin_url() ); $first_post_guid = get_option( 'home' ) . '/?page_id=2'; $wpdb->insert( - $wpdb->posts, array( + $wpdb->posts, + array( 'post_author' => $user_id, 'post_date' => $now, 'post_date_gmt' => $now_gmt, @@ -300,7 +308,8 @@ As a new WordPress user, you should go to your dashboard to d ) ); $wpdb->insert( - $wpdb->postmeta, array( + $wpdb->postmeta, + array( 'post_id' => 2, 'meta_key' => '_wp_page_template', 'meta_value' => 'default', @@ -323,7 +332,8 @@ As a new WordPress user, you should go to your dashboard to d $privacy_policy_guid = get_option( 'home' ) . '/?page_id=3'; $wpdb->insert( - $wpdb->posts, array( + $wpdb->posts, + array( 'post_author' => $user_id, 'post_date' => $now, 'post_date_gmt' => $now_gmt, @@ -344,7 +354,8 @@ As a new WordPress user, you should go to your dashboard to d ) ); $wpdb->insert( - $wpdb->postmeta, array( + $wpdb->postmeta, + array( 'post_id' => 3, 'meta_key' => '_wp_page_template', 'meta_value' => 'default', @@ -355,13 +366,15 @@ As a new WordPress user, you should go to your dashboard to d // Set up default widgets for default theme. update_option( - 'widget_search', array( + 'widget_search', + array( 2 => array( 'title' => '' ), '_multiwidget' => 1, ) ); update_option( - 'widget_recent-posts', array( + 'widget_recent-posts', + array( 2 => array( 'title' => '', 'number' => 5, @@ -370,7 +383,8 @@ As a new WordPress user, you should go to your dashboard to d ) ); update_option( - 'widget_recent-comments', array( + 'widget_recent-comments', + array( 2 => array( 'title' => '', 'number' => 5, @@ -379,7 +393,8 @@ As a new WordPress user, you should go to your dashboard to d ) ); update_option( - 'widget_archives', array( + 'widget_archives', + array( 2 => array( 'title' => '', 'count' => 0, @@ -389,7 +404,8 @@ As a new WordPress user, you should go to your dashboard to d ) ); update_option( - 'widget_categories', array( + 'widget_categories', + array( 2 => array( 'title' => '', 'count' => 0, @@ -400,13 +416,15 @@ As a new WordPress user, you should go to your dashboard to d ) ); update_option( - 'widget_meta', array( + 'widget_meta', + array( 2 => array( 'title' => '' ), '_multiwidget' => 1, ) ); update_option( - 'sidebars_widgets', array( + 'sidebars_widgets', + array( 'wp_inactive_widgets' => array(), 'sidebar-1' => array( 0 => 'search-2', @@ -442,7 +460,8 @@ As a new WordPress user, you should go to your dashboard to d // Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id. if ( ! is_super_admin( $user_id ) && $user_id != 1 ) { $wpdb->delete( - $wpdb->usermeta, array( + $wpdb->usermeta, + array( 'user_id' => $user_id, 'meta_key' => $wpdb->base_prefix . '1_capabilities', ) @@ -564,7 +583,11 @@ We hope you enjoy your new site. Thanks! --The WordPress Team https://wordpress.org/ ' - ), $blog_url, $name, $password, $login_url + ), + $blog_url, + $name, + $password, + $login_url ); @wp_mail( $email, __( 'New WordPress Site' ), $message ); @@ -832,7 +855,8 @@ function upgrade_100() { $cat = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->post2cat WHERE post_id = %d AND category_id = %d", $post->ID, $post->post_category ) ); if ( ! $cat && 0 != $post->post_category ) { // If there's no result $wpdb->insert( - $wpdb->post2cat, array( + $wpdb->post2cat, + array( 'post_id' => $post->ID, 'category_id' => $post->post_category, ) @@ -1116,7 +1140,8 @@ function upgrade_160() { $objects = $wpdb->get_results( "SELECT ID, post_type FROM $wpdb->posts WHERE post_status = 'object'" ); foreach ( $objects as $object ) { $wpdb->update( - $wpdb->posts, array( + $wpdb->posts, + array( 'post_status' => 'attachment', 'post_mime_type' => $object->post_type, 'post_type' => '', @@ -1234,7 +1259,11 @@ function upgrade_230() { $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->terms (term_id, name, slug, term_group) VALUES - (%d, %s, %s, %d)", $term_id, $name, $slug, $term_group + (%d, %s, %s, %d)", + $term_id, + $name, + $slug, + $term_group ) ); @@ -1288,7 +1317,8 @@ function upgrade_230() { } $wpdb->insert( - $wpdb->term_relationships, array( + $wpdb->term_relationships, + array( 'object_id' => $post_id, 'term_taxonomy_id' => $tt_id, ) @@ -1327,7 +1357,8 @@ function upgrade_230() { $default_link_cat = $term_id; $wpdb->insert( - $wpdb->term_taxonomy, array( + $wpdb->term_taxonomy, + array( 'term_id' => $term_id, 'taxonomy' => 'link_category', 'description' => '', @@ -1355,7 +1386,8 @@ function upgrade_230() { } $wpdb->insert( - $wpdb->term_relationships, array( + $wpdb->term_relationships, + array( 'object_id' => $link->link_id, 'term_taxonomy_id' => $tt_id, ) @@ -1376,7 +1408,8 @@ function upgrade_230() { continue; } $wpdb->insert( - $wpdb->term_relationships, array( + $wpdb->term_relationships, + array( 'object_id' => $link_id, 'term_taxonomy_id' => $tt_id, ) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 26b5e49c72..4634c8e318 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -537,7 +537,7 @@ jQuery(document).ready( function($) { }); }); - + ?> - $request_id, - 'post_status' => 'request-completed', - ) ); + $request = wp_update_post( + array( + 'ID' => $request_id, + 'post_status' => 'request-completed', + ) + ); return $request; } @@ -753,29 +758,33 @@ function _wp_personal_data_handle_actions() { */ function _wp_personal_data_cleanup_requests() { /** This filter is documented in wp-includes/user.php */ - $expires = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS ); + $expires = (int) apply_filters( 'user_request_key_expiration', DAY_IN_SECONDS ); - $requests_query = new WP_Query( array( - 'post_type' => 'user_request', - 'posts_per_page' => -1, - 'post_status' => 'request-pending', - 'fields' => 'ids', - 'date_query' => array( - array( - 'column' => 'post_modified_gmt', - 'before' => $expires . ' seconds ago', + $requests_query = new WP_Query( + array( + 'post_type' => 'user_request', + 'posts_per_page' => -1, + 'post_status' => 'request-pending', + 'fields' => 'ids', + 'date_query' => array( + array( + 'column' => 'post_modified_gmt', + 'before' => $expires . ' seconds ago', + ), ), - ), - ) ); + ) + ); $request_ids = $requests_query->posts; foreach ( $request_ids as $request_id ) { - wp_update_post( array( - 'ID' => $request_id, - 'post_status' => 'request-failed', - 'post_password' => '', - ) ); + wp_update_post( + array( + 'ID' => $request_id, + 'post_status' => 'request-failed', + 'post_password' => '', + ) + ); } } @@ -796,10 +805,12 @@ function _wp_personal_data_export_page() { // "Borrow" xfn.js for now so we don't have to create new files. wp_enqueue_script( 'xfn' ); - $requests_table = new WP_Privacy_Data_Export_Requests_Table( array( - 'plural' => 'privacy_requests', - 'singular' => 'privacy_request', - ) ); + $requests_table = new WP_Privacy_Data_Export_Requests_Table( + array( + 'plural' => 'privacy_requests', + 'singular' => 'privacy_request', + ) + ); $requests_table->process_bulk_action(); $requests_table->prepare_items(); ?> @@ -867,10 +878,12 @@ function _wp_personal_data_removal_page() { // "Borrow" xfn.js for now so we don't have to create new files. wp_enqueue_script( 'xfn' ); - $requests_table = new WP_Privacy_Data_Removal_Requests_Table( array( - 'plural' => 'privacy_requests', - 'singular' => 'privacy_request', - ) ); + $requests_table = new WP_Privacy_Data_Removal_Requests_Table( + array( + 'plural' => 'privacy_requests', + 'singular' => 'privacy_request', + ) + ); $requests_table->process_bulk_action(); $requests_table->prepare_items(); @@ -1013,7 +1026,7 @@ function _wp_privacy_hook_requests_page() { */ function _wp_privacy_requests_screen_options() { $args = array( - 'option' => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page', + 'option' => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page', ); add_screen_option( 'per_page', $args ); } @@ -1175,8 +1188,8 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { public function process_bulk_action() { $action = $this->current_action(); $request_ids = isset( $_REQUEST['request_id'] ) ? wp_parse_id_list( wp_unslash( $_REQUEST['request_id'] ) ) : array(); - - $count = 0; + + $count = 0; if ( $request_ids ) { check_admin_referer( 'bulk-privacy_requests' ); @@ -1502,10 +1515,18 @@ class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table { submit_button( __( 'Retry' ), 'secondary', 'privacy_action_email_retry[' . $item->ID . ']', false ); break; case 'request-completed': - echo '' . esc_html__( 'Remove request' ) . ''; + echo '' . esc_html__( 'Remove request' ) . ''; break; } } @@ -1616,10 +1637,18 @@ class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table { submit_button( __( 'Retry' ), 'secondary', 'privacy_action_email_retry[' . $item->ID . ']', false ); break; case 'request-completed': - echo '' . esc_html__( 'Remove request' ) . ''; + echo '' . esc_html__( 'Remove request' ) . ''; break; } } diff --git a/wp-admin/includes/widgets.php b/wp-admin/includes/widgets.php index 640e00afe4..e16d459cb1 100644 --- a/wp-admin/includes/widgets.php +++ b/wp-admin/includes/widgets.php @@ -299,9 +299,9 @@ function wp_widget_control( $sidebar_args ) {
      - +
      - + ?>
      diff --git a/wp-admin/install.php b/wp-admin/install.php index 019e907b35..ce5849204f 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -8,7 +8,7 @@ // Sanity check. if ( false ) { -?> + ?> @@ -21,7 +21,7 @@ if ( false ) {

      WordPress requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.

      - + ?> > @@ -79,7 +79,7 @@ function display_header( $body_classes = '' ) { - + ?>

      @@ -129,7 +129,7 @@ function display_setup_form( $error = null ) { ?>

      - @@ -189,7 +189,7 @@ function display_setup_form( $error = null ) { + ?> />
      /> @@ -199,7 +199,7 @@ function display_setup_form( $error = null ) { /** This action is documented in wp-admin/options-reading.php */ do_action( 'blog_privacy_selector' ); } else { - ?> + ?>

      @@ -211,7 +211,7 @@ function display_setup_form( $error = null ) {

      'submit' ) ); ?>

      - + ?>

      -show_errors(); $result = wp_install( $weblog_title, $user_name, $admin_email, $public, '', wp_slash( $admin_password ), $loaded_language ); -?> + ?>

      @@ -390,9 +390,9 @@ switch ( $step ) { - +

      @@ -402,7 +402,7 @@ switch ( $step ) {

      -' . __( 'WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.' ) . '

      '; } -?> + ?>

      - diff --git a/wp-admin/media.php b/wp-admin/media.php index 95fcd28249..40619ea62e 100644 --- a/wp-admin/media.php +++ b/wp-admin/media.php @@ -113,18 +113,18 @@ switch ( $action ) { echo "

      $message

      \n"; } - ?> + ?>

      - +

      - + @@ -132,39 +132,40 @@ if ( current_user_can( 'upload_files' ) ) {

      - +

      - false, - 'send' => false, - 'delete' => false, - 'show_title' => false, - 'errors' => ! empty( $errors[ $att_id ] ) ? $errors[ $att_id ] : null, - ) - ); -?> + false, + 'send' => false, + 'delete' => false, + 'show_title' => false, + 'errors' => ! empty( $errors[ $att_id ] ) ? $errors[ $att_id ] : null, + ) + ); + ?>
      - + - - + +
      -

      -

      Delete My Site Permanently you will be sent an email with a link in it. Click on this link to delete your site.' ), get_network()->site_name ); ?>

      diff --git a/wp-admin/my-sites.php b/wp-admin/my-sites.php index 588afb06a0..174fb2dc84 100644 --- a/wp-admin/my-sites.php +++ b/wp-admin/my-sites.php @@ -77,7 +77,7 @@ if ( empty( $blogs ) ) : _e( 'You must be a member of at least one site to use this page.' ); echo '

      '; else : -?> + ?>
      diff --git a/wp-admin/nav-menus.php b/wp-admin/nav-menus.php index 596abe3d71..14652cb9de 100644 --- a/wp-admin/nav-menus.php +++ b/wp-admin/nav-menus.php @@ -611,7 +611,8 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); array( array( 'autofocus' => $focus ), 'return' => urlencode( remove_query_arg( wp_removable_query_args(), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ), - ), admin_url( 'customize.php' ) + ), + admin_url( 'customize.php' ) ) ), __( 'Manage with Live Preview' ) @@ -652,7 +653,7 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); } else { echo '

      ' . sprintf( _n( 'Your theme supports %s menu. Select which menu appears in each location.', 'Your theme supports %s menus. Select which menu appears in each location.', $num_locations ), number_format_i18n( $num_locations ) ) . '

      '; } - ?> + ?> - 'error_scrape', 'plugin' => urlencode( $plugin ), '_wpnonce' => urlencode( $_GET['_error_nonce'] ), - ), admin_url( 'plugins.php' ) + ), + admin_url( 'plugins.php' ) ); - ?> + ?> -
      - + ?> - 1, 'ids' => $post_id, - ), $sendback + ), + $sendback ) ); exit(); diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php index c021aa6b3d..666e42b771 100644 --- a/wp-admin/press-this.php +++ b/wp-admin/press-this.php @@ -33,8 +33,10 @@ function wp_load_press_this() { 'action' => 'activate', 'plugin' => $plugin_file, 'from' => 'press-this', - ), admin_url( 'plugins.php' ) - ), 'activate-plugin_' . $plugin_file + ), + admin_url( 'plugins.php' ) + ), + 'activate-plugin_' . $plugin_file ); $action = sprintf( '%2$s', @@ -49,8 +51,10 @@ function wp_load_press_this() { 'action' => 'install-plugin', 'plugin' => $plugin_slug, 'from' => 'press-this', - ), self_admin_url( 'update.php' ) - ), 'install-plugin_' . $plugin_slug + ), + self_admin_url( 'update.php' ) + ), + 'install-plugin_' . $plugin_slug ); $action = sprintf( '%3$s', diff --git a/wp-admin/privacy.php b/wp-admin/privacy.php index c64f7c53fb..8fec1785de 100644 --- a/wp-admin/privacy.php +++ b/wp-admin/privacy.php @@ -58,7 +58,7 @@ if ( ! empty( $action ) ) { } $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content(); - $privacy_policy_page_id = wp_insert_post( + $privacy_policy_page_id = wp_insert_post( array( 'post_title' => __( 'Privacy Policy' ), 'post_status' => 'draft', @@ -195,16 +195,19 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); 'page', - 'posts_per_page' => 1, - 'post_status' => array( - 'publish', - 'draft', - ), - ) ); + $has_pages = (bool) get_posts( + array( + 'post_type' => 'page', + 'posts_per_page' => 1, + 'post_status' => array( + 'publish', + 'draft', + ), + ) + ); - if ( $has_pages ) : ?> + if ( $has_pages ) : + ?>