This brings some consistency with the `manage_users_extra_tablenav` and `manage_users_extra_tablenav` actions.
Props Tkama, wpgurudev.
Fixes#50736.
git-svn-id: https://develop.svn.wordpress.org/trunk@48693 602fd350-edb4-49c9-b593-d223f7449a82
Similar to the changes for plugins in [48669], let's only show the UI for themes when updates are supported for that theme.
See #50280.
Props dd32.
git-svn-id: https://develop.svn.wordpress.org/trunk@48688 602fd350-edb4-49c9-b593-d223f7449a82
This removes the toggle UI when updates aren't available. When plugins use the filter, the UI is updated to show that they are being controlled via code. And then removed entirely when not available.
See #50798.
Fixes#50280.
Props elrae, pbiron, SergeyBiryukov, audrasjb, azaozz, StephenCronin, whyisjake, dd32, TimothyBlynJacobs, desrosj.
git-svn-id: https://develop.svn.wordpress.org/trunk@48669 602fd350-edb4-49c9-b593-d223f7449a82
Since `wp_get_environment_type()` runs too early for plugins to hook these filters, and the result is then cached in a static variable and cannot be changed later, the filters are not that useful.
The `WP_ENVIRONMENT_TYPES` and `WP_ENVIRONMENT_TYPE` constants and environment variables should be enough for now.
Follow-up to [47919], [48188], [48372].
Props Clorith, SergeyBiryukov.
Fixes#33161.
git-svn-id: https://develop.svn.wordpress.org/trunk@48662 602fd350-edb4-49c9-b593-d223f7449a82
Changes from using `preg_match()` based `.php` extension checking to using `substr()` in `wp_opcache_invalidate()`.
Props jnylen0, aaroncampbell, SergeyBiryukov, desrosj, mikeschroder.
Fixes#50784.
git-svn-id: https://develop.svn.wordpress.org/trunk@48657 602fd350-edb4-49c9-b593-d223f7449a82
Gutenberg no longer uses the assets field to fetch the assets for the installed block so this field can be dropped from the endpoint. This allows us to reintroduce it at a later point without needing to worry about backward compatibility.
See #50732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48656 602fd350-edb4-49c9-b593-d223f7449a82
Ensure that background updater can be loaded for testing to see if auto-updates can enable automatic updates.
Fixes#50793.
Props dd32.
git-svn-id: https://develop.svn.wordpress.org/trunk@48655 602fd350-edb4-49c9-b593-d223f7449a82
This applies to the Themes screen and the Customizer theme browser.
Props afragen, SergeyBiryukov.
See #48491.
git-svn-id: https://develop.svn.wordpress.org/trunk@48652 602fd350-edb4-49c9-b593-d223f7449a82
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands:
* `npm run lint:jsdoc`
* `npm run lint:jsdoc:fix`
The latter will run the linter and try to fix an possible issues automatically.
Fixes#43828.
Props netweb, atimmer, kamataryo, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48650 602fd350-edb4-49c9-b593-d223f7449a82
DocBlocks should start with a brief, one sentence explanation of the purpose of the function spanning a maximum of two lines.
Follow-up to [48648].
See #44427.
git-svn-id: https://develop.svn.wordpress.org/trunk@48649 602fd350-edb4-49c9-b593-d223f7449a82
Prior to the PHPMailer update in 5.5, old version of the PHPMailer was setting the validator to 'auto' resulting in a sophisticated logic for determining what email address validation should be used. But the new version defaults to 'php', possibly leading to rejection of email addresses which were fine prior to the upgrade. Let's use the WordPress core function `is_email()` so that it can be fully pluggable.
Fixes#50720.
Props david.binda, ayeshrajans, Synchro, SergeyBiryukov, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@48645 602fd350-edb4-49c9-b593-d223f7449a82
The custom link colors for admin scheme colors were overriding the danger color.
Props kebbet, dlh.
Fixes#50547.
git-svn-id: https://develop.svn.wordpress.org/trunk@48643 602fd350-edb4-49c9-b593-d223f7449a82
In [47559] the `WP_REST_Request::set_param()` method was adjusted to try and overwrite an existing parameter definition before forcing the value in the first parameter slot. If `set_param()` was called on a request with an `application/json` content type and an empty body, a PHP warning would be issued. This was due to the JSON parameter type not being set to an array when the body is empty.
This commit avoids the warning by adding an `is_array()` check before calling `array_key_exists`. Ideally, `WP_REST_Reuest::parse_json_params()` would set the JSON parameter type to an empty array in this case, but that is too large of a change at this point in the cycle.
Props manooweb.
Fixes#50786.
git-svn-id: https://develop.svn.wordpress.org/trunk@48642 602fd350-edb4-49c9-b593-d223f7449a82
Support for retrieving the langauge pack alongside the install API request was added in https://meta.trac.wordpress.org/changeset/10091 to avoid having to make a plugin update check during the REST API check.
Fixes#50732.
Props dd32, ocean90, ryelle, swissspidy, tellyworth, whyisjake, TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@48641 602fd350-edb4-49c9-b593-d223f7449a82
This applies to the Themes screen fallback used when JS is turned off.
Props afragen, desrosj, SergeyBiryukov.
See #48491.
git-svn-id: https://develop.svn.wordpress.org/trunk@48640 602fd350-edb4-49c9-b593-d223f7449a82