Commit Graph

41526 Commits

Author SHA1 Message Date
Greg Ziółkowski
822ca9ebc7 Add fields to WP_Block_Type
As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them.

Props spacedmonkey, aduth.

Fixes #48529.



git-svn-id: https://develop.svn.wordpress.org/trunk@47875 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 12:25:34 +00:00
Sergey Biryukov
e0ede89881 Docs: Correct and clarify an inline comment about the upload_url_path and upload_path options in wp-admin/options-media.php.
Synchronize it with a similar comment in `wp-admin/options.php`.

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47874 602fd350-edb4-49c9-b593-d223f7449a82
2020-06-01 11:20:16 +00:00
Sergey Biryukov
bec349c649 Build/Test Tools: Bump node-sass and webpack-dev-server versions as a result of npm audit.
Props whyisjake.
See #49768.

git-svn-id: https://develop.svn.wordpress.org/trunk@47873 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-31 09:19:05 +00:00
Sergey Biryukov
649b0724ba Build/Test Tools: Switch to Node 12.16.0 (LTS) and npm 6.14.0.
See #49768.

git-svn-id: https://develop.svn.wordpress.org/trunk@47872 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-31 09:17:35 +00:00
Sergey Biryukov
4ae8bdf8c3 Upgrade/Install: Rename wp_in_maintenance_mode() to wp_is_maintenance_mode(), for consistency with wp_is_recovery_mode().
While the former name might be a bit more accurate, the latter matches the existing naming pattern.

Follow-up to [47623].

Fixes #49959.

git-svn-id: https://develop.svn.wordpress.org/trunk@47871 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 15:11:02 +00:00
Sergey Biryukov
2e39930d71 Docs: Adjust the documentation for the new ID alias in get_term_by() for consistency with get_user_by().
Follow-up to [47865].

See #45163.

git-svn-id: https://develop.svn.wordpress.org/trunk@47870 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 10:06:49 +00:00
Jake Spurlock
c9ee3b828c Build/Test Tools: Revert some devDependency changes for 5.5.
After bumping some major updates, tests on Travis are failing. 

See: https://travis-ci.com/WordPress/wordpress-develop/builds/168839259 ##49768.
Unprops: whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47869 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 06:08:18 +00:00
Jake Spurlock
e1993cd3fb Build/Test Tools: Bump devDependencies for WordPress 5.5.
Bumping a few more dependencies as a result of `npm audit`.

Fixes #49768.
Props whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@47868 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 05:36:28 +00:00
Jake Spurlock
5c184116bf Build/Test Tools: Bump devDependencies for WordPress 5.5
There are several other changes that need to be made for the security audit, this is just the first pass.

Fixes #49768.
Props SergeyBiryukov, whyisjake.


git-svn-id: https://develop.svn.wordpress.org/trunk@47867 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-30 04:54:28 +00:00
Jake Spurlock
38744d8bd2 Code Standards: Clean up whitespace on the end of a file.
See: #45163.
Props: whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47866 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 23:34:00 +00:00
Jake Spurlock
7b13f5abd8 Taxonomy: Extend get_term_by to accept ID as a term parameter.
Similar to `get_user_by`, both `ID` and `id` should be able to accepted.

Fixes #45163.
Props emrikol, esoj.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@47865 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 22:41:25 +00:00
Sergey Biryukov
64a2e8d55e Docs: Improve documentation for functions in wp-includes/category.php per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@47864 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 10:05:36 +00:00
Sergey Biryukov
0133a78dec Docs: Document that get_category_by_slug() returns false if the category doesn't exist.
Props stevenlinx.
Fixes #50277.

git-svn-id: https://develop.svn.wordpress.org/trunk@47863 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-29 10:00:32 +00:00
Sergey Biryukov
7f73f1a1e4 Coding Standards: Use strict comparison in wp-admin/_index.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47862 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-28 10:00:44 +00:00
Sergey Biryukov
cfc5b94f28 Docs: Remove unused @global declarations from _WP_Editors::print_tinymce_scripts().
Follow-up to [47860].

See #45398.

