By saving `$wpdb->insert_id` to a variable, we make sure the ID does not change if another database insert is performed on the `clean_site_cache` action.
Props trepmal.
Fixes#50324.
git-svn-id: https://develop.svn.wordpress.org/trunk@47932 602fd350-edb4-49c9-b593-d223f7449a82
WPCS 2.2.0 added a sniff for detecting short ternary operator syntax, which is not allowed per the Core handbook.
Follow up of [47927].
Fixes#50258.
git-svn-id: https://develop.svn.wordpress.org/trunk@47929 602fd350-edb4-49c9-b593-d223f7449a82
The `$HTTP_RAW_POST_DATA` global was deprecated in PHP 5.6 and removed completely in PHP 7.0. In general, `php://input` should be used instead of `$HTTP_RAW_POST_DATA`.
Because WordPress Core still supports PHP 5.6, some plugins or sites may still rely on this variable being present and populated with the expected data. For that reason, occurrences of the variable will remain with updated inline documentation until support for PHP 5.6 is officially dropped in WordPress.
Props skoskie, jrf, desrosj, TimothyBlynJacobs.
See #49922.
Fixes#49810.
git-svn-id: https://develop.svn.wordpress.org/trunk@47926 602fd350-edb4-49c9-b593-d223f7449a82
Additionally, switch the "Live Preview" label for the active theme to "Customize", for consistency with the Themes screen.
Props afercia, SergeyBiryukov.
Fixes#50334.
git-svn-id: https://develop.svn.wordpress.org/trunk@47924 602fd350-edb4-49c9-b593-d223f7449a82
When the themes controller was introduced it only returned a theme's supported features. This adds the majority of a theme's header information to the response.
Props ockham, spacedmonkey.
Fixes#49906.
git-svn-id: https://develop.svn.wordpress.org/trunk@47921 602fd350-edb4-49c9-b593-d223f7449a82
The type can be set via the `WP_ENVIRONMENT_TYPE` global system variable, a constant of the same name, or the `wp_get_environment_type` filter.
Possible values include `development`, `stage`, `production'. If not set, the type defaults to `production`.
Props Clorith, krogsgard, joostdevalk, frank-klein, Maelacuna, nathanrice, grierson, jchristopher, davidvee, jackfungi, johnbillion, tabrisrp, knutsp, ev3rywh3re, Rastaban, danielbachhuber, pfefferle, audrasjb, SergeyBiryukov.
Fixes#33161.
git-svn-id: https://develop.svn.wordpress.org/trunk@47919 602fd350-edb4-49c9-b593-d223f7449a82
Fix an issue where the media attachment filter no longer worked after switching to list view, filtering by a media type then switching back to the grid view.
Props itzmekhokan, netsurfer2705, zodiac1978.
Fixes#43656.
git-svn-id: https://develop.svn.wordpress.org/trunk@47915 602fd350-edb4-49c9-b593-d223f7449a82
* Add new var $valid_schema_properties to match rest_validate_value_from_schema()
* Unit test to ensure all valid properties exists, and non-valid properties are ignored
Fixes: #50301.
Props: pentatonicfunk, TimothyBlynJacobs.
git-svn-id: https://develop.svn.wordpress.org/trunk@47911 602fd350-edb4-49c9-b593-d223f7449a82
`<span>` elements used for displaying icons should use the `aria-hidden` attribute as they are purely decorative.
Props audrasjb, ryokuhi.
Fixes#50293.
git-svn-id: https://develop.svn.wordpress.org/trunk@47910 602fd350-edb4-49c9-b593-d223f7449a82
This action fires when media is attached/detached from a post.
Fixes: #49614.
Props: jonoaldersonwp, antpb, rebasaurus, donmhico.
git-svn-id: https://develop.svn.wordpress.org/trunk@47909 602fd350-edb4-49c9-b593-d223f7449a82
Related to the issue with default values for the blocks registered on the server. By using null for some fields we can treat them as undefined on the client.
See: WordPress/gutenberg#22849.
Props aduth.
Fixes#48529.
git-svn-id: https://develop.svn.wordpress.org/trunk@47907 602fd350-edb4-49c9-b593-d223f7449a82
This is a final pass to fix PHP compatibiilty issues in the codebase with code changes or adding `phpcs:ignore` comments.
With this change, all PHP compatibility warnings and errors without specific tickets have been addressed (see #49810 and #41750).
Props desrosj, johnbillion, jrf.
See #49922.
git-svn-id: https://develop.svn.wordpress.org/trunk@47902 602fd350-edb4-49c9-b593-d223f7449a82
When branches are unintentionally pushed to the GitHub `wordpress-develop` mirror by committers, a build is triggered in Travis and the result is reported in Slack if the criteria defined is met.
Though this is not the desired workflow (any modifications made to the mirror are erased when the repository is synced from SVN), this can cause a lot of noise if several pushes are made and raise false alarms.
This change limits builds only to the `master` branch, and branches meeting the `X.X` pattern to match each branched version.
Props desrosj, jorbin, ocean90, TimothyBlynJacobs.
Fixes#50307.
git-svn-id: https://develop.svn.wordpress.org/trunk@47901 602fd350-edb4-49c9-b593-d223f7449a82
Previously, verification was disabled for the loopback request to the admin URL, but not to the home URL.
Follow-up to [46230].
Props munyagu.
Fixes#50309. See #47957.
git-svn-id: https://develop.svn.wordpress.org/trunk@47896 602fd350-edb4-49c9-b593-d223f7449a82
Enable developers to change the regex used in `safecss_filter_attr` to limit characters in the parsed CSS.
Props paulschreiber, swissspidy, rmccue, bartekcholewa, miinasikk.
Fixes#37134.
git-svn-id: https://develop.svn.wordpress.org/trunk@47891 602fd350-edb4-49c9-b593-d223f7449a82
After a comment is submitted, only allow a brief window where the comment is live on the site.
Fixes#49956.
Props: jonkolbert, ayeshrajans, Asif2BD, peterwilsoncc, imath, audrasjb, jonoaldersonwp, whyisjake.
git-svn-id: https://develop.svn.wordpress.org/trunk@47887 602fd350-edb4-49c9-b593-d223f7449a82
Some themes already had these checks in place as a result of [41756], but not others.
Props sixhours, davidakennedy, SergeyBiryukov.
Fixes#39860.
git-svn-id: https://develop.svn.wordpress.org/trunk@47886 602fd350-edb4-49c9-b593-d223f7449a82
Improve filter documentation for consistency with other similar short-circuit filters in core.
Follow-up to [47878].
See #16557.
git-svn-id: https://develop.svn.wordpress.org/trunk@47885 602fd350-edb4-49c9-b593-d223f7449a82
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See #20491.
Fixes#50235.
git-svn-id: https://develop.svn.wordpress.org/trunk@47884 602fd350-edb4-49c9-b593-d223f7449a82
This helps setting up the correct version of PHPUnit to run WordPress core tests locally and for using it as source for code autocompletion in tests. Also introduces a new Composer script `test` to run the PHPUnit tests.
Props welcher, ayeshrajans, vinkla, johnbillion, Rarst, netweb, ocean90.
Fixes#46815.
git-svn-id: https://develop.svn.wordpress.org/trunk@47881 602fd350-edb4-49c9-b593-d223f7449a82
With the minimum PHP version requirement set to 5.6 we're now able to use namespaces by default. This replaces `PHPUnit_Framework_TestCase` with `PHPUnit\Framework\TestCase` for `WP_UnitTestCase_Base` to solve autocompletion issues with code editors when using more recent PHPUnit versions. `PHPUnit\Framework\TestCase` is available since PHPUnit 5.4 and now the minimum required PHPUnit version.
Fixes#50236.
git-svn-id: https://develop.svn.wordpress.org/trunk@47880 602fd350-edb4-49c9-b593-d223f7449a82
Both views now show a full date string. Something like `Published 2020/05/27 at 10:25 pm`.
Fixes: #35391.
Props: afercia, ocean90, TimothyBlynJacobs, audrasjb, SergeyBiryukov, joedolson.
git-svn-id: https://develop.svn.wordpress.org/trunk@47879 602fd350-edb4-49c9-b593-d223f7449a82
* Add missing `os` and `dist` with the current default values.
* Replace the alias `matrix` with `jobs`.
* Remove unsupported `on_start` for `notifications.slack`.
Fixes#50296.
git-svn-id: https://develop.svn.wordpress.org/trunk@47877 602fd350-edb4-49c9-b593-d223f7449a82
As part of #47620 and the RFC for block registeration. Server registered blocks are missing some fields. These changeset includes them.
Props spacedmonkey, aduth.
Fixes#48529.
git-svn-id: https://develop.svn.wordpress.org/trunk@47875 602fd350-edb4-49c9-b593-d223f7449a82