Previously, the status could be misleading, especially if the check against the WordPress.org API failed. The initial status message is now more neutral, and a dedicated check has been added to handle cases where the API is unreachable.
Developed in https://github.com/WordPress/wordpress-develop/pull/7350
Follow-up to [58832].
Props pbearne, joemcgill, mukesh27, peterwilsoncc, swb1192, krupajnanda, psykro, SergeyBiryukov, swissspidy, imranhasanraaz, amin7, flixos90, vgnavada, audrasjb, adamsilverstein, Presskopp, westonruter.
Fixes#61623.
Built from https://develop.svn.wordpress.org/trunk@61123
git-svn-id: http://core.svn.wordpress.org/trunk@60459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent notes from inadvertently showing up in the context of comments - including on the Dashboard recent comments widget and the “Mine” count on the Comments page. Notes are stored as a custom ‘note’ comment type and this change ensures the note type is only returned when explicitly requested, or when ‘all’ types are requested.
The query for note children is modified to return all child notes. This fixes an issue where children were no longer being returned for the ‘note’ type.
Also fixes https://github.com/WordPress/gutenberg/issues/72548.
Props adamsilverstein, timothyblynjacobs, shailu25, peterwilsoncc, westonruter, mamaduka, kadamwhite.
Fixes#64145.
Fixes#64152.
Built from https://develop.svn.wordpress.org/trunk@61105
git-svn-id: http://core.svn.wordpress.org/trunk@60441 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The control to switch between the browser uploader and the default uploader used a link with `target="_blank"`, but was driven by scripts. In a no-js context, this meant that the link could be used to open the browser uploader in a new tab. This is unnecessary, however, because the default uploader is not rendered when JS is not available.
On switching uploaders, browser focus was lost.
For more predictable keyboard and screen reader behavior, switch the media uploader toggle to a `button` element and set focus to the upload button in the new context.
Props dilipbheda, sabernhardt, rollybueno, westonruter, joedolson.
Fixes#63238.
Built from https://develop.svn.wordpress.org/trunk@61099
git-svn-id: http://core.svn.wordpress.org/trunk@60435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Check the data type of ID3 data on import before running `wp_kses_post` or `wp_kses_post_deep` to fix a fatal error thrown when attempting to run `wp_kses_post` on non-string content in PHP 8.2+.
Adds unit tests to verify.
Props sllimrovert, ankitkumarshah, rollybueno, wpfy, hmbashar, SirLouen, johnbillion, huzaifaalmesbah, sandeepdahiya, sourabhjain, poojapadamad, joedolson.
Fixes#63529.
Built from https://develop.svn.wordpress.org/trunk@61098
git-svn-id: http://core.svn.wordpress.org/trunk@60434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[60990] introduced a new action, `press_this_init`. While the code changes adding the hook are straightforward, the actual use cases are not yet clear.
Reverting the change allows for more discussion to clarify what is actually supported through the addition of this new action.
Props jorbin.
See #53076.
Built from https://develop.svn.wordpress.org/trunk@61030
git-svn-id: http://core.svn.wordpress.org/trunk@60366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Reverts Hello Dolly changes moving the plugin to a containing folder. Removes the `upgrade_690()` function in it's entirety as the upgrade routine is no longer required.
Fully reverted commits: [60666], [60670], [60716], [60725]; partially reverts [60721].
Porps johnbillion, whyisjake, SirLouen, mindctrl, afragen, jorbin, Otto42, swissspidy, welcher, davidbaumwald.
See #53323.
Built from https://develop.svn.wordpress.org/trunk@61006
git-svn-id: http://core.svn.wordpress.org/trunk@60342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Change the admin menu quick search to limit to searching post titles. Add filter `wp_ajax_menu_quick_search_args` to support customizing post columns in query. Clear quick search results when search query is cleared. Send announcements about search status via `wp.a11y.speak()`.
Props diebombe, afercia, audrasjb, nickjbedford, kevinlearynet, mukesh27, joedolson.
Fixes#48655.
Built from https://develop.svn.wordpress.org/trunk@60991
git-svn-id: http://core.svn.wordpress.org/trunk@60327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Bring the PHP part of the new Notes feature into core for the 6.9 release. See related Gutenberg Issue: https://github.com/WordPress/gutenberg/issues/71826. These changes do not impact any user facing functionality, they simply prepare core for the JavaScript functionality that will come over in a separate sync.
Overview of changes:
- Ensure Notes are not included in comment counts
- Enable the note type (REST API)
- Adjust capabilities so edit_post cap implies ability to edit notes
- Enable empty and duplicate notes for resolve/re-open actions
- Add control over notes with post type supports check
- Register new note resolution status meta
Props: ristojovanovic, adamsilverstein, jeffpaul, wildworks, mamaduka, swissspidy, timothyblynjacobs, kadamwhite.
Fixes#64096.
Built from https://develop.svn.wordpress.org/trunk@60987
git-svn-id: http://core.svn.wordpress.org/trunk@60323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `before_populate_network`
* `after_populate_network`
* `after_upgrade_to_multisite`
These hooks are strategically located to allow the execution of custom code before & after a new multisite network is created, as well as after the first time a single-site installation is upgraded to multisite.
This change also includes a set of unit tests via a new `Tests_Multisite_PopulateNetworkHooks` class, to confirm that these hooks are executing when and as intended.
Props jeremyfelt, johnjamesjacoby, Mista-Flo, spacedmonkey, sukhendu2002, rmccue, rollybueno.
Fixes#27289.
Built from https://develop.svn.wordpress.org/trunk@60954
git-svn-id: http://core.svn.wordpress.org/trunk@60290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add the date and time of privacy request status changes in the privacy requests table. Previously, `human_time_diff()` was used in the first 24 hours, and only the date after 24 hours. Change the output to display both date and time after 24 hours, using the format used for comments.
Props birgire, desrosj, afercia, xkon, tz-media, garrett-eclipse, sirlouen, sukhendu2002, sajjad67, fakhriaz, joedolson.
Fixes#44267.
Built from https://develop.svn.wordpress.org/trunk@60891
git-svn-id: http://core.svn.wordpress.org/trunk@60227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
For all CSS generated icons across core, either add `aria-hidden="true"` to the HTML wrapper or set the generated content alternative to an empty string in the CSS using the alternative text specification for CSS generated content.
Props afercia, joedolson, cheffheid, jhabdas.
Fixes#40428.
Built from https://develop.svn.wordpress.org/trunk@60806
git-svn-id: http://core.svn.wordpress.org/trunk@60142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In cases where a string is used both for a visible label and a screen reader text label, the screen reader text should never be different from the visible label. To help ensure this doesn't happen, use only a single string. The associated screen reader text comments are no longer required.
This is also true for a few cases where there are strings in contexts where variables can't be used. In these cases, the screen reader text comments are also removed.
Props sabernhardt, swissspidy, audrasjb, joedolson.
Fixes#63620.
Built from https://develop.svn.wordpress.org/trunk@60805
git-svn-id: http://core.svn.wordpress.org/trunk@60141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to avoid extra changes to database structure when type case is the only difference:
{{{
Changed type of wp_table.field from varchar(255) to VARCHAR(255)
}}}
Follow-up to [1575], [37532].
Props leewillis77, tristanleboss, lordspace, johnbillion, SergeyBiryukov.
Fixes#59481.
Built from https://develop.svn.wordpress.org/trunk@60789
git-svn-id: http://core.svn.wordpress.org/trunk@60125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add the `aria-haspopup` attribute and `aria-controls` on the Add Media button in the classic editor, so that screen reader users are notified about the behavior of the button.
Props alh0319, rishabhwp, joedolson.
Fixes#63973.
Built from https://develop.svn.wordpress.org/trunk@60786
git-svn-id: http://core.svn.wordpress.org/trunk@60122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This resolves an error on Multisite networks where an individual site doesn't have plugins active:
{{{
array_search(): Argument #2 ($haystack) must be of type array, string given
}}}
Follow-up to [60666], [60721].
Props dd32.
See #53323.
Built from https://develop.svn.wordpress.org/trunk@60725
git-svn-id: http://core.svn.wordpress.org/trunk@60061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Specifically, this change when a network activated plugin has plugin dependencies, the disabled deactivate row action link text is changed from "Deactivate" to "Network Deactivate".
Follow-up to [57545].
Props pbiron, nikunj8866, shailu25, jjj.
Fixes#63942.
Built from https://develop.svn.wordpress.org/trunk@60723
git-svn-id: http://core.svn.wordpress.org/trunk@60059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit:
* Moves the call to `upgrade_690()` to the correct place so it actually gets called.
* Wraps Hello Dolly upgrade code in a version check per standard practice.
* Removes the `$wpdb->query()` call to avoid attempting to create the new index twice, once in the upgrade and once in `dbDelta()`.
Follow-up to [60666], [60716], [60717].
Props peterwilsoncc, mukesh27.
See #50161, #53323.
Built from https://develop.svn.wordpress.org/trunk@60721
git-svn-id: http://core.svn.wordpress.org/trunk@60057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This aims to improve performance of some queries on installations with a large number of posts.
Follow-up to [3678], [3690], [9290], [13576].
Props josephscott, LucasMS, Otto42, flixos90, matt, johnjamesjacoby, siliconforks, mukesh27, jonsurrell, SirLouen, SergeyBiryukov.
Fixes#50161.
Built from https://develop.svn.wordpress.org/trunk@60717
git-svn-id: http://core.svn.wordpress.org/trunk@60053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Several PHP functions that have not been doing anything since PHP 8.0/8.1, specifically:
* `finfo_close()` since the `ext/fileinfo` migration in PHP 8.1
* `xml_parser_free()` since the `ext/xml` migration in PHP 8.0
* `curl_close()` since the `ext/curl` migration in PHP 8.0
* `curl_share_close()` since the `ext/curl` migration in PHP 8.0
* `imagedestroy()` since the `ext/gd` migration in PHP 8.0
will be deprecated in PHP 8.5 and will thus be throwing warnings.
This commit adds conditional checks to only call these functions on the relevant PHP versions.
Reference: [https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion PHP RFC: Deprecations for PHP 8.5: Deprecate no-op functions from the resource to object conversion].
Props TobiasBg, SergeyBiryukov.
See #63061.
Built from https://develop.svn.wordpress.org/trunk@60703
git-svn-id: http://core.svn.wordpress.org/trunk@60039 1a063a9b-81f0-0310-95a4-ce76da25c4cd
As `wp_insert_post()` can return an error for various reasons, this commit ensures that this scenario is properly handled and an error message is displayed.
Follow-up to [12987].
Props rishabhwp, tfrommen, SirLouen, siliconforks, SergeyBiryukov.
Fixes#37441.
Built from https://develop.svn.wordpress.org/trunk@60701
git-svn-id: http://core.svn.wordpress.org/trunk@60037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Changes the Hello Dolly plugin from a single file structure to a proper plugin directory structure, moving from `hello.php` to `hello-dolly/hello.php` to align with Plugin Handbook Best Practices.
- Adds proper `Text Domain: hello-dolly` header to Hello Dolly plugin
- Updates core files to remove special case handling for `hello.php`
- Updates plugin dependency system to handle new directory structure
- Adds upgrade routine to migrate active plugin references and keep plugin active
- Updates all tests to use new plugin path format `hello-dolly/hello.php`
- Updates build configuration and .gitignore for new directory structure
- Adds `hello.php` to old files list for cleanup during core updates
- Adds `plugins/hello-dolly/` to new bundled directories list
Props afragen, SergeyBiryukov, peterwilsoncc, SirLouen, matt, davidbaumwald, desrosj, hellofromtonya, justinahinon,audrasjb, oglekler, whyisjake.
Fixes#53323.
Built from https://develop.svn.wordpress.org/trunk@60666
git-svn-id: http://core.svn.wordpress.org/trunk@60002 1a063a9b-81f0-0310-95a4-ce76da25c4cd
While the rule to discourage using functions like `count()` in a loop condition is a recommendation/best practice rule from the `WordPress-Extra` ruleset and does not directly apply to WordPress core, this is intended as a minor readability and code clarity improvement.
Follow-up to [10090], [17556], [20609], [26144].
Props krunal265, johnbillion, audrasjb, dhruvang21, SergeyBiryukov.
Fixes#56499.
Built from https://develop.svn.wordpress.org/trunk@60643
git-svn-id: http://core.svn.wordpress.org/trunk@59979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the Edit Media screen, buttons were not all of consistent size. This was caused by custom sizing applied to CSS in the Edit Media panel that was not consistent with other button sizes.
Remove custom sizing and adds class so all Edit Media buttons will match styling of other admin buttons in desktop and mobile viewports.
Props hbhalodia, sabernhardt, sandeepdahiya, mikinc860, mukesh27, joedolson.
Fixes#63559.
Built from https://develop.svn.wordpress.org/trunk@60640
git-svn-id: http://core.svn.wordpress.org/trunk@59976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
There are several existing mechanisms in Core to determine if a given string contains valid UTF-8 bytes or not. These are spread out and depend on which extensions are installed on the running system and what is set for `blog_charset`. The `seems_utf8()` function is one of these mechanisms.
`seems_utf8()` does not properly validate UTF-8, unfortunately, and is slow, and the purpose of the function is veiled behind its name and historic legacy.
This patch deprecates `seems_utf()` and introduces `wp_is_valid_utf8()`; a new, spec-compliant, efficient, and focused UTF-8 validator. This new validator defers to `mb_check_encoding()` where present, otherwise validating with a pure-PHP implementation. This makes the spec-compliant validator available on all systems regardless of their runtime environment.
Developed in https://github.com/WordPress/wordpress-develop/pull/9317
Discussed in https://core.trac.wordpress.org/ticket/38044
Props dmsnell, jonsurrell, jorbin.
Fixes#38044.
Built from https://develop.svn.wordpress.org/trunk@60630
git-svn-id: http://core.svn.wordpress.org/trunk@59966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Reduces the number of database queries made when populating roles during install/multisite site creation by 344 (347 queries down to 3).
`populate_roles()` has been modified to prevent an individual database query each time a role or capability is added to the `WP_Roles` object. Instead the roles option, `{$wpdb->prefix}user_roles` is updated once at the end of the function call.
Introduces a test to ensure that updating the roles option via `WP_Roles` and updating the option in the manner now used by `populate_roles()` results in the same capabilities been applied to a role.
Props fliespl, johnjamesjacoby, ocean90, realloc, rishabhwp, sainathpoojary, sirlouen, spacedmonkey, swissspidy.
Fixes#37687.
Built from https://develop.svn.wordpress.org/trunk@60614
git-svn-id: http://core.svn.wordpress.org/trunk@59950 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset removes the bottom `tablenav` container on taxonomy term list screens when it contains a hidden `.tablenav-pages.no-pages` element, to prevent unnecessary vertical spacing when no tags exist.
Props sainathpoojary, dilipbheda, audrasjb, abcd95, dhruvang21, SirLouen.
Fixes#63369.
Built from https://develop.svn.wordpress.org/trunk@60613
git-svn-id: http://core.svn.wordpress.org/trunk@59949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This changeset adds a new Site Health test to make site owners more aware when search engines are discouraged from indexing their sites.
It also increases the visibility of the related Dashboard widget notice.
Changes:
- Adds a new Site Health test under the "Privacy" category to check whether search engines are discouraged
- Displays "recommended" status when search engines are discouraged, with clear messaging to review settings
- Provides a direct link to the Reading Settings page to change this option
- Use a red/alert color to the dashicon used on the Dashboard widget notice
Props jeffr0, newyorkerlaura, joedolson, codente, abcd95, andrewhoyer, SirLouen, johnbillion, mymothersdaughter, audrasjb, Emlebrun, gaeldenysiak, beryldlg, Spaceshipone, coralietixeront, peterwilsoncc.
Fixes#63375.
Built from https://develop.svn.wordpress.org/trunk@60529
git-svn-id: http://core.svn.wordpress.org/trunk@59865 1a063a9b-81f0-0310-95a4-ce76da25c4cd