git-svn-id: https://develop.svn.wordpress.org/trunk@47861 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 19:46:34 +00:00
Jake Spurlock
d8b8495e8e Editor: Remove TinyMCE global version.
The global variable is not being used in the `editor_settings` method. 

Fixes #45398.
Props ishitaka, noisysocks, mista-flo.



git-svn-id: https://develop.svn.wordpress.org/trunk@47860 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 19:26:32 +00:00
Andrea Fercia
184118c3c9 Administration and Site Health: Make information on Search engine visibility more prominent.
- makes the "Search engines discouraged" message on the Dashboard more prominent
- adds "Search engine visibility" information under Site Health > Info > WordPress 
- removes title case in favor of sentence case in all the related strings 

Props audrasjb, swissspidy, emanuel_blagonic, Presskopp, karmatosed, valentinbora, melchoyce.
Fixes #35288.


git-svn-id: https://develop.svn.wordpress.org/trunk@47859 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 14:32:00 +00:00
Sergey Biryukov
45d8f6b9d0 Docs: Correct @return value for WP_REST_Meta_Fields::get_value().
Props chrisvanpatten.
Fixes #50259.

git-svn-id: https://develop.svn.wordpress.org/trunk@47858 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-27 09:42:38 +00:00
Jake Spurlock
8efc5321c9 Coding Standards: Change auto-update filters to be more consistent.
* send_theme_auto_update_email 👉 auto_theme_update_send_email
* wp_plugins_auto_update_enabled 👉 plugins_auto_update_enabled
* wp_themes_auto_update_enabled 👉 themes_auto_update_enabled

Want to make sure that @ronalfy gets props for his work in #50052 too.

See #50052.
Props: ronalfy, pbiron, azaozz, audrasjb, whyisjake.



git-svn-id: https://develop.svn.wordpress.org/trunk@47857 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-26 18:01:18 +00:00
Dominik Schilling
adcf5cf7a3 Posts, Post Types: Pass the post object to the delete_attachment action.
Also add the missing `$post` parameter to the `delete_post` and `deleted_post` actions in `wp_delete_attachment()`.

See #30940.

git-svn-id: https://develop.svn.wordpress.org/trunk@47856 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-26 14:47:26 +00:00
Sergey Biryukov
2c75752c88 Coding Standards: Fix instances of Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47855 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-26 09:35:34 +00:00
Sergey Biryukov
6ec9c9c446 Docs: Improve documentation for add_existing_user_to_blog().
Props stevenlinx.
Fixes #50243.

git-svn-id: https://develop.svn.wordpress.org/trunk@47854 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-25 14:21:50 +00:00
Sergey Biryukov
219acea88f Coding Standards: Use strict comparison in wp-admin/network where static strings are involved.
Includes minor code layout fixes for better readability.

Follow-up to [47808].

See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47853 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-24 09:14:21 +00:00
Sergey Biryukov
2919961c18 Coding Standards: Use strict comparison for $wp_db_version check in wp-admin/network/upgrade.php.
Follow-up to [47787], [47788].

See #50155, #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47852 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-24 09:13:39 +00:00
Sergey Biryukov
3e2d77ae04 Coding Standards: Use strict comparison for more count() calls.
Follow-up to [47848].

Props mukesh27.
Fixes #50232. See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47851 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 16:20:10 +00:00
Dominik Schilling
f37a28858d Role/Capability: Use meta caps edit_post, read_post, and delete_post directly.
Rather than consulting the post type object, let `map_meta_cap()` handle that for us.

Props peterwilsoncc, ocean90.
Fixes #50128.
See #23226.

git-svn-id: https://develop.svn.wordpress.org/trunk@47850 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 15:22:53 +00:00
Dominik Schilling
584df2a169 Rest API: Ensure rest_ensure_response() upgrades WP_HTTP_Response to WP_REST_Response.
An instance of `WP_HTTP_Response` doesn't ensure that the required methods used in `WP_REST_Server::dispatch()` exist, currently causing a fatal error.

Props ali11007, TimothyBlynJacobs, ocean90.
Fixes #49495.

