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.
Built from https://develop.svn.wordpress.org/trunk@50776
git-svn-id: http://core.svn.wordpress.org/trunk@50385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.
Built from https://develop.svn.wordpress.org/trunk@50775
git-svn-id: http://core.svn.wordpress.org/trunk@50384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `illegal_names`
* `limited_email_domains`
* `banned_email_domains`
If any of these options have a falsey value, treat it as an empty string. This addresses a PHP 8.1+ deprecation notice when passing a `null` value to `str_replace()`.
Additionally, avoid unnecessary type casting for better performance.
Props hellofromTonya, jrf, SergeyBiryukov.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@50772
git-svn-id: http://core.svn.wordpress.org/trunk@50381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
The Site Health dashboard widget uses the same JavaScript file as the Site Health pages to generate its progress indicator.
This file was also set up to store the current Site Health check results if the current tab being shown isn't the debug information one, this had the side effect of the dashboard being seen as not the debug screen as well.
This now has a conditional making sure it's the status screen it self being displayed, before trying to do any Ajax requests.
Props arena.
Fixes#49814.
Built from https://develop.svn.wordpress.org/trunk@50766
git-svn-id: http://core.svn.wordpress.org/trunk@50375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use `reset` to get the label from the first tab entry as the default if no tab is defined.
This ensures even if the tab order is changed, or tabs are removed, no warnings will be thrown.
Follow-up to [50764].
See #47225.
Built from https://develop.svn.wordpress.org/trunk@50765
git-svn-id: http://core.svn.wordpress.org/trunk@50374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Allow developers to extend the Site Health screen with their own custom navigation tabs and pages.
This implements a new filter, `site_health_navigation_tabs`, which takes an associated array of tab identifiers/slugs, and tab labels, allowing developers to add their own subpage to the Site Health interface as new tabs.
To output a custom page, or add to an existing page, the `site_health_tab_content` action is triggered whenever the `tab` query argument is present and not empty. This action includes the current tab as its argument, which a developer would match against to only output content when relevant.
Props ramiy for initial patch.
Fixes#47225.
Built from https://develop.svn.wordpress.org/trunk@50764
git-svn-id: http://core.svn.wordpress.org/trunk@50373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Previously, when exporting personal data, if the JSON encoding of the data failed, the invalid JSON was still written to `export.json`. This change captures the JSON encoding failure and adds a notice to the UI.
Props hellofromTonya, jrf, SergeyBiryukov.
Fixes#52892.
Built from https://develop.svn.wordpress.org/trunk@50713
git-svn-id: http://core.svn.wordpress.org/trunk@50322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
After [48390], plugins and themes can be updated with an uploaded ZIP file. Strings were added for comparing the "current" and "uploaded" versions of a plugin or theme, but lacked context for each as to the object being referenced. This change adds a `plugin` or `theme` context to each of these strings for disambiguation.
Props dimadin, SergeyBiryukov.
Fixes#53017.
Built from https://develop.svn.wordpress.org/trunk@50705
git-svn-id: http://core.svn.wordpress.org/trunk@50314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
On the "Reading Settings" page, the post excerpt was referred to as a "Summary". For consistency with the rest of Core, this change updates "summary" to "excerpt" both in the setting and the relevant help tab.
Props SergeyBiryukov, ravipatel, mukesh27.
Fixes#52987.
Built from https://develop.svn.wordpress.org/trunk@50702
git-svn-id: http://core.svn.wordpress.org/trunk@50311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Variables created within the scope of a function are discarded automatically when PHP leaves the scope of the function, i.e. on `return`, so doing a call to `unset()` straight before a `return` statement is redundant.
Props jrf, ravipatel, rachelbaker, mukesh27.
Fixes#52996.
Built from https://develop.svn.wordpress.org/trunk@50692
git-svn-id: http://core.svn.wordpress.org/trunk@50301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This ensures that contrast between text color and background meets the WCAG 2.0 AA recommended value. The following locations were changed:
- Network List Tables: Use lighter background colors for site status indicator.
- Nav Menus: Use a lighter background color for invalid menu items.
- Pointers: Use a darker background for pointer header.
- Themes: Use darker background on filter button hover.
- Customizer: Use darker background for selected widget.
Follow-up to [50025], [50571].
Props kebbet, melchoyce, peterwilsoncc.
Fixes#52760.
Built from https://develop.svn.wordpress.org/trunk@50687
git-svn-id: http://core.svn.wordpress.org/trunk@50296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Reduce severity of failing HTTPS tests from critical to warning. Stop reporting failures if the site is being accessed over HTTPS but `wp_is_https_supported()` indicates a lack of support.
Props annalamprou, AnotherDave, ayeshrajans, bobbingwide, Clorith, dragongate, eatsleepcode, gab81, geoffrey1963, Ipstenu, k3nsai, mmuyskens, nicegamer7, peterwilsoncc, pwallner, SergeyBiryukov, TimothyBlynJacobs, Toru.
Fixes#52783.
Built from https://develop.svn.wordpress.org/trunk@50659
git-svn-id: http://core.svn.wordpress.org/trunk@50271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [47198], parentheses were removed from `include` and `require` statements, as they are language constructs, not function calls. However, [50161] introduced a new `require_once` instance in `wp-admin/options-privacy.php`. This change removes the unnecessary parentheses.
See #53627.
Built from https://develop.svn.wordpress.org/trunk@50631
git-svn-id: http://core.svn.wordpress.org/trunk@50243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Ensures that `wp-format-library` assets are always loaded for the block editor. Otherwise, they have to be loaded individually for every screen that needs it. It's similar to how `wp-block-directory` assets are handled.
Props ellatrix.
See #52920.
Built from https://develop.svn.wordpress.org/trunk@50620
git-svn-id: http://core.svn.wordpress.org/trunk@50233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This avoids a fatal error on PHP 8 in `wp_privacy_generate_personal_data_export_file()` if the `_export_data_grouped` post meta exists but is not an array.
Additionally, refactor unit tests for the function to:
* Reduce redundant code
* Switch to data provider
* Test on the full HTML output instead of select pieces of the output
* Expand unhappy path coverage
Follow-up to [43012], [44786], [47146], [47278].
Props hellofromTonya, jrf, xknown.
See #51423.
Built from https://develop.svn.wordpress.org/trunk@50613
git-svn-id: http://core.svn.wordpress.org/trunk@50226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This change switches out `sprintf` for `printf` on the "Copy suggested policy text from..." button screen reader text. Also, wrap the actual button text in a `<span aria-hidden="true">` to prevent both the button text and the screen reader text from being spoken.
Props mukesh27, SergeyBiryukov, sabernhardt.
Fixes#52891.
Built from https://develop.svn.wordpress.org/trunk@50585
git-svn-id: http://core.svn.wordpress.org/trunk@50198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In [49178], self-closing `br` tags were switched to non-self-closing `div` elements for "clearing" purposes, but the self-closing "/" remained in place. This fix removes the unnecessary slash.
Props pavelvisualcomposer, audrasjb, sabernhardt, akabarikalpesh, SergeyBiryukov.
Fixes#52878.
Built from https://develop.svn.wordpress.org/trunk@50582
git-svn-id: http://core.svn.wordpress.org/trunk@50195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent misalignment of "generate password" and "save password" buttons on the password reset screen on narrow screens and in languages requiring longer text than English.
Props audrasjb, grapplerulrich, ryelle.
Fixes#52834.
Built from https://develop.svn.wordpress.org/trunk@50569
git-svn-id: http://core.svn.wordpress.org/trunk@50182 1a063a9b-81f0-0310-95a4-ce76da25c4cd