If the option does not exist, it will be created with whatever was passed to the `$autoload` parameter, `'yes'` being only the default value.
Props leogermani.
Fixes#48357.
git-svn-id: https://develop.svn.wordpress.org/trunk@47373 602fd350-edb4-49c9-b593-d223f7449a82
Among other things, this preserves compatibility of WP with PHPUnit Code Coverage generation.
Props jrf, Veraxus, Rarst.
See #48605.
git-svn-id: https://develop.svn.wordpress.org/trunk@47370 602fd350-edb4-49c9-b593-d223f7449a82
The parameter was previously used as the number of comments, marked as deprecated in [5101].
Given that it's been deprecated for the last 13 years, it should be safe to undeprecate and repurpose it for a cleaner function signature, instead of adding a fifth parameter.
Follow-up to [47276].
Fixes#48772.
git-svn-id: https://develop.svn.wordpress.org/trunk@47366 602fd350-edb4-49c9-b593-d223f7449a82
Synchronize the documentation between two places, use `WP_Customize_Control::__construct()` as the canonical source.
Props hAmpzter, marekdedic, SergeyBiryukov.
Fixes#48343.
git-svn-id: https://develop.svn.wordpress.org/trunk@47364 602fd350-edb4-49c9-b593-d223f7449a82
Permit passing an empty object as the string "?obj=". The type of the passed empty argument is inferred from the registered schema.
Props TimothyBlynJacobs, steffanhalv, schlessera, dd32.
Fixes#42961.
git-svn-id: https://develop.svn.wordpress.org/trunk@47362 602fd350-edb4-49c9-b593-d223f7449a82
Check a more exhaustive list of post type editing caps beyond "edit_post" to ensure custom user roles with access to to specific post types may still use block editor functionality depending on theme features.
Props miyauchi, TimothyBlynJacobs.
Fixes#46723.
git-svn-id: https://develop.svn.wordpress.org/trunk@47361 602fd350-edb4-49c9-b593-d223f7449a82
Several filters were introduced to the render_block method since the initial implementation of the block-renderer/ endpoints, causing the output of those endpoints to diverge from the rendered content of blocks on the frontend.
Props kadamwhite, TimothyBlynJacobs, miinasikk.
Fixes#49387.
git-svn-id: https://develop.svn.wordpress.org/trunk@47360 602fd350-edb4-49c9-b593-d223f7449a82
This switches `WP_Dependencies::recurse_deps()` from recursively checking the same handles over and over again to keep a flattened array of queued items and their dependencies for faster lookup in `WP_Dependencies::query()`.
Props superdav42.
Fixes#46469.
git-svn-id: https://develop.svn.wordpress.org/trunk@47359 602fd350-edb4-49c9-b593-d223f7449a82
This resolves PHP notices in a few places in core where this capability is checked.
Props Mte90, johnbillion, dipesh.kakadiya, jipmoors, bamadesigner, dd32, johnjamesjacoby, xedin.unknown, flixos90, SergeyBiryukov.
Fixes#30991.
git-svn-id: https://develop.svn.wordpress.org/trunk@47357 602fd350-edb4-49c9-b593-d223f7449a82
This resolves PHP warnings when extensions like `php_uopz` or `php_tideways_xhprof` are in use.
Object variables in PHP 5+ contain a reference to the object, and it's the reference that's passed around.
Props jqz, killerbishop, Mte90, TJNowell, jorbin, pento, pcarvalho, valentinbora, SergeyBiryukov.
Fixes#44979.
git-svn-id: https://develop.svn.wordpress.org/trunk@47355 602fd350-edb4-49c9-b593-d223f7449a82
The string was previously added in [42794] and accidentally removed in [44163].
Props garrett-eclipse, audrasjb.
Fixes#49505.
git-svn-id: https://develop.svn.wordpress.org/trunk@47353 602fd350-edb4-49c9-b593-d223f7449a82
- Update the DependencyExtractionWebpackPlugin to 2.3.0 and set it to output a single assets file.
- Grunt: copy the assets file to both `SOURCE_DIR` and `BUILD_DIR` as `wp-includes/assets/script-loader-packages.php`.
- "Unignore" the `wp-includes/assets` directory. Its content will be committed similarly to `wp-includes/blocks`.
- Update `wp_default_packages_scripts()` to use the above file. This also removes the hard-coded lists of packages and packages with translations.
Props gziolo, pbearne, johnbillion, isabel_brison, ocean90, azaozz.
Fixes#48154.
git-svn-id: https://develop.svn.wordpress.org/trunk@47352 602fd350-edb4-49c9-b593-d223f7449a82
Following [47260] a namespace such as "test-ns" prevents any namespace such as "test-ns/v1" from being found when matching routes.
While not best practice, this was an unintentional back-compat break; this patch restores the original behavior.
Props david.binda, TimothyBlynJacobs.
Fixes#48530.
git-svn-id: https://develop.svn.wordpress.org/trunk@47351 602fd350-edb4-49c9-b593-d223f7449a82
This brings parity with the `wp_nav_menu_item_custom_fields` action added in [47190] for the Menus screen.
Props celloexpressions.
Fixes#47056.
git-svn-id: https://develop.svn.wordpress.org/trunk@47350 602fd350-edb4-49c9-b593-d223f7449a82
Correct an issue where comments marked as spam in a mobile view displayed incorrectly, filling a narrow and very tall column with the notice that a comment was marked as spam.
Props jeremyfelt, lorenzof, mukesh27, razamalik, xkon.
Fixes#48814.
git-svn-id: https://develop.svn.wordpress.org/trunk@47340 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the pullquote color setting by adding classes that are more specific to the color options.
Props ianbelanger.
Fixes#49410.
git-svn-id: https://develop.svn.wordpress.org/trunk@47339 602fd350-edb4-49c9-b593-d223f7449a82
All schema types, not just objects, are permitted as the base type of a resource. A future patch could add validation support for those types, but this fix only prevents a PHP warning from being issued.
Props dhavalkasvala, johnwatkins0, birgire.
Fixes#48785.
git-svn-id: https://develop.svn.wordpress.org/trunk@47328 602fd350-edb4-49c9-b593-d223f7449a82
Fixes the margins in the block editor to address recent changes in block margins.
Props Joen, SergeyBiryukov, kjellr, jffng, allancole.
Fixes#48526.
git-svn-id: https://develop.svn.wordpress.org/trunk@47327 602fd350-edb4-49c9-b593-d223f7449a82
The documentation for register_setting has also been clarified to include all of the supported types and the flexibility of the show_in_rest parameter.
Fixes#42875.
Props perrywagle, dshanske, kadamwhite.
git-svn-id: https://develop.svn.wordpress.org/trunk@47325 602fd350-edb4-49c9-b593-d223f7449a82
`assertSame()` doesn't have the `$delta` parameter, only `assertEquals()` does.
Follow-up to [47313].
See #40364.
git-svn-id: https://develop.svn.wordpress.org/trunk@47318 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that `wp_update_post()` does not unintentionally modify post tags if the post has several tags with the same name but different slugs.
Tags should only be modified if `tags_input` parameter was explicitly provided, and is different from the existing tags.
Props kaggdesign, SergeyBiryukov.
Fixes#45121.
git-svn-id: https://develop.svn.wordpress.org/trunk@47317 602fd350-edb4-49c9-b593-d223f7449a82
Even though the source URL for an attachment is stored in a variable, attachments should still be passed through the `wp_video_shortcode()` function.
Unprops desrosj, spacedmonkey.
See #46718.
git-svn-id: https://develop.svn.wordpress.org/trunk@47308 602fd350-edb4-49c9-b593-d223f7449a82
This change fixes an issue where the error codes associated with failed REST API tests are not being printed to the screen. In addition, the square brackets have been replaced with parentheses for consistency, and the error code (which is much less useful to end-users than the error message itself) has been moved to the end of the line.
This also clarifies the associated translator comments.
Props afercia, desrosj.
Fixes#49426.
git-svn-id: https://develop.svn.wordpress.org/trunk@47306 602fd350-edb4-49c9-b593-d223f7449a82