git-svn-id: https://develop.svn.wordpress.org/trunk@47849 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 14:34:38 +00:00
Sergey Biryukov
772a11b72a Coding Standards: Use strict comparison for count() calls.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47848 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 11:36:36 +00:00
Jake Spurlock
a5baf8b9c6 Bundled Themes: Add missing RTL styles for to fix inconsistent margins on .alignwide and .alignfull items.
Fixes the inconsistent margins for alignwide and alignfull classes used on Cover Block when it is the first block on a page.

Props kthmd, utz119, nikhilbhansi, and sabernhardt.
Fixes #49435.


git-svn-id: https://develop.svn.wordpress.org/trunk@47846 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-23 06:21:37 +00:00
Sergey Biryukov
1ce6af5284 Coding Standards: Fix WPCS issues in wp-admin/plugin-editor.php and wp-admin/theme-editor.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47845 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 23:59:10 +00:00
Sergey Biryukov
a6cb663c13 Theme Editor: Remove unused $has_templates boolean.
The variable is a remnant from when the Theme Editor still had the "Templates" heading and is unused in the current logic.

The condition it was a part of would always evaluate to true for a child theme, regardless of the `$has_templates` value.

Props dboy1988.
Fixes #50199.

git-svn-id: https://develop.svn.wordpress.org/trunk@47844 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 23:18:47 +00:00
Jake Spurlock
3ab28fd579 REST API: Ensure proper namespacing when registering routes.
The PR will corerce routes that have a leading slash and throwing a `_doing_it_wrong` notice while ensuring a proper namespace.

Fixes #49749.
Props TimothyBlynJacobs, skarabeq, afercia.



git-svn-id: https://develop.svn.wordpress.org/trunk@47842 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 20:46:03 +00:00
Sergey Biryukov
3fe58b173f Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-site-health-auto-updates.php.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47841 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 17:54:50 +00:00
Sergey Biryukov
4d6ac487e7 Coding Standards: Fix WPCS issues in wp-admin/includes/class-wp-debug-data.php.
Follow-up to [47550], [47557], [47835].

See #50052.

git-svn-id: https://develop.svn.wordpress.org/trunk@47840 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-22 17:24:05 +00:00
Sergey Biryukov
174ead229d Customize: Move the WordPress logo with a white background to the wp-includes directory.
This ensures that the image used as a default site icon looks good on a dark background.

The image was previously changed in the `wp-admin` directory, but the site icon is now loaded from `wp-includes`.

Follow-up to [36635], [47018], [47564], [47832].

Props ocean90.
Fixes #49798.

git-svn-id: https://develop.svn.wordpress.org/trunk@47838 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-21 09:08:52 +00:00
Peter Wilson
09a6234ed3 KSES: Support the video element's playsinline attribute.
Allow users without the `unfiltered_html` capability to use the `playsinline` attribute when embedding videos.

Additionally this adds unit tests for passing the video element through kses.

Fixes #50167. See #29826.


git-svn-id: https://develop.svn.wordpress.org/trunk@47837 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-21 04:52:33 +00:00
Sergey Biryukov
e834dc8935 Docs: Add missing @since tag for auto_plugin_theme_update_email filter.
See #50052.

git-svn-id: https://develop.svn.wordpress.org/trunk@47836 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 19:31:50 +00:00
Jake Spurlock
eb79d7f1ee Security: Add user interface to auto-update themes and plugins.
Building on core update mechanisms, this adds the ability to enable automatic updates for themes and plugins to the WordPress admin. 

Fixes: #50052.
Props: afercia, afragen, audrasjb, azaozz, bookdude13, davidperonne, desrosj, gmays, gmays, javiercasares, karmatosed, knutsp, mapk, mukesh27, netweb, nicolaskulka, nielsdeblaauw, paaljoachim, passoniate, pbiron, pedromendonca, whodunitagency, whyisjake, wpamitkumar, and xkon.


