Commit Graph

43185 Commits

Author SHA1 Message Date
Timothy Jacobs
bb395706f4 REST API: Support embedding links in rest_preload_api_request().
Props lpawlik, spacedmonkey.
Fixes #51722.


git-svn-id: https://develop.svn.wordpress.org/trunk@50005 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-23 23:25:40 +00:00
Sergey Biryukov
d4eac17e3d App Passwords: Use correct translation function for a heading on Authorize Application screen.
Props akramipro.
Fixes #52351.

git-svn-id: https://develop.svn.wordpress.org/trunk@50003 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-23 13:11:52 +00:00
Sergey Biryukov
d062656b8a Docs: Fix typo in WP_Links_List_Table DocBlock.
Props audrasjb.
Fixes #52349.

git-svn-id: https://develop.svn.wordpress.org/trunk@50002 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-23 07:23:28 +00:00
Sergey Biryukov
21b667b840 External Libraries: First pass at fixing jQuery deprecations in WordPress core and bundled themes.
To be able to disable jQuery Migrate as step 3 of updating the jQuery version shipped with WordPress, all `JQMIGRATE` warnings in the browser console will have to be addressed.

This includes many minor adjustments to a wide array of core files.

Follow-up to:
* Step 1: Disabling jQuery Migrate 1.4.1 in WordPress 5.5: [48323], [48324]
* Step 2: Updating jQuery to 3.5.1 and adding jQuery Migrate 3.3.x in WordPress 5.6: [49101], [49338], [49615], [49649]

Props Clorith, azaozz.
See #51812.

git-svn-id: https://develop.svn.wordpress.org/trunk@50001 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-22 12:30:39 +00:00
Sergey Biryukov
c145ff4a1a 5.7-alpha-50000 🎉🙌❤️
Thank you for the past
Excited for the future
We are #WordPressStrong!

git-svn-id: https://develop.svn.wordpress.org/trunk@50000 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-21 12:37:39 +00:00
Sergey Biryukov
f3d0d8a1c1 Twenty Twenty-One: Consistently use Yoda condition for display_title_and_tagline setting.
Props mukesh27.
Fixes #52329.

git-svn-id: https://develop.svn.wordpress.org/trunk@49994 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-21 12:15:47 +00:00
Sergey Biryukov
2b09df97d8 Twenty Twenty-One: Add missing HTML comments for </header> tag.
This brings some consistency to closing `</header>` tags in theme templates and ensures they all have an associated HTML comment.

Props freewebmentor, mukesh27.
Fixes #52328.

git-svn-id: https://develop.svn.wordpress.org/trunk@49993 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-21 12:08:50 +00:00
Felix Arntz
176a1f53f0 Robots: Introduce Robots API.
This changeset introduces a filter-based Robots API, providing central control over the `robots` meta tag.

* Introduces `wp_robots()` function which should be called anywhere a `robots` meta tag should be included.
* Introduces `wp_robots` filter which allows adding or modifying directives for the `robots` meta tag. The `wp_robots()` function is entirely filter-based, i.e. if no filter is added to `wp_robots`, no directives will be present, and therefore the entire `robots` meta tag will be omitted.
* Introduces the following `wp_robots` filter functions which replace similar existing functions that were manually rendering a `robots` meta tag:
    * `wp_robots_noindex()` replaces `noindex()`, which has been deprecated.
    * `wp_robots_no_robots()` replaces `wp_no_robots()`, which has been deprecated.
    * `wp_robots_sensitive_page()` replaces `wp_sensitive_page_meta()`, which has been deprecated. Its rendering of the `referrer` meta tag has been moved to another new function `wp_strict_cross_origin_referrer()`.

Migration to the new functions is straightforward. For example, a call to `add_action( 'wp_head', 'wp_no_robots' )` should be replaced with `add_filter( 'wp_robots', 'wp_robots_no_robots' )`.

Plugins and themes that render their own `robots` meta tags are encouraged to switch to rely on the `wp_robots` filter in order to use the central management layer now provided by WordPress core.

