Prevents a deprecation warning saving options when the post by email feature is turned off in code using the `enable_post_by_email_configuration` filter.
Props ironprogrammer, manbo, narenin, sebastienserre, siliconforks.
Fixes#61144.
Built from https://develop.svn.wordpress.org/trunk@58963
git-svn-id: http://core.svn.wordpress.org/trunk@58359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This adds a note that the functions return either an empty array or an empty string for a valid but non-existing ID, depending on the `$single` parameter.
Follow-up to [48658], [50641].
Props rodrigosprimo, jrf.
See #61608.
Built from https://develop.svn.wordpress.org/trunk@58962
git-svn-id: http://core.svn.wordpress.org/trunk@58358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The code block font-size was not the same in the editor and front. This sets it to 1em and corrects the value for preformatted elements along with adding border and padding in the editor for pre elements.
Props viralsampat, mi5t4n, brobken, sabernhardt.
Fixes#61845.
Built from https://develop.svn.wordpress.org/trunk@58960
git-svn-id: http://core.svn.wordpress.org/trunk@58356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
One of the benefits of contributing to WordPress is that contributors license their code under the GPL rather than assign copyright to the WordPress Foundation or another entity.
This updates the copyright notices in each of the bundled themes to acknowledge contributors own a portion of the copyright. For themes with a significant contribution from Automattic, the copyright notice is updated from Automattic.com to the legal entity Automattic Inc.
Props peterwilsoncc, desrosj, sabernhardt, jorbin, chanthaboune.
Fixes#61943.
Built from https://develop.svn.wordpress.org/trunk@58958
git-svn-id: http://core.svn.wordpress.org/trunk@58354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent the AJAX search results from firing until after at least 2 characters have been typed into the search boxes. Toggle `autocomplete` value once AJAX is firing. Add a changeable minimum character threshold.
Props armandsdz, adamsilverstein, afercia, mklusak, finalwebsites, joedolson.
Fixes#38211.
Built from https://develop.svn.wordpress.org/trunk@58957
git-svn-id: http://core.svn.wordpress.org/trunk@58353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This update most notably drops support for jQuery `< 1.12` and `< 2.2`. WordPress has not shipped with a version that matches these ranges since version 4.4 (see [36285]/#35380).
The update also changes the library’s browser support policy to only support the latest Chrome, Firefox, Safari, and Edge. This closely matches Core’s current policy to support the last 2 versions of these browsers. The library’s README notes that other versions nay “also work correctly with this plugin but support is not guaranteed”, which is reasonably similar.
Props vipulgupta003.
Fixes#61835.
Built from https://develop.svn.wordpress.org/trunk@58956
git-svn-id: http://core.svn.wordpress.org/trunk@58352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The polyfill was added in [57492], but all browsers supported by WordPress already support import maps.
This not only disables the polyfill, but completely removes it as it was only added recently and there is no usage outside of core.
Props swissspidy, desrosj, luisherranz, gziolo.
Fixes#60970.
Built from https://develop.svn.wordpress.org/trunk@58952
git-svn-id: http://core.svn.wordpress.org/trunk@58348 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit simplifies block style variation class name generation to ensure unique class names by replacing the hashing of block attributes in the block style variation class names with a call to `wp_unique_id`.
Doing so avoids potential for non-unique class names and conflicting styles when exact copies of a block are inserted via a repeated pattern.
Props aaronrobertshaw, martinkrcho, mukesh27, peterwilsoncc, ramonopoly.
Fixes#61877.
Built from https://develop.svn.wordpress.org/trunk@58951
git-svn-id: http://core.svn.wordpress.org/trunk@58347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In theme.json, individual font sizes may opt out of fluid typography if it is turned on globally.
This commit ensures that individual font size presets can also opt in to fluid typography if it is not turned on globally.
Props aaronrobertshaw, mmaattiiaass, ramonopoly, wildworks.
Fixes#61932.
Built from https://develop.svn.wordpress.org/trunk@58950
git-svn-id: http://core.svn.wordpress.org/trunk@58346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
WordPress 6.6 option autoload enhancements included discouraging the use of 'yes' and 'no' to indicate whether to autoload an option when calling `add_option()` or `update_option()`. Instead, a boolean should be used.
This changeset brings the newer autoload related functions `wp_set_option_autoload_values()`, `wp_set_options_autoload()`, and `wp_set_option_autoload()` in line with those changes. Additionally, it soft-deprecates the values more formally, as they should no longer be used. No PHP warnings will be emitted though as this is not a hard deprecation. This change is purely about documentation.
Props flixos90, joemcgill, jrf, mukesh27.
Fixes#61929.
See #61103, #61939.
Built from https://develop.svn.wordpress.org/trunk@58949
git-svn-id: http://core.svn.wordpress.org/trunk@58345 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When medium-size thumbnails are disabled, PDF previews in the Media Library grid view now fall back to displaying full-size thumbnails instead of a generic document icon.
Props daleharrison, kushang78, mukesh27, sudipatel007, mai21, antpb.
Fixes#39630.
Built from https://develop.svn.wordpress.org/trunk@58947
git-svn-id: http://core.svn.wordpress.org/trunk@58343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change `browsePopup` to use `onkeydown`, pass the `event` parameter from the calling control, and adjust variable naming style.
The `browsePopup` method used for the image rotation menu used `onkeyup` to trigger events, which prevented capturing browser scroll actions with arrows occurring on `onkeydown`.
Props afercia, deepakvijayan, nirajgirixd, joedolson, antpb.
Fixes#60548.
Built from https://develop.svn.wordpress.org/trunk@58946
git-svn-id: http://core.svn.wordpress.org/trunk@58342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset does not modify any behavior, it only updates the code to use the recommended type for the `$autoload` parameter as of WordPress 6.6. The old values 'yes' and 'no' are only maintained in certain tests that are explicitly about these backward compatibility values.
Props flixos90, joemcgill, mukesh27.
Fixes#61939.
See #61103, #61929.
Built from https://develop.svn.wordpress.org/trunk@58945
git-svn-id: http://core.svn.wordpress.org/trunk@58341 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Since this file is loaded incredibly early, many functions are not available. Those deeply familiar with how load works might have some idea as to what's safe and what isn't, but it's generally confusing and a little opaque so let's warn people there be dragons.
Props helen, DrewAPicture, jorbin.
Fixes#38650.
Built from https://develop.svn.wordpress.org/trunk@58944
git-svn-id: http://core.svn.wordpress.org/trunk@58340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevents the GitHub bot from posting a comment on pull requests requesting a trac ticket link if the ticket description includes a link via the ticket: prefix, eg ticket:61865.
The WordPress/WordPress-Develop repository is configured to automatically convert the text to a trac ticket link.
Props dd32, peterwilsoncc.
Fixes#61865.
Built from https://develop.svn.wordpress.org/trunk@58939
git-svn-id: http://core.svn.wordpress.org/trunk@58335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The commit syncs the following changes from Gutenberg:
- Background images: add support for theme.json ref value resolution gutenberg#64128
- Background images: ensure appropriate default values gutenberg#64192
- Background image: ensure consistency with defaults and fix reset/remove functionality gutenberg#64328
These changes brings consistency to the default background image styles WordPress applies to user uploaded images, and adds support for ref resolution to "background" style properties.
Props andrewserong, aaronrobertshaw.
Fixes #61858
Built from https://develop.svn.wordpress.org/trunk@58936
git-svn-id: http://core.svn.wordpress.org/trunk@58332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Move Etag HTTP header generation in `load-scripts.php` and `load-styles.php` to `WP_Dependencies`.
Introduces the method `WP_Dependencies::get_etag()` and associated unit tests.
Follow up to [57943].
Props vrajadas, martinkrcho, mukesh27.
Fixes#61485.
Built from https://develop.svn.wordpress.org/trunk@58935
git-svn-id: http://core.svn.wordpress.org/trunk@58331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update the capabilities check in `wp_http_supports` to use `WpOrg\Requests\Requests::has_capabilities` rather than the deprecated `WP_HTTP::_get_first_available_transport()`.
Props dd32, mukesh27, costdev, desrosj, johnbillion, jorbin, jrf, chaion07.
Fixes#37708.
Built from https://develop.svn.wordpress.org/trunk@58934
git-svn-id: http://core.svn.wordpress.org/trunk@58330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
`_wp_normalize_relative_css_links()` used to normalize all non-absolute URLs regardless of whether it's a relative path or an absolute path. The normalization should only happen for relative paths (paths without a leading `/`) and not for absolute paths.
Reference: [https://www.rfc-editor.org/rfc/rfc1808#section-4 RFC 1808, Section 4, Step 4].
Follow-up to [52036], [52695], [52754], [55658], [55669].
Props scholdstrom.
Fixes#61909.
Built from https://develop.svn.wordpress.org/trunk@58932
git-svn-id: http://core.svn.wordpress.org/trunk@58328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The search block button was not the same back and front for background, text and font weight. This is an additional patch solving the previous issue of styles being in wrong section and also differences..
Props sabernhardt.
Fixes#61888.
Built from https://develop.svn.wordpress.org/trunk@58930
git-svn-id: http://core.svn.wordpress.org/trunk@58326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to avoid a security warning in Chrome, which could previously be triggered even if the default value is not actually used as a password.
Follow-up to [208], [230], [233], [662], [1599], [1601]
Props adamkheckler, sabernhardt, peterwilsoncc, psykro, petitphp.
Fixes#61332.
Built from https://develop.svn.wordpress.org/trunk@58928
git-svn-id: http://core.svn.wordpress.org/trunk@58324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Updates the UI for previewing a site icon in general settings and the customizer to account for changes to browser designs over the past years.
Props joedolson, joen, kebbet, nhrrob, swissspidy, mukesh27, afercia, jorbin.
Fixes#60625.
Built from https://develop.svn.wordpress.org/trunk@58927
git-svn-id: http://core.svn.wordpress.org/trunk@58323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevents a potential type error when calling `current_time( 'timestamp' )` by casting `get_option( 'gmt_offset' )` to a float prior to performing calculations with the value.
This mainly accounts for incorrect storage of values, such as an empty string or city name.
Follow up to [45856], [55054], [55598].
Props hellofromtonya, peterwilsoncc, rarst, costdev, Nick_theGeek, SergeyBiryukov, johnbillion, desrosj, reputeinfosystems, audrasjb, oglekler.
Fixes#57035.
Built from https://develop.svn.wordpress.org/trunk@58923
git-svn-id: http://core.svn.wordpress.org/trunk@58319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As part of determining whether to perform automatic updates, WordPress checks if it is running within a version-controlled environment, recursively looking up the filesystem to the top of the drive, looking for a Subversion, Git, Mercurial, or Bazaar directory, erring on the side of detecting a VCS checkout somewhere.
This commit reuses `WP_Automatic_Updater::is_allowed_dir()` in the Site Health test to avoid a PHP warning if the `open_basedir` directive is in use and any of the directories checked in the process are not allowed:
{{{
is_dir(): open_basedir restriction in effect. File(/.git) is not within the allowed path(s)
}}}
Follow-up to [44986], [55425].
Props Keffr3n, narenin.
Fixes#61834.
Built from https://develop.svn.wordpress.org/trunk@58921
git-svn-id: http://core.svn.wordpress.org/trunk@58317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Removes the assertion for 'errors' being empty when the instance is `WP_Term` and not `WP_Error`. This property exists on `WP_Error`.
This assertion always passed because it was checking a dynamic property on `WP_Term` that does not exist and is not added within Core. Thus, this assertion is not needed and fails with dynamic property deprecations.
Follow-up to [51403], [34646], [29830].
See #61890, #61530.
Built from https://develop.svn.wordpress.org/trunk@58920
git-svn-id: http://core.svn.wordpress.org/trunk@58316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Removes the `unset()` of the `WP_Term::$filter` property within the term tests.
Why?
Prior to the introduction of WP_Term, the term was added to the cache when its filter property was empty. To test the cache, the tests unset this property to trigger `wp_cache_add()` in `get_term()`. [34997] changed that behavior to trigger `wp_cache_add()` when the term was not found after `wp_cache_get()` (i.e. happened in `WP_Term::get_instance()`).
Unsetting the filter property is and was not needed. Prior to `WP_Term`, the condition was an empty value. With `WP_Term`, the filter property is no longer part of the conditional logic for caching.
Follow-up to [34997], [30954], [34035].
See #61890, #61530.
Built from https://develop.svn.wordpress.org/trunk@58919
git-svn-id: http://core.svn.wordpress.org/trunk@58315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Instead of checking for a specific message, e.g. “Item not updated”, the `$_REQUEST['error']` variable is now checked. This allows for custom messages added via the `term_updated_messages` filter to be considered an error when appropriate, and displayed with the correct CSS class.
This also brings consistency with a similar check in `wp-admin/edit-tags.php`.
Follow-up to [31823], [44663].
Props xipasduarte.
Fixes#61896.
Built from https://develop.svn.wordpress.org/trunk@58918
git-svn-id: http://core.svn.wordpress.org/trunk@58314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds a z-index to `.media-menu .media-menu-item:focus` to fix the "Upload files" tab's outline on the side next to the other tab.
Follow-up to [57553], [46363].
Props wildworks, antpb, huzaifaalmesbah, krupajnanda, nhrrob, oglekler, rajinsharwar, sabernhardt.
Fixes#60632.
Built from https://develop.svn.wordpress.org/trunk@58917
git-svn-id: http://core.svn.wordpress.org/trunk@58313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The admin image editor crop function introduced rounding errors by using a scaled image to calculate values. Fix uses the image at 100% scale for calculations. Also avoid recalculating selection when the selection position is changed, and prevent incorrect values after scaling or restoration.
Previously committed in [58456] and reverted in [58571]. The revert was due to a misattributed test failure.
Props Jossnaz, johnillo, shailu25, rachelbaker, sudipatel007, joedolson, kevin940726 , andrewserong, hmbashar.
Fixes#32282.
Built from https://develop.svn.wordpress.org/trunk@58915
git-svn-id: http://core.svn.wordpress.org/trunk@58311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Attach the submit event to the parent search form in the installed and add new theme screen. Following [58405], the submit event was no longer attached to an object that was able to handle form submissions.
Props nithi22, nithins53, josklever, the-ank, debarghyabanerjee, sabernhardt, jeherve, hellofromtonya.
Fixes#61578.
Built from https://develop.svn.wordpress.org/trunk@58914
git-svn-id: http://core.svn.wordpress.org/trunk@58310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The `wp-content/upgrade` directory does not exist initially after installation, so the Site Health check could not determine the available disk space until the directory was subsequently created during an update.
By testing `WP_CONTENT_DIR` instead, the check can complete successfully.
This also brings consistency with similar checks in `_unzip_file_ziparchive()` and `_unzip_file_pclzip()`.
Follow-up to [55720], [56401].
Props wbdv, khokansardar, mi5t4n, SergeyBiryukov.
Fixes#61602.
Built from https://develop.svn.wordpress.org/trunk@58913
git-svn-id: http://core.svn.wordpress.org/trunk@58309 1a063a9b-81f0-0310-95a4-ce76da25c4cd