git-svn-id: https://develop.svn.wordpress.org/trunk@47835 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 18:47:24 +00:00
Andrea Fercia
cdd8b92ea6 Accessibility: Media: Hide the invisible "file input" on media views from assistive technologies.
The file input button is visually hidden, but was announced by screen readers in workflows unrelated to file uploads.
It is now hidden from assistive technologies by the means of an `aria-hidden` attribute, as its CSS display property must not be changed to make sure it still works on old browsers.

See #49753.
Fixes #47611.


git-svn-id: https://develop.svn.wordpress.org/trunk@47834 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 13:31:32 +00:00
Sergey Biryukov
ea99b194dc Customize: Load the default site icon from the wp-includes directory.
Files inside the `wp-admin` directory may not be publicly available.

Follow-up to [36635], [47018].

Props whyisjake, finomeno, ocean90.
Fixes #50131.

git-svn-id: https://develop.svn.wordpress.org/trunk@47832 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-20 10:34:18 +00:00
Sergey Biryukov
78a308ea84 Coding Standards: Fix WPCS issues in wp-includes/class-wp-customize-manager.php.
Follow-up to [47819].

Props sorenbronsted.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47821 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-19 08:39:28 +00:00
Ian Belanger
930633096e Bundled Themes: Twenty Twenty inconsistent top and bottom margins for .alignwide and .alignfull on Chrome vs Safari.
Fixes the inconsistent margins for `alignwide` and `alignfull` classes used on Cover Block when it is the first block on a page.

Props kthmd, utz119, nikhilbhansi.
Fixes #49435.

git-svn-id: https://develop.svn.wordpress.org/trunk@47820 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-18 19:50:22 +00:00
Sergey Biryukov
a60b30444f Themes: Prevent installation of themes that require a higher version of PHP or WordPress.
Props afragen.
Fixes #49653. See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@47819 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-18 16:01:38 +00:00
Sergey Biryukov
581bc56b16 Themes: Remove extra whitespace from wp-admin/includes/ajax-actions.php and wp-admin/includes/theme.php.
Follow-up to [47816].

See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@47818 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-18 12:53:34 +00:00
Sergey Biryukov
cd7d648040 Themes: Remove debug call from wp-admin/theme-install.php.
Follow-up to [47816].

See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@47817 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-18 12:47:48 +00:00
Sergey Biryukov
b91e74d2f6 Themes: Prevent activation and live preview of themes that require a higher version of PHP or WordPress.
Props afragen, jorbin, TimothyBlynJacobs, SergeyBiryukov.
See #48491.

git-svn-id: https://develop.svn.wordpress.org/trunk@47816 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-18 12:30:04 +00:00
Sergey Biryukov
6ec559b2ba Site Health: Use WP_Theme::parent() in the inactive themes test as a more reliable check that the parent theme exists.
This is also more consistent with the other instances of directly referencing `WP_Theme::parent()` properties or methods in core.

Props mukesh27, juanlopez4691, davidbaumwald, afragen, SergeyBiryukov.
Fixes #49934.

git-svn-id: https://develop.svn.wordpress.org/trunk@47815 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-18 04:36:57 +00:00
Sergey Biryukov
5e43c07be4 Coding Standards: Fix WPCS issues in plugin and theme upgrader classes.
See #49542.

git-svn-id: https://develop.svn.wordpress.org/trunk@47814 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-17 09:37:12 +00:00
Sergey Biryukov
2a81a84e12 Accessibility: Login and Registration: Respect the prefers-reduced-motion media query for "shake" CSS animation on login failure.
This shake should not occur when the user has opted to reduce motion, for example by selecting the "Reduce motion" option in macOS' preferences or unselecting "Show animations in Windows" in Windows' preferences.

Follow-up to [47226].

Props eddystile, johnbillion, sabernhardt, afercia, audrasjb.
Fixes #49723.

git-svn-id: https://develop.svn.wordpress.org/trunk@47813 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-16 20:23:04 +00:00
Timothy Jacobs
c85005dec1 Coding Standards: Correct docblock indentation.
Fixes PHPCS failure introduced in r47811.


git-svn-id: https://develop.svn.wordpress.org/trunk@47812 602fd350-edb4-49c9-b593-d223f7449a82
2020-05-16 19:54:20 +00:00