Props adamsilverstein, flixos90, timothyblynjacobs, westonruter.
See #51511.


git-svn-id: https://develop.svn.wordpress.org/trunk@49992 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-21 01:35:16 +00:00
Jonathan Desrosiers
51fe5978b6 Build/Test Tools: Update CSS files after grunt precommit:css.
This removes instances of the `-moz-user-select` property, which was required until Firefox 68.

Firefox is currently in version 84, so these can safely be removed.

Fixes #52332.

git-svn-id: https://develop.svn.wordpress.org/trunk@49991 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 19:05:39 +00:00
Jonathan Desrosiers
0c227432cd Build/Test Tools: Update more NPM packages
This updates two NPM packages:
- `qunit` from `2.13.0` to `2.14.0`.
- `sinon` from `9.2.2` to `9.2.3`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@49990 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 14:40:24 +00:00
Jonathan Desrosiers
f5998c561a Build/Test Tools: Update the uglify-js package.
This updates the `uglify-js` package from version `3.12.4` to `3.12.5`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@49989 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 13:33:33 +00:00
Sergey Biryukov
d10b9e9b88 Twenty Twenty-One: Add missing styles for <button> element.
Props poena, slaFFik.
Fixes #52029.

git-svn-id: https://develop.svn.wordpress.org/trunk@49988 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 07:04:32 +00:00
Sergey Biryukov
62b2606d7e Twenty Twenty-One: Clean up Button styles.
This change restructures the Button element styles for better a11y and expected color behaviors. Here what has changed:

- The `button-style()` mixin is now the ''single source or truth'' for how Button should look site-wide.
  - Button Block, File Block, and Search form Blocks all rely on this one mixin.
  - The same styles is also applied to the `<button>` element which appears in widgets, the 404 search form and comments form.
- Improves expected button styles for various conditions and contexts as follows: 
  - User color palette selections for Buttons are retained regardless of a parent block’s color settings or dark-mode.
  - Supports both Default/Filled styles and Outline styles.
  - More consistent `:hover` and `:active` styles.
  - `:focus` styles are now always visible and legible.
- Adds a `--local-color` color variable to scope color relationships to nested blocks.
- Reduces selectors in `style.css` output.
- 1:1 experience between editor and front end button styles.
- Properly supports Dark-mode.

Props allancole, poena, scruffian, megphillips91.
Fixes #51927.

git-svn-id: https://develop.svn.wordpress.org/trunk@49987 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 05:49:28 +00:00
Peter Wilson
0839d27da9 Media: Ensure get_post_status() does not contain half a comment.
Removes a misplaced comment, follow up to [49985].

Props SergeyBiryukov.
Fixes #52326.



git-svn-id: https://develop.svn.wordpress.org/trunk@49986 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 04:58:20 +00:00
Peter Wilson
56939ff70e Media: Ensure get_post_status() returns correct result for attachments.
Prevent `get_post_status()` returning `false` for attachments if the parent post has been deleted. The returned attachment post status is now passed through the `get_post_status` filter.

Add tests for `get_post_status()`.

Props peterwilsoncc, timothyblynjacobs for review.
Fixes #52326.



git-svn-id: https://develop.svn.wordpress.org/trunk@49985 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-20 04:39:24 +00:00
Sergey Biryukov
9264f3ef77 Upgrade/Install: Display version number on the "Re-install now" button on WordPress Updates screen.
This makes the button label more clear and allows for removing unnecessary description.

Props afragen, audrasjb.
Fixes #51774.

git-svn-id: https://develop.svn.wordpress.org/trunk@49984 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-19 16:46:50 +00:00
Jonathan Desrosiers
520b60d05b Build/Test Tools: Update the webpack-dev-server package.
This updates the `webpack-dev-server` package from version `3.11.1` to `3.11.2`.

See #51801.

git-svn-id: https://develop.svn.wordpress.org/trunk@49983 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-19 16:35:25 +00:00
Greg Ziółkowski
f84ebe3fe7 Blocks: Add automatic RTL handlind for block styles registered from metadata
Related Gutenberg issue: https://github.com/WordPress/gutenberg/pull/28274

