Commit Graph

42084 Commits

Author SHA1 Message Date
Riad Benguella 5b9b012e53 Block Editor: Remove the gutenberg domain name from the block-patterns.php file
Props SergeyBiryukov.
Fixes #50669.


git-svn-id: https://develop.svn.wordpress.org/trunk@48494 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 14:11:40 +00:00
Sergey Biryukov da730fce4d Upgrade/Install: Check if the theme installer skin's `overwrite` property exists in `Theme_Upgrader::install_strings()`.
This ensures consistency with `Plugin_Upgrader::install_strings()` and resolves an issue caused by the property not existing in other upgrader implementations.

Props schlessera, azaozz.
See #50670.

git-svn-id: https://develop.svn.wordpress.org/trunk@48493 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 13:17:13 +00:00
Riad Benguella bd63261888 Block Editor: Add theme support flag to opt-out of Core Block Patterns.
WordPress Core comes by default with a number of block patterns and a frequent request was to be able to opt-out of the Core block patterns. 
You can now opt-out using remove_theme_support( 'core-block-patterns' )

Props desrosj, nosolosw.
Fixes #50669.


git-svn-id: https://develop.svn.wordpress.org/trunk@48492 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-16 11:48:49 +00:00
Sergey Biryukov b001723394 Docs: Add return value description for `register_theme_directory()`.
Props stevenlinx.
Fixes #50665.

git-svn-id: https://develop.svn.wordpress.org/trunk@48491 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-15 12:08:32 +00:00
Sergey Biryukov caefeeea17 Docs: Link to `add_theme_support()` for the list of supported theme features in `current_theme_supports()` and related functions.
Props stevenlinx.
Fixes #50657.

git-svn-id: https://develop.svn.wordpress.org/trunk@48490 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-15 11:21:23 +00:00
Jake Spurlock afb11188d2 Post 5.5 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@48482 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 17:39:48 +00:00
Jake Spurlock 8921997100 WordPress 5.5 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@48481 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 17:00:11 +00:00
Sergey Biryukov c843cf19c3 Taxonomy: Make some adjustments to handling default terms for custom taxonomies:
* Move default term assignment from `wp_set_object_terms()` to `wp_insert_post()`.
* Make sure the passed taxonomy list overwrites the existing list if not empty.
* Remove the default term option on `unregister_taxonomy()`.
* Prevent deletion of the default term in `wp_delete_term()`.

Props enrico.sorcinelli, TimothyBlynJacobs.
See #43517.

git-svn-id: https://develop.svn.wordpress.org/trunk@48480 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 16:39:44 +00:00
Andrea Fercia 9181ecff85 Accessibility: Security: Improves the accessible audible messages for Plugins & Themes Auto-Updates.
- changes the politeness level of the two error messages introduced in [47835] to `assertive`
- remove unnecessary `polite` parameters as that's the default value

See #50512, #50052.



git-svn-id: https://develop.svn.wordpress.org/trunk@48479 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 15:44:16 +00:00
Sergey Biryukov 74b985fd7d Docs: Synchronize description for the `$allowed_html` parameter of various KSES functions.
Follow-up to [43016].

Props Christian1012, jdgrimes, markparnell.
Fixes #39542. See #33801.

git-svn-id: https://develop.svn.wordpress.org/trunk@48478 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:39:16 +00:00
Jonathan Desrosiers 7bdff387e2 General: Rename the `$new_whitelist_options` global variable.
This change renames `$new_whitelist_options` to `$new_allowed_options`. This makes the variable’s purpose more clear, and promotes using more inclusive language.

For backwards compatibility, the new variable is passed by reference to the old one.

Follow up to [48121].

Props ayeshrajans, desrosj, jorbin, SergeyBiryukov.
See #50413.
Fixes #50434.

git-svn-id: https://develop.svn.wordpress.org/trunk@48477 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:31:22 +00:00
swissspidy 0ee9100e6d Sitemaps: Ensure entry for ‘page’ post type sitemap in index.
If there are no pages and no static homepage, there will still be one sitemap including the homepage URL.

