From 56c162fbc9867f923862f64f1b4570d885f1ff03 Mon Sep 17 00:00:00 2001
From: Gary Pendergast
Date: Fri, 17 Aug 2018 01:51:36 +0000
Subject: [PATCH] Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.
This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script.
- Auto-fixable coding standards issues will now cause Travis failures.
Fixes #44600.
Built from https://develop.svn.wordpress.org/trunk@43571
git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
---
wp-admin/about.php | 10 +-
wp-admin/admin.php | 3 +-
wp-admin/async-upload.php | 3 +-
wp-admin/comment.php | 142 ++--
wp-admin/custom-background.php | 223 +++---
wp-admin/custom-header.php | 325 ++++-----
wp-admin/edit-form-advanced.php | 137 ++--
wp-admin/edit-form-comment.php | 12 +-
wp-admin/edit-link-form.php | 5 +-
wp-admin/edit-tag-form.php | 4 +-
wp-admin/edit-tags.php | 227 +++---
wp-admin/edit.php | 6 +-
wp-admin/export.php | 14 +-
wp-admin/import.php | 24 +-
wp-admin/includes/ajax-actions.php | 69 +-
.../class-automatic-upgrader-skin.php | 3 +-
wp-admin/includes/class-core-upgrader.php | 16 +-
.../includes/class-language-pack-upgrader.php | 19 +-
wp-admin/includes/class-plugin-upgrader.php | 16 +-
.../includes/class-theme-installer-skin.php | 3 +-
.../includes/class-theme-upgrader-skin.php | 3 +-
wp-admin/includes/class-theme-upgrader.php | 19 +-
.../includes/class-walker-nav-menu-edit.php | 9 +-
.../includes/class-wp-automatic-updater.php | 9 +-
.../includes/class-wp-comments-list-table.php | 105 +--
.../includes/class-wp-internal-pointers.php | 4 +-
.../includes/class-wp-links-list-table.php | 12 +-
wp-admin/includes/class-wp-list-table.php | 103 +--
.../includes/class-wp-media-list-table.php | 71 +-
.../includes/class-wp-ms-sites-list-table.php | 23 +-
.../class-wp-ms-themes-list-table.php | 13 +-
.../class-wp-plugin-install-list-table.php | 43 +-
.../includes/class-wp-plugins-list-table.php | 4 +-
.../class-wp-post-comments-list-table.php | 12 +-
.../includes/class-wp-posts-list-table.php | 324 ++++-----
wp-admin/includes/class-wp-screen.php | 23 +-
.../includes/class-wp-terms-list-table.php | 29 +-
.../class-wp-theme-install-list-table.php | 35 +-
.../includes/class-wp-themes-list-table.php | 6 +-
.../includes/class-wp-users-list-table.php | 8 +-
wp-admin/includes/dashboard.php | 103 +--
wp-admin/includes/export.php | 210 +++---
wp-admin/includes/file.php | 148 ++--
wp-admin/includes/image-edit.php | 14 +-
wp-admin/includes/image.php | 2 +-
wp-admin/includes/import.php | 3 +-
wp-admin/includes/media.php | 645 +++++++++---------
wp-admin/includes/meta-boxes.php | 511 +++++++-------
wp-admin/includes/misc.php | 102 +--
wp-admin/includes/ms.php | 20 +-
wp-admin/includes/nav-menu.php | 30 +-
wp-admin/includes/network.php | 130 ++--
wp-admin/includes/options.php | 12 +-
wp-admin/includes/plugin-install.php | 22 +-
wp-admin/includes/post.php | 16 +-
wp-admin/includes/revision.php | 17 +-
wp-admin/includes/schema.php | 14 +-
wp-admin/includes/template.php | 215 +++---
wp-admin/includes/theme-install.php | 40 +-
wp-admin/includes/theme.php | 3 +-
wp-admin/includes/update.php | 6 +-
wp-admin/includes/upgrade.php | 87 ++-
wp-admin/includes/user.php | 117 ++--
wp-admin/includes/widgets.php | 4 +-
wp-admin/index.php | 2 +-
wp-admin/install.php | 32 +-
wp-admin/maint/repair.php | 4 +-
wp-admin/media.php | 49 +-
wp-admin/ms-delete-site.php | 2 +-
wp-admin/my-sites.php | 2 +-
wp-admin/nav-menus.php | 99 +--
wp-admin/network/settings.php | 4 +-
wp-admin/network/site-info.php | 11 +-
wp-admin/network/site-new.php | 15 +-
wp-admin/network/site-settings.php | 11 +-
wp-admin/network/site-themes.php | 3 +-
wp-admin/network/site-users.php | 4 +-
wp-admin/network/themes.php | 9 +-
wp-admin/network/upgrade.php | 5 +-
wp-admin/network/user-new.php | 5 +-
wp-admin/network/users.php | 10 +-
wp-admin/options-general.php | 26 +-
wp-admin/options-media.php | 24 +-
wp-admin/options-permalink.php | 82 +--
wp-admin/options-reading.php | 20 +-
wp-admin/options-writing.php | 88 +--
wp-admin/options.php | 13 +-
wp-admin/plugin-editor.php | 4 +-
wp-admin/plugins.php | 13 +-
wp-admin/post.php | 3 +-
wp-admin/press-this.php | 12 +-
wp-admin/privacy.php | 23 +-
wp-admin/revision.php | 3 +-
wp-admin/setup-config.php | 82 +--
wp-admin/theme-editor.php | 12 +-
wp-admin/theme-install.php | 4 +-
wp-admin/themes.php | 34 +-
wp-admin/tools.php | 35 +-
wp-admin/update-core.php | 213 +++---
wp-admin/update.php | 6 +-
wp-admin/upgrade.php | 18 +-
wp-admin/upload.php | 13 +-
wp-admin/user-edit.php | 490 ++++++-------
wp-admin/user-new.php | 101 +--
wp-admin/users.php | 144 ++--
wp-admin/widgets.php | 78 +--
wp-comments-post.php | 6 +-
wp-content/themes/twentyeleven/404.php | 8 +-
wp-content/themes/twentyeleven/archive.php | 2 +-
wp-content/themes/twentyeleven/author.php | 4 +-
wp-content/themes/twentyeleven/category.php | 2 +-
wp-content/themes/twentyeleven/comments.php | 9 +-
.../themes/twentyeleven/content-aside.php | 2 +-
.../themes/twentyeleven/content-featured.php | 4 +-
.../themes/twentyeleven/content-gallery.php | 32 +-
.../themes/twentyeleven/content-image.php | 8 +-
.../themes/twentyeleven/content-intro.php | 2 +-
.../themes/twentyeleven/content-link.php | 2 +-
.../themes/twentyeleven/content-page.php | 2 +-
.../themes/twentyeleven/content-quote.php | 12 +-
.../themes/twentyeleven/content-single.php | 4 +-
.../themes/twentyeleven/content-status.php | 2 +-
wp-content/themes/twentyeleven/content.php | 40 +-
wp-content/themes/twentyeleven/functions.php | 46 +-
wp-content/themes/twentyeleven/header.php | 14 +-
wp-content/themes/twentyeleven/image.php | 76 +--
.../themes/twentyeleven/inc/theme-options.php | 36 +-
.../themes/twentyeleven/inc/widgets.php | 8 +-
wp-content/themes/twentyeleven/index.php | 2 +-
wp-content/themes/twentyeleven/page.php | 2 +-
wp-content/themes/twentyeleven/search.php | 2 +-
wp-content/themes/twentyeleven/showcase.php | 140 ++--
.../themes/twentyeleven/sidebar-page.php | 2 +-
wp-content/themes/twentyeleven/sidebar.php | 2 +-
wp-content/themes/twentyeleven/single.php | 2 +-
wp-content/themes/twentyeleven/tag.php | 2 +-
wp-content/themes/twentyfifteen/comments.php | 2 +-
.../themes/twentyfifteen/content-link.php | 4 +-
.../themes/twentyfifteen/content-page.php | 2 +-
wp-content/themes/twentyfifteen/content.php | 4 +-
wp-content/themes/twentyfifteen/functions.php | 22 +-
wp-content/themes/twentyfifteen/header.php | 4 +-
wp-content/themes/twentyfifteen/image.php | 4 +-
.../themes/twentyfifteen/inc/back-compat.php | 4 +-
.../twentyfifteen/inc/custom-header.php | 18 +-
.../themes/twentyfifteen/inc/customizer.php | 32 +-
.../twentyfifteen/inc/template-tags.php | 8 +-
wp-content/themes/twentyfifteen/search.php | 2 +-
wp-content/themes/twentyfourteen/archive.php | 22 +-
wp-content/themes/twentyfourteen/author.php | 20 +-
wp-content/themes/twentyfourteen/category.php | 20 +-
wp-content/themes/twentyfourteen/comments.php | 6 +-
.../themes/twentyfourteen/content-aside.php | 6 +-
.../themes/twentyfourteen/content-audio.php | 6 +-
.../themes/twentyfourteen/content-gallery.php | 6 +-
.../themes/twentyfourteen/content-image.php | 6 +-
.../themes/twentyfourteen/content-link.php | 6 +-
.../themes/twentyfourteen/content-page.php | 2 +-
.../themes/twentyfourteen/content-quote.php | 6 +-
.../themes/twentyfourteen/content-video.php | 6 +-
wp-content/themes/twentyfourteen/content.php | 8 +-
.../themes/twentyfourteen/functions.php | 23 +-
wp-content/themes/twentyfourteen/header.php | 2 +-
wp-content/themes/twentyfourteen/image.php | 2 +-
.../themes/twentyfourteen/inc/back-compat.php | 4 +-
.../twentyfourteen/inc/custom-header.php | 24 +-
.../themes/twentyfourteen/inc/customizer.php | 15 +-
.../twentyfourteen/inc/featured-content.php | 15 +-
.../twentyfourteen/inc/template-tags.php | 20 +-
.../themes/twentyfourteen/inc/widgets.php | 26 +-
wp-content/themes/twentyfourteen/index.php | 2 +-
.../page-templates/contributors.php | 14 +-
wp-content/themes/twentyfourteen/search.php | 2 +-
wp-content/themes/twentyfourteen/sidebar.php | 2 +-
wp-content/themes/twentyfourteen/tag.php | 20 +-
.../twentyfourteen/taxonomy-post_format.php | 22 +-
wp-content/themes/twentyseventeen/archive.php | 2 +-
.../themes/twentyseventeen/comments.php | 6 +-
wp-content/themes/twentyseventeen/footer.php | 4 +-
.../themes/twentyseventeen/front-page.php | 2 +-
.../themes/twentyseventeen/functions.php | 13 +-
.../twentyseventeen/inc/back-compat.php | 4 +-
.../twentyseventeen/inc/custom-header.php | 16 +-
.../themes/twentyseventeen/inc/customizer.php | 37 +-
wp-content/themes/twentyseventeen/search.php | 2 +-
.../template-parts/footer/footer-widgets.php | 8 +-
.../template-parts/header/site-branding.php | 2 +-
.../page/content-front-page-panels.php | 4 +-
.../page/content-front-page.php | 2 +-
.../template-parts/page/content-page.php | 2 +-
.../template-parts/post/content-none.php | 4 +-
wp-content/themes/twentysixteen/comments.php | 4 +-
wp-content/themes/twentysixteen/functions.php | 16 +-
wp-content/themes/twentysixteen/header.php | 2 +-
wp-content/themes/twentysixteen/image.php | 6 +-
.../themes/twentysixteen/inc/back-compat.php | 4 +-
.../themes/twentysixteen/inc/customizer.php | 58 +-
.../twentysixteen/inc/template-tags.php | 8 +-
.../template-parts/content-page.php | 2 +-
.../template-parts/content-single.php | 4 +-
.../twentysixteen/template-parts/content.php | 4 +-
wp-content/themes/twentyten/author.php | 2 +-
wp-content/themes/twentyten/comments.php | 15 +-
wp-content/themes/twentyten/functions.php | 26 +-
wp-content/themes/twentyten/header.php | 6 +-
.../themes/twentyten/loop-attachment.php | 92 +--
wp-content/themes/twentyten/loop-page.php | 4 +-
wp-content/themes/twentyten/loop-single.php | 6 +-
wp-content/themes/twentyten/loop.php | 18 +-
wp-content/themes/twentythirteen/archive.php | 4 +-
wp-content/themes/twentythirteen/author.php | 2 +-
wp-content/themes/twentythirteen/category.php | 2 +-
wp-content/themes/twentythirteen/comments.php | 5 +-
.../themes/twentythirteen/content-aside.php | 2 +-
.../themes/twentythirteen/content-audio.php | 2 +-
.../themes/twentythirteen/content-chat.php | 2 +-
.../themes/twentythirteen/content-gallery.php | 2 +-
.../themes/twentythirteen/content-image.php | 2 +-
.../themes/twentythirteen/content-link.php | 2 +-
.../themes/twentythirteen/content-quote.php | 2 +-
.../themes/twentythirteen/content-status.php | 2 +-
.../themes/twentythirteen/content-video.php | 2 +-
.../themes/twentythirteen/functions.php | 16 +-
wp-content/themes/twentythirteen/header.php | 2 +-
wp-content/themes/twentythirteen/image.php | 4 +-
.../themes/twentythirteen/inc/back-compat.php | 4 +-
.../twentythirteen/inc/custom-header.php | 22 +-
wp-content/themes/twentythirteen/index.php | 2 +-
wp-content/themes/twentythirteen/page.php | 4 +-
wp-content/themes/twentythirteen/search.php | 2 +-
wp-content/themes/twentythirteen/single.php | 2 +-
wp-content/themes/twentythirteen/tag.php | 2 +-
.../twentythirteen/taxonomy-post_format.php | 2 +-
wp-content/themes/twentytwelve/archive.php | 2 +-
wp-content/themes/twentytwelve/author.php | 4 +-
wp-content/themes/twentytwelve/comments.php | 7 +-
.../themes/twentytwelve/content-page.php | 4 +-
wp-content/themes/twentytwelve/content.php | 2 +-
wp-content/themes/twentytwelve/functions.php | 26 +-
wp-content/themes/twentytwelve/header.php | 2 +-
wp-content/themes/twentytwelve/image.php | 68 +-
.../themes/twentytwelve/inc/custom-header.php | 16 +-
wp-content/themes/twentytwelve/index.php | 8 +-
.../page-templates/front-page.php | 2 +-
.../page-templates/full-width.php | 2 +-
wp-content/themes/twentytwelve/page.php | 2 +-
wp-content/themes/twentytwelve/search.php | 2 +-
wp-content/themes/twentytwelve/single.php | 2 +-
wp-includes/admin-bar.php | 6 +-
wp-includes/author-template.php | 3 +-
wp-includes/bookmark-template.php | 3 +-
wp-includes/canonical.php | 6 +-
wp-includes/category-template.php | 9 +-
wp-includes/category.php | 6 +-
wp-includes/class-oembed.php | 3 +-
wp-includes/class-walker-category.php | 3 +-
wp-includes/class-walker-comment.php | 34 +-
wp-includes/class-wp-customize-manager.php | 247 ++++---
wp-includes/class-wp-customize-nav-menus.php | 54 +-
wp-includes/class-wp-customize-widgets.php | 32 +-
wp-includes/class-wp-editor.php | 12 +-
wp-includes/class-wp-embed.php | 4 +-
wp-includes/class-wp-http-curl.php | 3 +-
wp-includes/class-wp-http-streams.php | 3 +-
wp-includes/class-wp-meta-query.php | 3 +-
wp-includes/class-wp-oembed-controller.php | 8 +-
wp-includes/class-wp-query.php | 15 +-
wp-includes/class-wp-rewrite.php | 6 +-
wp-includes/class-wp-tax-query.php | 3 +-
wp-includes/class-wp-taxonomy.php | 3 +-
wp-includes/class-wp-term-query.php | 3 +-
wp-includes/class-wp-theme.php | 21 +-
wp-includes/class-wp-user.php | 15 +-
wp-includes/class-wp-widget.php | 3 +-
wp-includes/class-wp-xmlrpc-server.php | 13 +-
wp-includes/comment-template.php | 27 +-
wp-includes/comment.php | 13 +-
wp-includes/cron.php | 6 +-
...-wp-customize-background-image-control.php | 8 +-
.../class-wp-customize-custom-css-setting.php | 3 +-
...lass-wp-customize-header-image-control.php | 8 +-
...ass-wp-customize-nav-menu-item-setting.php | 7 +-
.../class-wp-customize-nav-menu-setting.php | 9 +-
.../class-wp-customize-nav-menus-panel.php | 2 +-
.../class-wp-customize-theme-control.php | 2 +-
wp-includes/default-filters.php | 2 +-
wp-includes/embed.php | 9 +-
wp-includes/feed-atom-comments.php | 14 +-
wp-includes/feed-atom.php | 32 +-
wp-includes/feed-rdf.php | 6 +-
wp-includes/feed-rss.php | 2 +-
wp-includes/feed-rss2-comments.php | 8 +-
wp-includes/feed-rss2.php | 38 +-
wp-includes/formatting.php | 27 +-
wp-includes/functions.php | 87 ++-
wp-includes/functions.wp-scripts.php | 12 +-
wp-includes/functions.wp-styles.php | 6 +-
wp-includes/general-template.php | 80 ++-
wp-includes/kses.php | 3 +-
wp-includes/l10n.php | 6 +-
wp-includes/link-template.php | 33 +-
wp-includes/load.php | 4 +-
wp-includes/media-template.php | 53 +-
wp-includes/media.php | 35 +-
wp-includes/meta.php | 6 +-
wp-includes/ms-blogs.php | 9 +-
wp-includes/ms-functions.php | 82 ++-
wp-includes/nav-menu-template.php | 9 +-
wp-includes/nav-menu.php | 6 +-
wp-includes/option.php | 99 ++-
wp-includes/pluggable.php | 14 +-
wp-includes/pomo/mo.php | 13 +-
wp-includes/post.php | 72 +-
wp-includes/query.php | 12 +-
.../rest-api/class-wp-rest-request.php | 12 +-
wp-includes/rest-api/class-wp-rest-server.php | 9 +-
.../class-wp-rest-comments-controller.php | 8 +-
.../endpoints/class-wp-rest-controller.php | 3 +-
...class-wp-rest-post-statuses-controller.php | 8 +-
.../class-wp-rest-post-types-controller.php | 8 +-
.../class-wp-rest-posts-controller.php | 9 +-
.../class-wp-rest-revisions-controller.php | 8 +-
.../class-wp-rest-settings-controller.php | 8 +-
.../class-wp-rest-taxonomies-controller.php | 8 +-
.../class-wp-rest-terms-controller.php | 15 +-
.../class-wp-rest-users-controller.php | 14 +-
.../fields/class-wp-rest-meta-fields.php | 4 +-
wp-includes/revision.php | 3 +-
wp-includes/script-loader.php | 171 +++--
wp-includes/taxonomy.php | 55 +-
wp-includes/theme-compat/comments.php | 3 +-
wp-includes/theme-compat/embed-content.php | 2 +-
wp-includes/theme-compat/header.php | 8 +-
wp-includes/theme-compat/sidebar.php | 34 +-
wp-includes/theme.php | 28 +-
wp-includes/update.php | 6 +-
wp-includes/user.php | 100 +--
wp-includes/version.php | 2 +-
wp-includes/widgets.php | 11 +-
.../widgets/class-wp-widget-archives.php | 58 +-
.../widgets/class-wp-widget-categories.php | 32 +-
.../widgets/class-wp-widget-custom-html.php | 3 +-
wp-includes/widgets/class-wp-widget-links.php | 5 +-
.../widgets/class-wp-widget-media-audio.php | 7 +-
.../widgets/class-wp-widget-media-gallery.php | 7 +-
.../widgets/class-wp-widget-media-image.php | 13 +-
.../widgets/class-wp-widget-media-video.php | 7 +-
wp-includes/widgets/class-wp-widget-media.php | 7 +-
wp-includes/widgets/class-wp-widget-meta.php | 12 +-
wp-includes/widgets/class-wp-widget-pages.php | 13 +-
.../class-wp-widget-recent-comments.php | 6 +-
.../widgets/class-wp-widget-recent-posts.php | 10 +-
.../widgets/class-wp-widget-tag-cloud.php | 6 +-
wp-includes/widgets/class-wp-widget-text.php | 3 +-
wp-includes/wp-db.php | 8 +-
wp-links-opml.php | 32 +-
wp-login.php | 231 +++----
wp-signup.php | 12 +-
xmlrpc.php | 4 +-
359 files changed, 5715 insertions(+), 4599 deletions(-)
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 '
';
- }
-}
-?>
+ 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 '
';
+ }
+ }
+ ?>
@@ -342,68 +342,68 @@ class Custom_Background {
- __( '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( '/' ) ); ?>
-
+
-"/>
-
+
-
+
-
-
+
+
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 .= '
' . __( 'Get Shortlink' ) . ' ';
+ if ( ! empty( $shortlink ) && $shortlink !== $permalink && $permalink !== home_url( '?page_id=' . $post->ID ) ) {
+ $sample_permalink_html .= '
' . __( 'Get Shortlink' ) . ' ';
+ }
}
- }
- 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 );
-?>
+ ?>
@@ -587,15 +590,15 @@ do_action( "{$taxonomy}_add_form", $taxonomy );
);
?>
-
+
category to tag 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 ) :
- ?>
+ ?>
label ); ?>
@@ -280,9 +281,10 @@ foreach ( get_post_types(
array(
'_builtin' => false,
'can_export' => true,
- ), 'objects'
+ ),
+ 'objects'
) as $post_type ) :
-?>
+ ?>
label ); ?>
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 '' . __( 'Filter by category' ) . ' ';
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 '
';
}
-?>
+ ?>
:
- 'search-submit' ) ); ?>
+ 'search-submit' ) ); ?>
-
+ ?>
value="0">
-year ) {
- continue;
- }
+ year ) {
+ continue;
+ }
- $month = zeroise( $arc_row->month, 2 );
- $year = $arc_row->year;
+ $month = zeroise( $arc_row->month, 2 );
+ $year = $arc_row->year;
- printf(
- "%s \n",
- selected( $m, $year . $month, false ),
- esc_attr( $arc_row->year . $month ),
- /* translators: 1: month name, 2: 4-digit year */
- sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
- );
-}
-?>
+ printf(
+ "%s \n",
+ selected( $m, $year . $month, false ),
+ esc_attr( $arc_row->year . $month ),
+ /* translators: 1: month name, 2: 4-digit year */
+ sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
+ );
+ }
+ ?>
-
+ ?>
-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 '
';
- foreach ( $views as $class => $view ) {
- echo "$view ";
- }
- echo ' ';
-}
-?>
+ if ( ! empty( $views ) ) {
+ echo '
';
+ foreach ( $views as $class => $view ) {
+ echo "$view ";
+ }
+ 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 ) {
- ?>
+ ?>
- post_type, 'title' ) ) :
- if ( $bulk ) :
- ?>
+ if ( post_type_supports( $screen->post_type, 'title' ) ) :
+ if ( $bulk ) :
+ ?>
-
+
@@ -1464,15 +1466,15 @@ if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->p
+ ?>
-
+
- post_type, 'author' ) ) :
@@ -1531,16 +1533,16 @@ if ( ! $bulk && $can_publish ) :
-
+
-
+
labels->name ); ?>
- $taxonomy->name ) ); ?>
+ $taxonomy->name ) ); ?>
@@ -1551,69 +1553,69 @@ if ( ! $bulk && $can_publish ) :
- post_type, 'author' ) && $bulk ) {
- echo $authors_dropdown;
- }
+ post_type, 'author' ) && $bulk ) {
+ echo $authors_dropdown;
+ }
- if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
+ if ( post_type_supports( $screen->post_type, 'page-attributes' ) ) :
- if ( $post_type_object->hierarchical ) :
- ?>
+ if ( $post_type_object->hierarchical ) :
+ ?>
- $post_type_object->name,
- 'selected' => $post->post_parent,
- 'name' => 'post_parent',
- 'show_option_none' => __( 'Main Page (no parent)' ),
- 'option_none_value' => 0,
- 'sort_column' => 'menu_order, post_title',
- );
+ $post_type_object->name,
+ 'selected' => $post->post_parent,
+ 'name' => 'post_parent',
+ 'show_option_none' => __( 'Main Page (no parent)' ),
+ 'option_none_value' => 0,
+ 'sort_column' => 'menu_order, post_title',
+ );
- if ( $bulk ) {
- $dropdown_args['show_option_no_change'] = __( '— No Change —' );
- }
+ if ( $bulk ) {
+ $dropdown_args['show_option_no_change'] = __( '— No Change —' );
+ }
- /**
- * Filters the arguments used to generate the Quick Edit page-parent drop-down.
- *
- * @since 2.7.0
- *
- * @see wp_dropdown_pages()
- *
- * @param array $dropdown_args An array of arguments.
- */
- $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
+ /**
+ * Filters the arguments used to generate the Quick Edit page-parent drop-down.
+ *
+ * @since 2.7.0
+ *
+ * @see wp_dropdown_pages()
+ *
+ * @param array $dropdown_args An array of arguments.
+ */
+ $dropdown_args = apply_filters( 'quick_edit_dropdown_pages_args', $dropdown_args );
- wp_dropdown_pages( $dropdown_args );
-?>
+ wp_dropdown_pages( $dropdown_args );
+ ?>
-
+ if ( ! $bulk ) :
+ ?>
-
+ ?>
- post_type ) ) ) : ?>
+ post_type ) ) ) : ?>
-
+
-
+
-
+
-
- cap->assign_terms ) ) :
- $taxonomy_name = esc_attr( $taxonomy->name );
+
+ cap->assign_terms ) ) :
+ $taxonomy_name = esc_attr( $taxonomy->name );
- ?>
+ ?>
labels->name ); ?>
-
+
- post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
- if ( $bulk ) :
- ?>
+ post_type, 'comments' ) || post_type_supports( $screen->post_type, 'trackbacks' ) ) :
+ if ( $bulk ) :
+ ?>
- post_type, 'comments' ) ) : ?>
+ post_type, 'comments' ) ) : ?>
@@ -1669,7 +1671,7 @@ if ( ! $bulk && $can_publish ) :
-
+
post_type, 'comments' ) ) : ?>
@@ -1688,19 +1690,19 @@ if ( ! $bulk && $can_publish ) :
+ ?>
-
+
-
+
@@ -1709,9 +1711,9 @@ if ( ! $bulk && $can_publish ) :
- post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
+ post_type && $can_publish && current_user_can( $post_type_object->cap->edit_others_posts ) ) : ?>
-
+
@@ -1735,69 +1737,69 @@ if ( ! $bulk && $can_publish ) :
- post_type, 'post-formats' ) ) {
- $post_formats = get_theme_support( 'post-formats' );
+ if ( $bulk && current_theme_supports( 'post-formats' ) && post_type_supports( $screen->post_type, 'post-formats' ) ) {
+ $post_formats = get_theme_support( 'post-formats' );
- ?>
+ ?>
-
+
-
+ ?>
-
+ ?>
- get_column_info();
+ get_column_info();
- foreach ( $columns as $column_name => $column_display_name ) {
- if ( isset( $core_columns[ $column_name ] ) ) {
- continue;
- }
+ foreach ( $columns as $column_name => $column_display_name ) {
+ if ( isset( $core_columns[ $column_name ] ) ) {
+ continue;
+ }
- if ( $bulk ) {
+ if ( $bulk ) {
- /**
- * Fires once for each column in Bulk Edit mode.
- *
- * @since 2.7.0
- *
- * @param string $column_name Name of the column to edit.
- * @param WP_Post $post_type The post type slug.
- */
- do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
- } else {
+ /**
+ * Fires once for each column in Bulk Edit mode.
+ *
+ * @since 2.7.0
+ *
+ * @param string $column_name Name of the column to edit.
+ * @param WP_Post $post_type The post type slug.
+ */
+ do_action( 'bulk_edit_custom_box', $column_name, $screen->post_type );
+ } else {
- /**
- * Fires once for each column in Quick Edit mode.
- *
- * @since 2.7.0
- *
- * @param string $column_name Name of the column to edit.
- * @param string $post_type The post type slug, or current screen name if this is a taxonomy list table.
- * @param string taxonomy The taxonomy name, if any.
- */
- do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
- }
- }
- ?>
+ /**
+ * Fires once for each column in Quick Edit mode.
+ *
+ * @since 2.7.0
+ *
+ * @param string $column_name Name of the column to edit.
+ * @param string $post_type The post type slug, or current screen name if this is a taxonomy list table.
+ * @param string taxonomy The taxonomy name, if any.
+ */
+ do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
+ }
+ }
+ ?>
-
-
+ ?>
-
-
@@ -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' );
-?>
+ ?>
@@ -1247,7 +1248,7 @@ if ( $this->show_screen_options() ) :
-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;
}
-?>
+ ?>
@@ -619,14 +620,14 @@ class WP_Terms_List_Table extends WP_List_Table {
-
+
- true,
@@ -638,16 +639,16 @@ class WP_Terms_List_Table extends WP_List_Table {
list( $columns ) = $this->get_column_info();
- foreach ( $columns as $column_name => $column_display_name ) {
- if ( isset( $core_columns[ $column_name ] ) ) {
- continue;
+ foreach ( $columns as $column_name => $column_display_name ) {
+ if ( isset( $core_columns[ $column_name ] ) ) {
+ continue;
+ }
+
+ /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
+ do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
}
- /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
- do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy );
- }
-
- ?>
+ ?>
@@ -663,6 +664,6 @@ class WP_Terms_List_Table extends WP_List_Table {
-
+ ?>
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 {
-
+
+ ?>
+
@@ -430,14 +435,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 );
@@ -472,12 +479,14 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
);
break;
}
- ?>
+ ?>
-
+
+ ?>
+
screenshot_url ) ) : ?>
diff --git a/wp-admin/includes/class-wp-themes-list-table.php b/wp-admin/includes/class-wp-themes-list-table.php
index c0f86135ae..290b7cbc59 100644
--- a/wp-admin/includes/class-wp-themes-list-table.php
+++ b/wp-admin/includes/class-wp-themes-list-table.php
@@ -137,7 +137,7 @@ class WP_Themes_List_Table extends WP_List_Table {
*/
public function display() {
wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );
-?>
+ ?>
tablenav( 'top' ); ?>
@@ -145,7 +145,7 @@ class WP_Themes_List_Table extends WP_List_Table {
tablenav( 'bottom' ); ?>
-
-
+ ?>
has_items() ) : ?>
@@ -272,7 +272,7 @@ class WP_Users_List_Table extends WP_List_Table {
-
+?>
-
+ ?>
-
+ ?>
+ ?>
- \n", $actions ) . "\n";
echo ' ';
}
-?>
+ ?>
@@ -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 ";
}
}
-?>
+ ?>
- 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, '' );
+ fwrite( $file, '' );
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 = '';
- ?>
+ ?>
, this)">
, this)">
-
' . __( '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();
-?>
+ ?>
› —
-
+ 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">
-
+ ?>
labels->back_to_items ); - ?> + ?>