With this change it is going to be possible to use the same pattern that wp_style_add_data uses for RTL handling. If the block style file with "-rtl.css" is included in addition to the regular style referenced in "block.json" file then it is going to be automatically registered.

Props swisspidy, aristath.
See #52301.



git-svn-id: https://develop.svn.wordpress.org/trunk@49982 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-19 11:48:59 +00:00
Greg Ziółkowski
edd77c0791 Blocks: Add i18n support to register_block_type_from_metadata
Related Gutenberg issue: https://github.com/WordPress/gutenberg/issues/23636.
Related WP-CLI PR: https://github.com/wp-cli/i18n-command/pull/210.
Related documentation proposal: https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-metadata.md#internationalization-not-implemented

Adds programatic i18n support to `register_block_type_from_metadata` function for block settings registered from `block.json` file that provides `textdomain` field.


Props swissspidy, ocean90.
Fixes #52301.



git-svn-id: https://develop.svn.wordpress.org/trunk@49981 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-19 11:04:03 +00:00
Kelly Choyce-Dwan
2651809673 Twenty Twenty-One: Remove duplicate CSS rules.
Introduces a new PostCSS plugin, `postcss-discard-duplicates`, which will automatically remove any duplicate CSS rules. All the CSS that is removed shows up again later in the file. This also fixes a bug from `postcss-css-variables`, where media queries are duplicated.

Fixes #52158.
Props poena.



git-svn-id: https://develop.svn.wordpress.org/trunk@49980 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 17:51:58 +00:00
Sergey Biryukov
b6830fabc4 Media: Use consistent method for instantiating an attachment author object in Media Library.
Previously, attachments without an author could cause a PHP fatal error due to calling the `::exists()` method on a `false` value.

Props antpb, carloscastilloadhoc, hellofromTonya, garrett-eclipse.
Fixes #52030.

git-svn-id: https://develop.svn.wordpress.org/trunk@49979 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 12:53:30 +00:00
Sergey Biryukov
d7844bcc08 General: Set svn:eol-style for some more files in the root directory.
Follow-up to [43309], [48650], [48845].

See #51113.

git-svn-id: https://develop.svn.wordpress.org/trunk@49978 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 12:42:34 +00:00
Sergey Biryukov
cfa490b16b Docs: Link to the parent function for accepted arguments in some filters for HTML output.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49977 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 12:26:50 +00:00
Sergey Biryukov
ca5538dda3 Posts, Post Types: Introduce a filter paginate_links() output.
Props sabernhardt, audrasjb, re.ardestani.
Fixes #44018.

git-svn-id: https://develop.svn.wordpress.org/trunk@49976 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 12:05:06 +00:00
Sergey Biryukov
fa7f87b546 Coding Standards: Improve code layout in wp-admin/includes/class-wp-media-list-table.php.
This allows for better readability and easier understanding of where each section opens and closes.

Props laxman-prajapati, hansjovisyoast, audrasjb.
Fixes #51014.

git-svn-id: https://develop.svn.wordpress.org/trunk@49975 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 09:48:23 +00:00
Peter Wilson
5582e4965c Tests: Remove references to post status public.
Replace invalid post status `public` with the valid status `publish`.

See #51802.



git-svn-id: https://develop.svn.wordpress.org/trunk@49974 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-18 03:26:29 +00:00
Joe Dolson
e7cebf49e5 Widgets: Implement TinyMCE on text widgets in Accessibility Mode
TinyMCE was not implemented on the accessibility mode for widgets, disabling text editing fields. Change ensures that TinyMCE is initialized when accessibility mode is set up. Prior implementation hid the text widget fields if they were empty, which they always were for new widgets.

Props MadtownLems, alexstine, hareesh-pillai, dariak