This change ensures that this sitemap is correctly listed in the sitemap index.

Props Chouby, pacifika, elrae.
Fixes #50571.

git-svn-id: https://develop.svn.wordpress.org/trunk@48476 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:24:02 +00:00
John Blackbourn 7d5b488b3b Docs: Improve docs for arguments that accept a numerically indexed array of associative arrays.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48475 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 12:08:28 +00:00
Pascal Birchler efb0b58598 Sitemaps: Exclude post types and taxonomies that are not publicly queryable.
Props Cybr.
Fixes #50607.

git-svn-id: https://develop.svn.wordpress.org/trunk@48474 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:54:49 +00:00
John Blackbourn fa9e258750 Docs: Correct and improve inline docs for parameters that accept a callback function.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48473 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:54:26 +00:00
Pascal Birchler 585f623b4d Sitemaps: Add missing slash when calling `home_url()` for consistency.
Props Chouby.
Fixes #50570.

git-svn-id: https://develop.svn.wordpress.org/trunk@48472 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:52:43 +00:00
Pascal Birchler 649b7aae92 Sitemaps: Add wrapping `<div>` around sitemap in stylesheet.
This makes it easier to style the sitemap and for example center the entire content area.

Props ramiy.
Fixes #50622.

git-svn-id: https://develop.svn.wordpress.org/trunk@48471 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:43:54 +00:00
Pascal Birchler cf4897f5d8 Sitemaps: Pass full paths to `home_url()` calls.
This makes it easier for plugins using the `home_url` filter to detect sitemap URLs.

Props Chouby.
Fixes #50592.

git-svn-id: https://develop.svn.wordpress.org/trunk@48470 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:41:47 +00:00
Ella van Durpe 479a125882 Editor: update packages for beta 2
Fixes #50651.



git-svn-id: https://develop.svn.wordpress.org/trunk@48469 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:36:39 +00:00
Sergey Biryukov 63ad9247c1 Privacy: Set the direction for the "Username or email address" field on privacy screens to LTR.
This is consistent with other email inputs across the admin.

Follow-up to [27743], [42967].

Props man4toman, sushyant.
Fixes #50625.

git-svn-id: https://develop.svn.wordpress.org/trunk@48468 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:15:28 +00:00
Sergey Biryukov a128b52eb0 Docs: Improve description for `get_blog_post()`.
Props stevenlinx.
Fixes #50655.

git-svn-id: https://develop.svn.wordpress.org/trunk@48467 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 11:05:01 +00:00
Sergey Biryukov 80fae63d57 Tests: Ignore EOL differences in some tests using multiline string assertions.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

Follow-up to [46612], [48443].

See #31432.

git-svn-id: https://develop.svn.wordpress.org/trunk@48466 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 01:40:33 +00:00
Andrew Ozz 719dcd244a Administration: Attempt to even-out the new Up/Down arrows in metabox headings and make them look a bit better. Also group them a little closer together in an attempt to reduce confusion of having two down arrows next to one another. Move the focus outline to the button instead of only the icon.
Fixes #39074.

git-svn-id: https://develop.svn.wordpress.org/trunk@48465 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 01:35:47 +00:00
Sergey Biryukov 022ebde54d Tests: Replace hardcoded `/tmp/` references with `get_temp_dir()`.
This allows more tests to pass on Windows.

Props danielhuesken, DJPaul, christophherr, joemcgill, netweb, davidbaumwald, SergeyBiryukov.
Fixes #40856, #39975.

git-svn-id: https://develop.svn.wordpress.org/trunk@48464 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 01:28:17 +00:00
Sergey Biryukov 0ded98ff2c Tests: Copy themes from `tests/phpunit/data` to `wp-content/themes`, instead of creating a symlink.
This allows the theme file tests in `phpunit/tests/link/themeFile.php` to run on Windows without requiring administrative privileges.

Follow-up to [42812], [42819].

