* `get_header()`
* `get_footer()`
* `get_sidebar()`
* `get_template_part()`
These functions now return false if the template file could not be found, to allow for easier debugging.
Props tferry, sphakka, johnbillion, pento, davidbinda, desrosj, birgire, garrett-eclipse, williampatton, davidbaumwald, SergeyBiryukov.
Fixes#40969.
git-svn-id: https://develop.svn.wordpress.org/trunk@48209 602fd350-edb4-49c9-b593-d223f7449a82
This makes the function signatures more consistent with `wp_update_comment()` and `wp_set_comment_status()`.
`wp_check_comment_flood()` is left as the only function with the `$avoid_die` parameter for now, as it does not return a `WP_Error` object.
Follow-up to [48154], [48207].
See #39732.
git-svn-id: https://develop.svn.wordpress.org/trunk@48208 602fd350-edb4-49c9-b593-d223f7449a82
This was intended as a temporary fix until `add_magic_quotes()` is modified to leave non-string values untouched, which has now been done.
Follow-up to [47370], [48205].
See #48605.
git-svn-id: https://develop.svn.wordpress.org/trunk@48206 602fd350-edb4-49c9-b593-d223f7449a82
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.
Props kraftbj.
See #48267, #47678.
git-svn-id: https://develop.svn.wordpress.org/trunk@48204 602fd350-edb4-49c9-b593-d223f7449a82
* Rename the `wp_approved_environment_types` filter to `wp_environment_types`.
* Introduce `WP_ENVIRONMENT_TYPES` system variable and constant to complement the filter.
* Correct the argument type for the `wp_environment_types` filter.
* Cache the result in a static variable to ensure consistent return value.
* Rename the `stage` type to `staging`.
Follow-up to [47919].
Props dlh, dd32, TimothyBlynJacobs, johnbillion, pbiron.
See #33161.
git-svn-id: https://develop.svn.wordpress.org/trunk@48188 602fd350-edb4-49c9-b593-d223f7449a82
Due to an unintended `break` instruction from a previous iteration, the function cached only one term in each taxonomy.
Follow-up to [48055].
Props Chouby.
Fixes#50352.
git-svn-id: https://develop.svn.wordpress.org/trunk@48187 602fd350-edb4-49c9-b593-d223f7449a82
The filter is the callback function added with `add_filter()`, therefore the hook passes a value to the filter, and the filter returns a value to change its behaviour.
The documentation is referring to the latter.
Props johnbillion.
See #49572, #16557.
git-svn-id: https://develop.svn.wordpress.org/trunk@48185 602fd350-edb4-49c9-b593-d223f7449a82
This improves the wording of the inline documentation for `redirect_guess_404_permalink()` and the related filters introduced in [47878].
Previously [47878,47885]
See #16557.
git-svn-id: https://develop.svn.wordpress.org/trunk@48182 602fd350-edb4-49c9-b593-d223f7449a82
Adds a Social Icons Filter to Twenty Twenty that allows for new icons to be added to the theme by filter.
Props JarretC, nielslange, acosmin, desrosj.
Fixes#48713.
git-svn-id: https://develop.svn.wordpress.org/trunk@48180 602fd350-edb4-49c9-b593-d223f7449a82
This endpoint allows a user to retrieve the block type definition for all server-side registered block types.
Props spacedmonkey, aduth, gziolo, ocean90, TimothyBlynJacobs.
Fixes#47620.
git-svn-id: https://develop.svn.wordpress.org/trunk@48173 602fd350-edb4-49c9-b593-d223f7449a82
This adds some extra details to the message:
* The current PHP or WordPress version.
* The plugin's minimum required PHP or WordPress version.
* A link to the support documentation on how to update PHP.
Props stuffradio, johnbillion, garrett-eclipse, sabernhardt, williampatton, SergeyBiryukov.
Fixes#48245.
git-svn-id: https://develop.svn.wordpress.org/trunk@48172 602fd350-edb4-49c9-b593-d223f7449a82
Currently themes can declare support for a given feature by using add_theme_support(). This commit adds a register_theme_feature() API that allows plugins and WordPress Core to declare a list of available features that themes can support.
The REST API uses this to expose a theme's supported features if the feature has been registered with "show_in_rest" set to true.
Props kadamwhite, spacedmonkey, williampatton, desrosj, TimothyBlynJacobs.
Fixes#49406.
git-svn-id: https://develop.svn.wordpress.org/trunk@48171 602fd350-edb4-49c9-b593-d223f7449a82
This changeset ensures that attachment images which are inserted without `width` and `height` attributes still receive them in the frontend, to reduce cumulative layout shift. Adding the dimensions happens as part of the logic for adding `srcset` and `sizes` attributes, which already assume the specific width and height of the respective image.
Images are now only lazy-loaded if they have `width` and `height` attributes present. While missing these attributes itself is what causes layout shifts, lazy-loading such images can make this problem more apparent to the user.
Props adamsilverstein, westonruter.
Fixes#50367. See #44427.
git-svn-id: https://develop.svn.wordpress.org/trunk@48170 602fd350-edb4-49c9-b593-d223f7449a82
This was deprecated in [20212] in favor of passing `”uploads” => true` to the `custom-header` feature, so it should not be specified as an available feature in the parameter documentation.
See #49572.
git-svn-id: https://develop.svn.wordpress.org/trunk@48169 602fd350-edb4-49c9-b593-d223f7449a82
When files are copied into place, check whether opcode invalidation is available and attempt to invalidate to avoid unintended behavior or fatal errors from themes, plugins, or core.
Introduces `wp_opcache_invalidate()` to allow safe invalidation of PHP files from opcode cache, and a filter, `wp_opcache_invalidate_file` to override the behavior.
Replaces the existing calls to `opcache_invalidate()` in the plugin and theme editors to use the new function.
Thanks to jnylen0 for porting over a patch from ClassicPress that provided much of the approach for what is being committed.
Props nigro.simone, dd32, JasWSInc, szepe.viktor, swissspidy, JanR, asalce, Garavani, pavelevap, pputzer, GregLone, benoitchantre, jadonn, doc987, kraftbj, Krstarica, jnylen0, nextendweb, williampatton, ayeshrajans, joostdevalk, stevenkussmaul, boogah, jorbin, mikeschroder.
Fixes#36455, #50354.
git-svn-id: https://develop.svn.wordpress.org/trunk@48160 602fd350-edb4-49c9-b593-d223f7449a82