git-svn-id: https://develop.svn.wordpress.org/trunk@49973 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 18:15:21 +00:00
Dominik Schilling
fc2e5e9ea8 Script Loader: Remove unused source file for wp-a11y.js which was replaced with the @wordpress/a11y package.
Props afercia, audrasjb.
See [46167], [46169], and [46179].
Fixes #50093.

git-svn-id: https://develop.svn.wordpress.org/trunk@49972 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 17:49:25 +00:00
SergeyBiryukov
6e98255975 Privacy: Update unit test files missed in [49970].
See #51849.

git-svn-id: https://develop.svn.wordpress.org/trunk@49971 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 17:48:01 +00:00
Sergey Biryukov
fdd9fa6107 Privacy: Use more consistent wording for strings related to personal data requests.
This replaces "user privacy" in various error messages with "personal data", for consistency with other existing strings.

Follow-up to [49090].

Props xkon, transl8or.
Fixes #51849.

git-svn-id: https://develop.svn.wordpress.org/trunk@49970 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 17:45:01 +00:00
Dominik Schilling
b4f5b5e7fc Customize: Update button label reference in themes help text to reflect the label introduced in [41626].
Props ovidiul.
See #39896, #42305.
Fixes #52271.

git-svn-id: https://develop.svn.wordpress.org/trunk@49969 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 16:59:08 +00:00
Sergey Biryukov
698f341e1c Docs: Correct description for wp_slash() and wp_unslash().
The array received or returned by these functions is not always an array of strings, for example when slashing or unslashing an array of arrays.

Follow-up to [47400], [48441], [49926].

Props johnbillion.
See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49968 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 16:36:14 +00:00
Dominik Schilling
d1ac4cd40a I18N: Add support for German (Austria) locale in remove_accents().
Props patopaiar, nonverbla.
Fixes #52110.

git-svn-id: https://develop.svn.wordpress.org/trunk@49967 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 15:44:04 +00:00
Timothy Jacobs
244e4d4e63 REST API: Allow sending an empty array to delete multi meta keys.
Previously, only `null` was supported.

Fixes #50790.
Props chrisvanpatten.


git-svn-id: https://develop.svn.wordpress.org/trunk@49966 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-17 00:49:39 +00:00
Sergey Biryukov
994e657e74 Coding Standards: Fix WPCS issue in [49963].
Props pawki07, mukesh27.
Fixes #52316. See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49965 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-16 17:19:00 +00:00
Sergey Biryukov
8a28115650 Menus: Fix minor UI issues on Edit Menus screen on smaller viewports.
This removes extra margin from the Select button and ensures the checkboxes in the Menu Settings section are fully visible.

Props sabernhardt, passoniate, mukesh27, afercia, audrasjb, Boniu91, ravipatel, jomisica.
Fixes #49245, #51706.

git-svn-id: https://develop.svn.wordpress.org/trunk@49964 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-16 04:58:49 +00:00
Sergey Biryukov
fbab01c8ce Docs: In various @return tags, list the expected type first, instead of false.
Follow-up to [46696], [47060], [49926], [49927], [49929].

See #51800.

git-svn-id: https://develop.svn.wordpress.org/trunk@49963 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-15 20:06:50 +00:00
Sergey Biryukov
965fa1786b I18N: Add context for the Public string in site attributes list on Edit Site screen.
This allows for the string to be distinguished from a post status of the same name, which is useful for better translations in languages were "public" can be masculine or feminine depending on context.

Props audrasjb.
Fixes #52309.

git-svn-id: https://develop.svn.wordpress.org/trunk@49962 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-15 17:37:37 +00:00
Kelly Choyce-Dwan
c9a6381244 Administration: Update hover and focus states in admin menu.
This adds a border along the side of admin menu links when hovering or focusing on them, as color should not be the only indicator of link state.

Props accessiblejoe florianziegler afercia rianrietveld michael-arestad ryan hedgefield audrasjb ibdz.
Fixes #28599.



git-svn-id: https://develop.svn.wordpress.org/trunk@49961 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-14 21:58:25 +00:00
Sergey Biryukov
a78715e224 Twenty Twenty-One: Remove leftover file from build:rtl task.
The `style-dark-mode.css` file is now in `assets/css/` and has its own `build:dark-rtl` task.