Props danielhuesken, christophherr, davidbaumwald, SergeyBiryukov.
See #40856, #39975.

git-svn-id: https://develop.svn.wordpress.org/trunk@48463 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-14 00:32:36 +00:00
John Blackbourn f36c42c700 Docs: Miscellaneous docblock corrections and improvements.
See #49572

git-svn-id: https://develop.svn.wordpress.org/trunk@48462 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 22:08:16 +00:00
Jake Spurlock c3cdd9c962 Customize: Ensure that widgets and nav-menus can be closed after entering content.
Previously, the ⌧ button would close the search panel, or remove the results. This restores that, in addition pressing escape will do the same.

Fixes #48198.

Props garrett-eclipse, tobifjellner, afercia, JavierCasares.



git-svn-id: https://develop.svn.wordpress.org/trunk@48461 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 20:13:49 +00:00
Andrea Fercia 81364742b1 Accessibility: Improve reordering of the post boxes in the block editor meta boxes area.
Follow-up to [48373].
- ignores hidden "sortables" areas 
- hides the reorder buttons when there's only one post box 
- makes the reorder buttons slightly bigger to match the side of the toggle button

Fixes #39074.


git-svn-id: https://develop.svn.wordpress.org/trunk@48460 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 18:01:31 +00:00
Jake Spurlock a932bb3851 Bundled Themes: Add custom color pallettes for block editor.
Gutenberg 7.9 added support for themes to bundle their own custom styles in to the editor. These changes have been added to 2010 - 2016.

See #50120. 

Props kjellr, sabernhardt, ianbelanger. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48459 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 17:06:57 +00:00
Sergey Biryukov d8c91ce45f Tests: Download Chromium for e2e and JS tests only.
This reduces the chance of random failures due to network timeouts and avoids the overhead of unnecessarily downloading ~120 MB for PHP tests.

Follow-up to [47449], [47459], [47867], [48177].

Fixes #50649.

git-svn-id: https://develop.svn.wordpress.org/trunk@48458 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 15:18:49 +00:00
Sergey Biryukov 6cba6fdc08 Docs: Improve description of the `$text` parameter in `cancel_comment_reply_link()`.
Props stevenlinx.
Fixes #50642.

git-svn-id: https://develop.svn.wordpress.org/trunk@48457 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 14:40:27 +00:00
Jonathan Desrosiers 6cf53ad3bf Administration: Update Dashicons to the latest version.
This update introduces the following new icons:

- `.dashicons-align-pull-left (f10a)`
- `.dashicons-align-pull-right (f10b)`
- `.dashicons-block-default (f12b)`
- `.dashicons-cloud-saved (f137)`
- `.dashicons-cloud-upload (f13b)`
- `.dashicons-columns (f13c)`
- `.dashicons-cover-image (f13d)`
- `.dashicons-embed-audio (f13e)`
- `.dashicons-embed-generic (f13f)`
- `.dashicons-embed-photo (f144)`
- `.dashicons-embed-post (f146)`
- `.dashicons-embed-video (f149)`
- `.dashicons-exit (f14a)`
- `.dashicons-html (f14b)`
- `.dashicons-info-outline (f14c)`
- `.dashicons-insert-after (f14d)`
- `.dashicons-insert-before (f14e)`
- `.dashicons-remove (f14f)`
- `.dashicons-shortcode (f150)`
- `.dashicons-table-col-after (f151)`
- `.dashicons-table-col-before (f152)`
- `.dashicons-table-col-delete (f15a)`
- `.dashicons-table-row-after (f15b)`
- `.dashicons-table-row-before (f15c)`
- `.dashicons-table-row-delete (f15d)`
- `.dashicons-saved (f15e)`
- `.dashicons-airplane (f15f)`
- `.dashicons-amazon (f162)`
- `.dashicons-bank (f16a)`
- `.dashicons-beer (f16c)`
- `.dashicons-bell (f16d)`
- `.dashicons-calculator (f16e)`
- `.dashicons-coffee (f16f)`
- `.dashicons-database-add (f170)`
- `.dashicons-database-export (f17a)`
- `.dashicons-database-import (f17b)`
- `.dashicons-database-remove (f17c)`
- `.dashicons-database-view (f17d)`
- `.dashicons-database (f17e)`
- `.dashicons-drumstick (f17f)`
- `.dashicons-edit-page (f186)`
- `.dashicons-food (f187)`
- `.dashicons-fullscreen-alt (f188)`
- `.dashicons-fullscreen-exit-alt (f189)`
- `.dashicons-games (f18a)`
- `.dashicons-google (f18b)`
- `.dashicons-hourglass (f18c)`
- `.dashicons-linkedin (f18d)`
- `.dashicons-money-alt (f18e)`
- `.dashicons-open-folder (f18f)`
- `.dashicons-pdf (f190)`
- `.dashicons-pets (f191)`
- `.dashicons-pinterest (f192)`
- `.dashicons-printer (f193)`
- `.dashicons-privacy (f194)`
- `.dashicons-reddit (f195)`
- `.dashicons-spotify (f196)`
- `.dashicons-superhero-alt (f197)`
- `.dashicons-superhero (f198)`
- `.dashicons-twitch (f199)`
- `.dashicons-whatsapp (f19a)`
- `.dashicons-youtube (f19b)`
- `.dashicons-car (f16b)`
- `.dashicons-podio (f19c)`
- `.dashicons-xing (f19d)`


