This applies to `nav_menu_link_attributes` and `page_menu_link_attributes` filters.
Follow-up to [42808], [44416].
Props jnylen0, chetan200891, alexstine.
See #43522, #52628.
git-svn-id: https://develop.svn.wordpress.org/trunk@50823 602fd350-edb4-49c9-b593-d223f7449a82
As a result of the recent changes, both functions were calling each other if the `exif` PHP extension is not available.
The issue is now resolved by calling the `getimagesize()` PHP function directly, instead of the `wp_getimagesize()` wrapper.
Follow-up to [50146], [50810], [50814], [50815], [50818-50821].
See #35725.
git-svn-id: https://develop.svn.wordpress.org/trunk@50822 602fd350-edb4-49c9-b593-d223f7449a82
`wp_get_webp_info()` returns either a string or `false` for the `type` key, so we can just check for the string directly.
Follow-up to [50810], [50814], [50815], [50818-50820].
See #35725.
git-svn-id: https://develop.svn.wordpress.org/trunk@50821 602fd350-edb4-49c9-b593-d223f7449a82
The function was only used in a single place in core.
Follow-up to [50810], [50814], [50815], [50818].
Props johnjamesjacoby.
See #35725.
git-svn-id: https://develop.svn.wordpress.org/trunk@50819 602fd350-edb4-49c9-b593-d223f7449a82
Previously, this would only have evaluated to `true` if `wp_get_image_mime()` returned `false`.
Follow-up to [50810], [50814], [50815].
See #35725.
git-svn-id: https://develop.svn.wordpress.org/trunk@50818 602fd350-edb4-49c9-b593-d223f7449a82
This adds additional information to the Media Handling section of the Site Health Info page. When ImageMagick is used as the site’s image editor, a full list of file formats supported will now be shown. This will help site owners debug any issues they encounter as support for newer, more modern image formats is added (such as WebP in [50810]).
Additionally, the version of Imagick installed. This will help site owners debug issues with generating images on the PHP side.
Some variables have also been renamed to more accurately represent what is being stored.
Props Clorith, desrosj.
Fixes#53022.
git-svn-id: https://develop.svn.wordpress.org/trunk@50817 602fd350-edb4-49c9-b593-d223f7449a82
In `class-walker-comment.php`, a `remove_filter` call on `comment_text` passed a fourth parameter which was not needed. This change removes the extra argument.
Props diddledan, SergeyBiryukov.
Fixes#53113.
git-svn-id: https://develop.svn.wordpress.org/trunk@50816 602fd350-edb4-49c9-b593-d223f7449a82
* Document that WebP constants are only defined in PHP 7.1+.
* Correct the `$filename` parameter type in `wp_get_webp_info()`.
* Use a consistent message when skipping tests due to the lack of WebP support.
* Remove unnecessary `else` branches after `markTestSkipped()`.
* Replace `assertEquals()` with more appropriate assertions.
Follow-up to [50810].
See #35725.
git-svn-id: https://develop.svn.wordpress.org/trunk@50814 602fd350-edb4-49c9-b593-d223f7449a82
Themes displayed in this tab were actually random, and have not been selected to be featured to new WordPress users.
The tab had already been removed from the Theme Directory, and with this change, the options in the admin area and in the directory will match again.
The "Popular" tab is now displayed instead as the default view.
Props poena, kjellr, celloexpressions.
Fixes#49487. See #meta5044.
git-svn-id: https://develop.svn.wordpress.org/trunk@50813 602fd350-edb4-49c9-b593-d223f7449a82
This adds an assertion to confirm that `is_email()` considers email addresses with a `+` valid.
Props SergeyBiryukov, ayeshrajans.
Fixes#53130.
git-svn-id: https://develop.svn.wordpress.org/trunk@50812 602fd350-edb4-49c9-b593-d223f7449a82
Add support for uploading, editing and saving WebP images when supported by the server.
Add 'image/webp' to supported mime types. Correctly identify WebP images and sizes even when PHP doesn't support WebP. Resize uploaded WebP files (when supported) and use for front end markup.
Props markoheijne, blobfolio, Clorith, joemcgill, atjn, desrosj, spacedmonkey, marylauc, mikeschroder, hellofromtonya, flixos90.
Fixes#35725.
git-svn-id: https://develop.svn.wordpress.org/trunk@50810 602fd350-edb4-49c9-b593-d223f7449a82
Use `$hook_name` when referring to a filter or action hook name, and `$callback` when referring to a callback function.
This brings more consistency to parameter names in Plugin API functions.
Includes minor code layout fixes for better readability and reordering some functions in a more logical order.
Props johnbillion, jrf, SergeyBiryukov.
Fixes#50531.
git-svn-id: https://develop.svn.wordpress.org/trunk@50807 602fd350-edb4-49c9-b593-d223f7449a82
This restores the information that was previously included in a title attribute tooltip on pending updates link in the toolbar.
Follow-up to [50801].
Props sabernhardt, audrasjb, mukesh27, davidbaumwald.
Fixes#53031.
git-svn-id: https://develop.svn.wordpress.org/trunk@50803 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that the heading represents the content of the page. Previously, the site title was displayed instead.
Props sabernhardt, justinahinon, rianrietveld, mukesh27, francina, audrasjb, Boniu91.
Fixes#52938.
git-svn-id: https://develop.svn.wordpress.org/trunk@50802 602fd350-edb4-49c9-b593-d223f7449a82
Remove the title attribute from the link, wrap the link icon and numeric indicator with the `aria-hidden` attribute, and add a `.screen-reader-text` span so screen readers hear a link that has relevant context without requiring translators to deal with appended strings. Removes the individual counts of theme and plugin updates from the attribute, as those were already buggy and didn't include translation counts.
Props afercia, Mte90, sabernhardt, audrasjb
Fixes#26562. See #53031.
git-svn-id: https://develop.svn.wordpress.org/trunk@50801 602fd350-edb4-49c9-b593-d223f7449a82
Rename an `$out` variable to `$output` for consistency with other widget classes..
Props mukesh27.
Fixes#53059.
git-svn-id: https://develop.svn.wordpress.org/trunk@50797 602fd350-edb4-49c9-b593-d223f7449a82
Because the `--` separator was missing, the `--dev` flag was not being passed to the script, thus not testing properly.
See #52625.
git-svn-id: https://develop.svn.wordpress.org/trunk@50796 602fd350-edb4-49c9-b593-d223f7449a82
This updates the block patterns included by default on WordPress
to give them more personality and to make use of the design tools
that has been added to the editor.
Props onemaggie, melchoyce, kjellr, beafialho, gziolo.
Fixes#52846.
git-svn-id: https://develop.svn.wordpress.org/trunk@50794 602fd350-edb4-49c9-b593-d223f7449a82
This avoids PHP warnings in case the function returns boolean `false` instead of an array.
Props david.binda.
Fixes#53099.
git-svn-id: https://develop.svn.wordpress.org/trunk@50793 602fd350-edb4-49c9-b593-d223f7449a82
Share the `WP_User` instance for the current user between the functions `get_userdata()` and `wp_get_current_user()`. Both functions return the `$current_user` global for the current user.
Force refresh the `$current_user` global within `clean_user_cache()` by immediately re-calling `wp_set_current_user()` with the current user's ID. This ensures any changes to the current user's permissions or other settings are reflected in the global. As a side-effect this immediately rewarms the current user's cache.
Props chaion07, chriscct7, donmhico, hellofromtonya, lukecarbis, peterwilsoncc, rmccue, TimothyBlynJacobs.
Fixes#28020.
git-svn-id: https://develop.svn.wordpress.org/trunk@50790 602fd350-edb4-49c9-b593-d223f7449a82
This avoids a fatal error if the plugin is already included, e.g. in unit tests.
Follow-up to [50787].
See #31104.
git-svn-id: https://develop.svn.wordpress.org/trunk@50788 602fd350-edb4-49c9-b593-d223f7449a82
This avoids accidentally overriding some variables in the scope of `activate_plugin()`, e.g. `$silent` or `$network_wide`.
Plugins expecting to have access to `$network_wide` directly on inclusion should receive it as an argument of the activation hook callback instead, on any of these actions:
* `activate_plugin`
* `activate_{$plugin}`
* `activated_plugin`
Follow-up to [28644].
Props Mike_Cowobo, dd32, DrewAPicture, mensmaximus, SergeyBiryukov.
Fixes#31104.
git-svn-id: https://develop.svn.wordpress.org/trunk@50787 602fd350-edb4-49c9-b593-d223f7449a82
Adds timer_float which can be used to get the time elapsed so far during the PHP script. Should make it easier to display the page generation time in the footer of admin.
WordPress should expose timing data as a float in the most accurate manner possible. timer_stop() has two problems: it uses an initial timestamp generated later than it needs to be and its formatted return value can not reliably be used as a number (some locales swap commas and periods, for example).
Props andy, matt, jorbin.
Fixes#39163.
git-svn-id: https://develop.svn.wordpress.org/trunk@50786 602fd350-edb4-49c9-b593-d223f7449a82
This officially removes support for Internet Explorer 11 in the CSS files run through the build process in Core.
Individual tickets should be opened for removing each manually maintained area of the code base targeting IE11.
The resulting changes to CSS files are included in this commit.
Fixes#53077.
git-svn-id: https://develop.svn.wordpress.org/trunk@50784 602fd350-edb4-49c9-b593-d223f7449a82
This more closely represents how the active installations count is displayed in the Plugin Directory.
See #52627.
git-svn-id: https://develop.svn.wordpress.org/trunk@50783 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `caniuse-lite` database to the most recent version (`1.0.30001214`) by running `npx browserslist@latest --update-db`.
The resulting changes after running `grunt precommit:css` are also included in this commit.
See #52624.
git-svn-id: https://develop.svn.wordpress.org/trunk@50782 602fd350-edb4-49c9-b593-d223f7449a82
This should allow to use new filters in the Gutenberg plugin and therefore it prevents deprecation warnings when in the debug mode.
See #52920.
git-svn-id: https://develop.svn.wordpress.org/trunk@50777 602fd350-edb4-49c9-b593-d223f7449a82
There are several WordPress hooks defined on the server that depend on $post object that isn’t present on the new screens like edit site, edit widgets, or edit navigation. This patch deprecates existing filters and introduces replacements that are context-aware.
Props azaozz, andraganescu, jeremyfelt, nosolosw, youknowriad.
See #52920.
git-svn-id: https://develop.svn.wordpress.org/trunk@50776 602fd350-edb4-49c9-b593-d223f7449a82
Prevent a `TypeError` from occurring during installation if `wp-config.php` is not writable. In PHP 8.0 this can cause a fatal error, in earlier versions of PHP a warning would be thrown.
Account for a change in type returned by `fopen()` coming in a future version of PHP. Minor coding standards fixes in the `/wp-admin/setup-config.php` file.
Props xknown, hellofromTonya, jrf, peterwilsoncc.
See #51423.
git-svn-id: https://develop.svn.wordpress.org/trunk@50775 602fd350-edb4-49c9-b593-d223f7449a82
This updates the following dependencies:
- `cssnano` from version `4.1.10` to `4.1.11`.
- `grunt-webpack` from `4.0.2` to `4.0.3`.
- `qunit` from `12.14.1` to `12.15.0`.
- `sass` from `1.32.8` to `1.32.11`.
- `uglify-js` from `3.13.3` to `3.13.4`.
See #52624.
git-svn-id: https://develop.svn.wordpress.org/trunk@50774 602fd350-edb4-49c9-b593-d223f7449a82
This updates the `moment` script from version `2.27.0` to `2.29.1`.
Props shital-patel, hareesh-pillai.
Fixes#52853.
git-svn-id: https://develop.svn.wordpress.org/trunk@50773 602fd350-edb4-49c9-b593-d223f7449a82