Fixes a bug in the manipulation of selectors for block style variations that would result in an incorrect selector and fail to match the appropriate elements on the frontend.
Props aaronrobertshaw, ramonopoly, joemcgill.
Fixes#62471.
git-svn-id: https://develop.svn.wordpress.org/trunk@59814 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces the hardcoded hash symbol with running `maybe_hash_hex_color()` on the full `background-color` value provided via the custom background feature, so the hash is only added if it is needed. By doing so, if a theme developer sets a background color value that uses a hash (#), WordPress won't add an additional hash anymore when outputting the relevant CSS. Duplicate hash symbols (##) can break CSS background color declarations.
Props hovhanneshovakimyan, joyously, poena,
Fixes#40057.
git-svn-id: https://develop.svn.wordpress.org/trunk@59813 602fd350-edb4-49c9-b593-d223f7449a82
This allows `seek()` to be freely called when the current cursor at the provided bookmark.
Props dmsnell, jonsurrell, westonruter.
Fixes#62085.
git-svn-id: https://develop.svn.wordpress.org/trunk@59812 602fd350-edb4-49c9-b593-d223f7449a82
This extension provides the `hash()` function and support for the SHA-256 algorithm, both of which are required for upcoming security related changes. This extension is almost universally enabled, however it is technically possible to disable it on PHP 7.2 and 7.3, hence the introduction of this requirement and the corresponding requirement checks prior to installing or upgrading WordPress.
Props peterwilsoncc, ayeshrajans, dd32, SergeyBiryukov, johnbillion.
Fixes#60638, #62815, #56017
See #21022
git-svn-id: https://develop.svn.wordpress.org/trunk@59803 602fd350-edb4-49c9-b593-d223f7449a82
Fixes an issue where block style variations containing inner block type and element styles would have those inner styles stripped when the user attempting to save Global Styles does not have the `unfiltered_html` capability.
Props aaronrobertshaw, mukesh27, andrewserong.
Fixes#62372.
git-svn-id: https://develop.svn.wordpress.org/trunk@59802 602fd350-edb4-49c9-b593-d223f7449a82
Introduce `ignore_sticky` as a boolean argument for the posts endpoint for requests without the sticky posts being stuck. The new argument defaults to `false` with the value of the argument passed to `WP_Query`'s `ignore_sticky_posts` parameter.
Props audrasjb, danielbachhuber, joemcgill, johnbillion, jorbin, mamaduka, rmccue.
Fixes#35907.
git-svn-id: https://develop.svn.wordpress.org/trunk@59801 602fd350-edb4-49c9-b593-d223f7449a82
This cron event is not used when Multisite is in use.
Props debarghyabanerjee, johnbillion, narenin
Fixes#61450
git-svn-id: https://develop.svn.wordpress.org/trunk@59798 602fd350-edb4-49c9-b593-d223f7449a82
`matchdep` was introduced in [25243] to more easily manage `grunt-*` dependencies. The package has effectively been abandoned upstream, and the functionality can be replaced with a simple loop.
Props desrosj, spacedmonkey, swissspidy.
See #62221.
git-svn-id: https://develop.svn.wordpress.org/trunk@59797 602fd350-edb4-49c9-b593-d223f7449a82
For the Post Editor, preload '/wp/v2/global-styles/' . $global_styles_id with a context corresponding to user caps, that is, 'edit' for users that can edit global styles, and 'view' for everyone else.
Preloading the global styles endpoint according to role context means that admins and non admins, e.g., editors, avoid unnecessary client side requests.
Props ramonopoly.
Fixes#62322.
git-svn-id: https://develop.svn.wordpress.org/trunk@59795 602fd350-edb4-49c9-b593-d223f7449a82
The site editor now uses path based routing rather than query string arguments. This redirects the legacy query string URLs to the new routing.
Props youknowriad, peterwilsoncc, joemcgill, mukesh27, poena.
Fixes#62585.
git-svn-id: https://develop.svn.wordpress.org/trunk@59794 602fd350-edb4-49c9-b593-d223f7449a82
Updates the enqueued styles in various editors to remove target styles more precisely to where they are needed.
Removes the following stylesheets as dependencies of `wp-edit-blocks`:
* `wp-editor`
* `wp-reusable-blocks`
* `wp-patterns`
The `wp-editor` stylesheet is targeted to the items requiring the CSS:
* `edit-widgets`
* `customize-widgets`
* `edit-site`
Props ellatrix, youknowriad.
Fixes#62266, #62274.
git-svn-id: https://develop.svn.wordpress.org/trunk@59793 602fd350-edb4-49c9-b593-d223f7449a82
This changeset improves a bunch of error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.
Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
Fixes#43622.
git-svn-id: https://develop.svn.wordpress.org/trunk@59790 602fd350-edb4-49c9-b593-d223f7449a82
This changeset improves a bunch of WP-Admin error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.
Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
See #43622.
git-svn-id: https://develop.svn.wordpress.org/trunk@59789 602fd350-edb4-49c9-b593-d223f7449a82
This changeset replaces each occurrence of "Add New {Item}" label with "Add {Item}" in WordPress administration, to make the interface more consistent and simplify the translation effort.
Props jameskoster, audrasjb, ntsekouras, afercia, peterwilsoncc, youknowriad, joedolson, sukhendu2002, jdy68, beryldlg, fxbenard.
See #61219.
git-svn-id: https://develop.svn.wordpress.org/trunk@59784 602fd350-edb4-49c9-b593-d223f7449a82
This is a follow-up to [59776] and [59775] to add yet another file that was missed in the original commit.
See #62887.
git-svn-id: https://develop.svn.wordpress.org/trunk@59777 602fd350-edb4-49c9-b593-d223f7449a82
This updates the CSS for featured images in the classic editor that caused images to look skewed when auto-sizes are enabled.
Props maciejmackowiak, sainathpoojary, mukesh27, joemcgill.
Fixes#62597.
git-svn-id: https://develop.svn.wordpress.org/trunk@59773 602fd350-edb4-49c9-b593-d223f7449a82
Follow up to [59224]. Add CSS to cover usage of the `do_accordion_section()` function when used in extender contexts outside of the existing WordPress core usage.
Props mboynes, jorbin, joemcgill, joedolson.
Fixes#62907.
git-svn-id: https://develop.svn.wordpress.org/trunk@59772 602fd350-edb4-49c9-b593-d223f7449a82
This fixes a `ReferenceError` caused by a stray Unicode character in the unminified version of moxie.js. This has long been fixed upstream but the library cannot be wholesale updated in WordPress because of an incompatible license change.
Because of this, a new version is being tagged, `1.3.5.1`, and the file header has been updated to make it more clear that the file is a maintained fork with a high level list of changes made.
Props kinggmobb, jorbin, q0rban, azaozz, desrosj, sukhendu2002.
Fixes#59329.
git-svn-id: https://develop.svn.wordpress.org/trunk@59770 602fd350-edb4-49c9-b593-d223f7449a82
The WordPress Importer plugin has been maintained separately in a repository on GitHub since 2016. However, the unit tests were left in wordpress-develop due to the lack of a CI setup on GitHub.
With GitHub Actions set up for the plugin repository, these tests are now running in two locations. Because they are more relevant to the plugin itself, the tests have been synced, will run weekly through a `schedule` event, and are now being removed from wordpress-develop.
The only remaining test method in the `import` group covers `get_importers()`, which is a function maintained in WordPress Core itself.
Props frank-klein, netweb, dd32, peterwilsoncc, azaozz, desrosj, swissspidy.
Fixes#42668.
git-svn-id: https://develop.svn.wordpress.org/trunk@59769 602fd350-edb4-49c9-b593-d223f7449a82
As of UglifyJS >= 3.18.0, the default behavior is to process input as an ES module. This updates the relevant configurations to ensure the build process continues to use the previous behavior to avoid JavaScript errors in the minified versions of files.
Follow up to [58563], [58586], and [59509].
Props siliconforks, nataliat2004, poena, mai21, SergeyBiryukov.
Fixes#62767. See #61519, #62220.
git-svn-id: https://develop.svn.wordpress.org/trunk@59768 602fd350-edb4-49c9-b593-d223f7449a82
Includes bringing some consistency with a similar fragment in `WP_List_Table::months_dropdown()`.
Follow-up to [3724], [7062], [15491], [59755].
Props aristath, poena, afercia, SergeyBiryukov.
See #62279.
git-svn-id: https://develop.svn.wordpress.org/trunk@59767 602fd350-edb4-49c9-b593-d223f7449a82
Introduces normalization a number of arguments passed to `WP_Query` to increase cache hits for equivalent requests. For example `author__in => [ 1, 2 ]` and `author__in => [ 2, 1 ]` will now hit the same cache.
Prior to generating the SQL request and cache key, the following are sorted, made unique and type cast as appropriate.
* `post_type` when passed as an array
* `post_status` when passed as an array
* `term_query`s containing `terms`
* `cat`
* `category__in`
* `category__not_in`
* `category__and`
* `tag_slug__in`
* `tag__in`
* `tag__not_in`
* `tag__and`
* `tag_slug__in`
* `tag_slug__and`
* `post_parent__not_in`
* `author`
* `author__not_in`
* `author__in`
The following are sorted for the purposes of generating the cache key and SQL `WHERE` clause but unmodified for use in the `ORDER BY` SQL clause:
* `post_name__in`
* `post__in`
* `post_parent__in`
This commit includes changes to unrelated tests, assertions in `Tests_Query_ParseQuery::test_parse_query_cat_array_mixed()` and `WP_Test_REST_Posts_Controller::test_get_items_not_sticky_with_exclude()` have been modified to account for the sorting of the items above.
Props thekt12, peterwilsoncc, spacedmonkey, joemcgill, flixos90, mukesh27, pbearne, swissspidy.
Fixes#59516.
git-svn-id: https://develop.svn.wordpress.org/trunk@59766 602fd350-edb4-49c9-b593-d223f7449a82
Allow passing zero (`0`) via the `parents` argument. It is a valid value for hierarchical post types, often used to display top-level items.
Props mamaduka, audrasjb, peterwilsoncc.
Fixes#62901.
git-svn-id: https://develop.svn.wordpress.org/trunk@59761 602fd350-edb4-49c9-b593-d223f7449a82
Both `name` and `label` properties are required when registering a block style. If the label is missing, assign `name` as the value for the `label`, to ensure the property is defined. This avoids a PHP warning in such case.
Props poena, Rahmohn, aaronrobertshaw, audrasjb, rinkalpagdar.
Fixes#52592.
git-svn-id: https://develop.svn.wordpress.org/trunk@59760 602fd350-edb4-49c9-b593-d223f7449a82
Values passed to parameters with this attribute will be redacted if present in a stack trace when using PHP 8.2 or later. This reduces the chance that passwords and security keys get accidentally exposed in debug logs and bug reports.
Props petitphp, TobiasBg, jrf, johnbillion.
Fixes#57304
git-svn-id: https://develop.svn.wordpress.org/trunk@59754 602fd350-edb4-49c9-b593-d223f7449a82
This allows the subsequent redirect to behave as expected if a site is using a strict referrer policy on the front end which prevents the full referrer from being sent.
Props zodiac1978, yogeshbhutkar, hbhalodia, mukesh27.
Fixes#62881
git-svn-id: https://develop.svn.wordpress.org/trunk@59753 602fd350-edb4-49c9-b593-d223f7449a82
This ensures the correct code is used to run the installation depending on whether it should be running from the `src` or `build` directory.
Props swissspidy, johnbillion
See #62221
git-svn-id: https://develop.svn.wordpress.org/trunk@59752 602fd350-edb4-49c9-b593-d223f7449a82