This update is the final planned update of the Dashicons font. Moving forward, the more modern approach of using SVG icons directly (as the block editor currently does) will be explored. More information on the future of Dashicons can be found on the Make Design blog: https://make.wordpress.org/design/2020/04/20/next-steps-for-dashicons/.

Props joen, johnjamesjacoby, empireoflight, youknowriad, netweb, zodiac1978, desrosj, automaton, chrisvanpatten.
Fixes #49913.

git-svn-id: https://develop.svn.wordpress.org/trunk@48456 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 14:24:06 +00:00
Sergey Biryukov 4171c2485c Upgrade/Install: Simplify compatibility checks for uploaded plugins and themes for better readability.
Use `$new_plugin_data` and `$new_theme_data` as a shorthand for the corresponding `$this->upgrader` properties.

Follow-up to [48390], [48448].

Props afragen.
See #9757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48455 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-13 13:33:32 +00:00
Andrew Ozz dd50193d6a Media: Fix `wp_image_file_matches_image_meta()` to also match when the original image URL is used.
Also refreshes and fixes some of the unit tests for media, and replaces test-image-large.png with test-image-large.jpg which is larger to allow testing of `original_image` in the image meta.

Fixes #50628.



git-svn-id: https://develop.svn.wordpress.org/trunk@48454 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 21:18:38 +00:00
Andrew Ozz daf168c088 Upgrade/Install: Use `wp_strip_all_tags()` for the fields in the compare table on the "Update theme/plugin from uploaded zip" screen. Some may contain HTML.
See #9757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48453 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 19:59:00 +00:00
Timothy Jacobs adcf3d88b4 REST API: Add Content-Disposition, Content-MD5 and X-WP-Nonce as allowed cors headers.
The Content-Disposition and Content-MD5 headers allow for easier file uploading across domains by using a File/Blob object directly. The X-WP-Nonce header is allowed for making cross-origin and same-origin authenticated requests consistent.

Additionally a filter is introduced, "rest_allowed_cors_headers", to simplify the process of allowing additional request headers.

Props rmccue, TimothyBlynJacobs.
Fixes #41696.


git-svn-id: https://develop.svn.wordpress.org/trunk@48452 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 19:35:55 +00:00
Sergey Biryukov 26c296c397 Plugins: Make delete plugin message less scary.
This adds a check if the plugin actually has an uninstall routine before saying that its data will be deleted too.

Props samful, joostdevalk, joyously, Chouby, SergeyBiryukov.
Fixes #50346.