Props yoavf.
Fixes #52293.

git-svn-id: https://develop.svn.wordpress.org/trunk@49960 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-14 12:12:46 +00:00
Peter Wilson
495e236505 Build/Test Tools: Update script loader following [49933].
See #51801.


git-svn-id: https://develop.svn.wordpress.org/trunk@49959 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-14 02:22:26 +00:00
Sergey Biryukov
72ad4e1bcf Accessibility: Administration: Remove <strong> tags from labels on plugin/theme editor screens.
If every single label is emphasized with a `<strong>` tag, none of them is really emphasized anymore.

This removes the tags in favor of CSS styling, for consistency with the other labels on the screen.

Props chemiker, audrasjb, mukesh27, paaljoachim, estelaris, ibdz, SergeyBiryukov.
Fixes #52232.

git-svn-id: https://develop.svn.wordpress.org/trunk@49958 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-13 14:06:30 +00:00
Sergey Biryukov
98b6d33564 Docs: Clarify the instructions on starting the local environment for the first time.
This adds a mention of cloning the repository before running the npm commands in the terminal. 

Props justinahinon.
Fixes #52278. See #51414.

git-svn-id: https://develop.svn.wordpress.org/trunk@49957 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-12 11:32:48 +00:00
Sergey Biryukov
f51a70931c Privacy: Clarify the "Contact information" heading in default privacy policy content.
The section is intended to tell how to contact the website owners, and is not about the visitor's contact information.

Props shital-patel, TylerTork, audrasjb.
Fixes #52272.

git-svn-id: https://develop.svn.wordpress.org/trunk@49956 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-11 19:51:52 +00:00
John Blackbourn
6aca60d33a REST API: Corrections and improvements to docblocks for REST API filters.
See #51800


git-svn-id: https://develop.svn.wordpress.org/trunk@49955 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-10 22:21:39 +00:00
Sergey Biryukov
fcaf51bd20 Themes: Add missing <p> tags to error message in WP_Theme_Install_List_Table::prepare_items().
Follow-up to [45909], [49953].

See #52254.

git-svn-id: https://develop.svn.wordpress.org/trunk@49954 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-10 19:35:45 +00:00
Sergey Biryukov
75b4c28619 Bootstrap/Load: Add missing <p> tags to error message in wp-load.php.
Follow-up to [45909].

Props mukesh27, TimothyBlynJacobs, audrasjb.
Fixes #52254.

git-svn-id: https://develop.svn.wordpress.org/trunk@49953 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-10 19:26:46 +00:00
Timothy Jacobs
1f2695ed1f REST API: Fix fatal error on multisite when calling the single item plugin routes.
The `is_network_only_plugin` and `is_plugin_active` functions are not available in a front-end context and must be specifically loaded.

Props oakesjosh.
Fixes #52205.


git-svn-id: https://develop.svn.wordpress.org/trunk@49952 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-09 20:20:44 +00:00
Sergey Biryukov
c8c248e967 Tests: Set up the plugin download in multisite plugin tests to come locally.
This brings consistency between single site and multisite in REST API plugin installation tests.

Previously, multisite tests were unnecessarily downloading the plugin from WordPress.org on each test run, causing external HTTP requests and leading to failures in case of a timeout.

Follow-up to [48242], [49491], [49913].

See #51669.

git-svn-id: https://develop.svn.wordpress.org/trunk@49951 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-09 05:56:04 +00:00
John Blackbourn
8de262e8f8 Posts, Post Types: Introduce the wp_list_table_show_post_checkbox filter which allows the visibility of the bulk edit checkbox on the post list table to be controlled separately from the edit_post capability of the current user.
Props coreyw, alexstine

Fixes #51291


git-svn-id: https://develop.svn.wordpress.org/trunk@49950 602fd350-edb4-49c9-b593-d223f7449a82
2021-01-08 17:16:28 +00:00