The new default_term argument is added to `register_taxonomy()` allowing a user to define the default term `name` and optionally `slug` and `description`.
Fixes#43517.
Props enrico.sorcinelli, SergeyBiryukov, desrosj, davidbaumwald, whyisjake.
Built from https://develop.svn.wordpress.org/trunk@48356
git-svn-id: http://core.svn.wordpress.org/trunk@48125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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#50579.
Built from https://develop.svn.wordpress.org/trunk@48350
git-svn-id: http://core.svn.wordpress.org/trunk@48119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Widgets that output list of links can now be wrapped within `<nav>` elements to improve semantics and accessibility.
The `<nav>` elements are also native landmark regions, which helps assistive technology users to navigate through them. Themes can opt-in to this new behavior by declaring support for the new `html5` feature `navigation-widgets`.
Props joedolson, simonjanin, audrasjb, afercia.
Fixes#48170.
Built from https://develop.svn.wordpress.org/trunk@48349
git-svn-id: http://core.svn.wordpress.org/trunk@48118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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#50578.
Built from https://develop.svn.wordpress.org/trunk@48348
git-svn-id: http://core.svn.wordpress.org/trunk@48117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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#50577.
Built from https://develop.svn.wordpress.org/trunk@48347
git-svn-id: http://core.svn.wordpress.org/trunk@48116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- makes the postboxes areas in the Dashboard visible also on large screens
- uses a more meaningful text when all postboxes areas are empty instead of "Drag boxes here"
- restores the ability to drag boxes to the "advanced" area in the Classic Editor page
- makes the postboxes areas in the Classic Editor page visible while dragging so that users have a clue what the available areas are
- improves the color contrast of the postboxes areas while dragging
- uses `wp.i18n` for translatable strings in `wp-admin/js/postbox.js`
Props xkon, karmatosed, audrasjb, ocean90, joedolson, afercia, azaozz.
See #20491.
Fixes#49288, #47541.
Built from https://develop.svn.wordpress.org/trunk@48340
git-svn-id: http://core.svn.wordpress.org/trunk@48109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
- Introduce `wp_image_file_matches_image_meta()` utility function to check whether the image meta (retrieved by attachment ID) matches an image path or URI. A mismatch may happen in some cases, for example after the posts have been exported from one website and imported in another.
- Add unit tests for the new function.
- Improve `wp_image_src_get_dimensions()` a bit and use the new function to prevent these edge cases.
Fixes#50543.
Built from https://develop.svn.wordpress.org/trunk@48329
git-svn-id: http://core.svn.wordpress.org/trunk@48098 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This makes the property consistent with similar properties of other classes:
* `WP_Comment_Query::$found_comments`
* `WP_Network_Query::$found_networks`
* `WP_Site_Query::$found_sites`
* `WP_User_Query::$total_users`
Props birgire, PressLabs.
Fixes#42469.
Built from https://develop.svn.wordpress.org/trunk@48328
git-svn-id: http://core.svn.wordpress.org/trunk@48097 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* `_deprecated_function()`
* `_deprecated_constructor()`
* `_deprecated_file()`
* `_deprecated_argument()`
* `_deprecated_hook()`
* `apply_filters_deprecated()`
* `do_action_deprecated()`
This matches the documented type of `string` for these parameters and removes unnecessarily strict `! is_null()` checks.
Follow-up to [46792].
Props jignesh.nakrani, renathoc, SergeyBiryukov.
Fixes#49698.
Built from https://develop.svn.wordpress.org/trunk@48327
git-svn-id: http://core.svn.wordpress.org/trunk@48096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When a user has registered with incorrect data and got the account deleted immediately, it currently wasn't possible to register with the same login or email address again due to the existing signup entry. They had to wait for two days until the entry gets automatically deleted. Now the associated signup entry gets deleted as part of the account deletion.
Fixes#43232.
Built from https://develop.svn.wordpress.org/trunk@48315
git-svn-id: http://core.svn.wordpress.org/trunk@48084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This allows for hooking into both the create and update events with a single callback, in the same way that is already possible for posts via the `save_post` and `save_post_{$post->post_type}` actions.
Props dlh.
Fixes#48416.
Built from https://develop.svn.wordpress.org/trunk@48314
git-svn-id: http://core.svn.wordpress.org/trunk@48083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This further makes the function more consistent with `get_the_ID()` or `wp_get_post_parent_id()`, both returning `false` for a non-existing post.
Additionally, document that `get_post_thumbnail_id()` returns `0` if the thumbnail image is not set.
Follow-up to [47160].
Props theMikeD, dingo_d, netpassprodsr, SergeyBiryukov.
Fixes#49832. See #40096.
Built from https://develop.svn.wordpress.org/trunk@48310
git-svn-id: http://core.svn.wordpress.org/trunk@48079 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Multi-type schema handling was improved in [48306]. In particular, it now allows for sanitizing a multi-typed value that wouldn't validate. Removing this handling will make 3rd party registered theme features more robust.
Fixes#50562.
Built from https://develop.svn.wordpress.org/trunk@48308
git-svn-id: http://core.svn.wordpress.org/trunk@48077 1a063a9b-81f0-0310-95a4-ce76da25c4cd