git-svn-id: https://develop.svn.wordpress.org/trunk@48451 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 13:20:58 +00:00
Sergey Biryukov cece47bd39 Administration: Restore the `excerpt` key for the Extended view mode for backward compatibility for now.
Props Offereins.
See #49715.

git-svn-id: https://develop.svn.wordpress.org/trunk@48450 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 11:34:18 +00:00
Sergey Biryukov f051ed3ffb Docs: Add a `@since` entry for the `$hook_extra` parameter added to `WP_Upgrader::download_package()`.
Follow-up to [48399].

See #49686.

git-svn-id: https://develop.svn.wordpress.org/trunk@48449 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 11:00:16 +00:00
Sergey Biryukov 51e92ced21 Upgrade/Install: Use `is_php_version_compatible()` and `is_wp_version_compatible()` in plugin and theme requirement checks.
Follow-up to [48390].

Props afragen.
See #9757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48448 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 10:53:36 +00:00
Sergey Biryukov b161e126a0 I18N: Move the "WordPress Backups" support URL to its own translatable string.
Follow-up to [48390].

See #9757.

git-svn-id: https://develop.svn.wordpress.org/trunk@48447 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 10:32:57 +00:00
Sergey Biryukov 8c2443d171 Docs: Miscellaneous DocBlock corrections for plugin and theme updates.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48446 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 01:17:51 +00:00
SergeyBiryukov 9d30b02ed1 Administration: Handle the result of `Plugin_Upgrader::bulk_upgrade()` for a plugin that is already at the latest version in the same way it is handled for themes.
This corrects a fragile check of the result in `wp_ajax_update_plugin()` that depended on the internal array pointer, and brings some consistency with `wp_ajax_update_theme()`.

Follow-up to [37714], [48401].
See #50448.

git-svn-id: https://develop.svn.wordpress.org/trunk@48445 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 01:14:01 +00:00
Sergey Biryukov 7cf1e60543 Docs: Improve documentation for `sanitize_user()`, `sanitize_title()`, `sanitize_title_with_dashes()`.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48444 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-12 01:11:35 +00:00
Sergey Biryukov 43c193f58b Tests: Ignore EOL differences in email tests using multiline string assertions.
Unix vs. Windows EOL style mismatches can cause misleading failures in tests using the heredoc syntax (`<<<`) or multiline strings as the expected result.

Follow-up to [46612], [48033].

Props davidbaumwald.
See #31432, #41750.

git-svn-id: https://develop.svn.wordpress.org/trunk@48443 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-11 23:27:51 +00:00
Sergey Biryukov accf884aac Docs: Correct comments in `tests/formatting/WPSlash.php` per the documentation standards.
See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48442 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-11 22:50:36 +00:00
Sergey Biryukov 4d964a8cf2 Docs: Synchronize `@since` notes for `add_magic_quotes()` and `wp_slash()`.
Follow-up to [48205], [48433].

See #49572.

git-svn-id: https://develop.svn.wordpress.org/trunk@48441 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-11 22:46:27 +00:00
Sergey Biryukov 7137014901 Bootstrap/Load: Adjust the logic in `add_magic_quotes()` for better readability.
Follow-up to [48205].

See #48605.

git-svn-id: https://develop.svn.wordpress.org/trunk@48440 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-11 22:42:35 +00:00
Sergey Biryukov a9368a89e5 Menus: Simplify the test for `wp_update_nav_menu_item()` with special characters in category name.
The `menu-item-title` value is saved as a `post_title` property, so the resulting property can be checked directly, without a callback.

Follow-up to [48416].

See #48011.

git-svn-id: https://develop.svn.wordpress.org/trunk@48439 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-11 21:46:29 +00:00
Sergey Biryukov d5cfd5c63c Revisions: Restore the return value of `wp_get_post_autosave()` to the documented type of `WP_Post` for backward compatibility.
Follow-up to [48422].

See #34560.

git-svn-id: https://develop.svn.wordpress.org/trunk@48438 602fd350-edb4-49c9-b593-d223f7449a82
2020-07-11 21:13:56 +00:00