44921 Commits

Author SHA1 Message Date
Tonya Mork
13b52a310f Widgets: Use isset() in WP_Widget:: display_callback() to support ArrayIterator and ArrayObject.
[33696] introduced support returning `ArrayIterator` and `ArrayObject` objects from `WP_Widget::get_settings()`. 

Per the PHP manual, `array_key_exists()` stopped supporting this in PHP 8.0.0 and deprecated in PHP 7.4.0.

>For backward compatibility reasons, array_key_exists() will also return true if key is a property defined within an object given as array. This behaviour is deprecated as of PHP 7.4.0, and removed as of PHP 8.0.0.

This commit uses `isset()` instead of `array_key_exists()` which is supported on all current versions of PHP.

Includes unit tests.

Ref:
* https://www.php.net/manual/en/function.array-key-exists.php#refsect1-function.array-key-exists-notes

Follow-up to [32602], [33696].

Props dlh, hellofromTonya, jrf, sergeybiryukov.
Fixes #52728.

git-svn-id: https://develop.svn.wordpress.org/trunk@52173 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 01:41:23 +00:00
Joe Dolson
6ec3f649b7 Coding Standards: Revert accidental image changes in [52171].
Reverts images changed in [52171].

Follow up to [52171].

See #54168.


git-svn-id: https://develop.svn.wordpress.org/trunk@52172 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-16 00:02:29 +00:00
Joe Dolson
0a5971b72b Media: Revert media uploader input change in [52059].
Based on follow-up research, this change was never necessary in order to use e2e tests in the media library uploader. Additionally, it created several complicated side effects. Without significant benefit, it's not valuable to pursue the change further.

Follow up to [52059].

See #54168, #54411.
Fixes #54168.

git-svn-id: https://develop.svn.wordpress.org/trunk@52171 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 23:20:20 +00:00
Joe Dolson
74d7ef73b3 Taxonomy: Display update notices when adding terms.
Display notice and announce to screen readers when a new term is added. 

Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes #42937.


git-svn-id: https://develop.svn.wordpress.org/trunk@52170 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 22:23:01 +00:00
Joe Dolson
706018e08f Commit Standards: Revert [52168] to correct commit message.
Used incorrect commit message..

Follow up to [52168].

See #42937.

git-svn-id: https://develop.svn.wordpress.org/trunk@52169 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 22:16:32 +00:00
Joe Dolson
f58d8872b3 Media: Featured image modal loads only selected image.
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.

Props manishamakhija, birgire, dilipbheda, afercia, hellofromTonya.
Fixes #42937.

git-svn-id: https://develop.svn.wordpress.org/trunk@52168 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 21:53:26 +00:00
Joe Dolson
2049f04b4d Media: Featured image modal loads only selected image.
Fix bug introduced in [50829] that caused media modal to only load the selected image. Executes `.more()` when loading the modal to ensure that the media collection is available.

Props benitolopez, hellofromTonya, peterwilsoncc, danielbachhuber, PieWP, sabernhardt, szaqal21.
Fixes #53765.

git-svn-id: https://develop.svn.wordpress.org/trunk@52167 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 20:53:08 +00:00
Joe Dolson
1fcde43588 Menus: Add audible notice on menu item add or remove.
Call `wp.a11y.speak()` to add audible notification when a menu item is added or removed from a menu.

Props joedolson, costdev, hellofromTonya.
Fixes #53840.

git-svn-id: https://develop.svn.wordpress.org/trunk@52166 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 19:58:04 +00:00
Tonya Mork
1f79818913 Upgrade/Install: Deactivate the Gutenberg plugin if its version is 11.8 or lower.
Avoid a fatal error due to `WP_Theme_JSON_Schema` and potentially other classes and/or functions redeclarations when updating to WordPress 5.9 with an incompatible version of the Gutenberg plugin.

This commit uses the same strategy from 5.8. Moves the plugin deactivation code (introduced in [51266]) to a private function for reuse in 5.8, 5.9, and future major releases.

Follow-up to [51180], [51266].

Props hellofromTonya, johnbillion, jorbin.
See #54405.

git-svn-id: https://develop.svn.wordpress.org/trunk@52165 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 19:57:28 +00:00
Jeff Ong
df3601dff4 Twenty Twenty-Two: Import the latest changes from GitHub.
Updates `theme.json` to use v2 shape, adds styles to search and file block as well as generic text decoration. Fixes a bug in the layout of a query block pattern.

This is a follow-up to [52081]. These changes are ongoing and development continues on GitHub. To view all of the changes included in this commit, see GitHub: 99db6063be...a11fb4932a

Props desrosj, kjellr, poena.
See #54318.


git-svn-id: https://develop.svn.wordpress.org/trunk@52164 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 19:13:33 +00:00
Sergey Biryukov
7a82c00961 Taxonomy: Clarify the taxonomy labels for customizing the field descriptions on Edit Tags screen:
* Update the label names to make it clear that these descriptions are not for the term name or slug itself, but for the Name, Slug, Parent, and Description fields:
 * `name_field_description`
 * `slug_field_description`
 * `parent_field_description`
 * `desc_field_description`
* Update the array structure to make it clear that the default values for these labels are the same for both hierarchical and non-hierarchical taxonomies, with the exception of `parent_field_description`.
* Add documentation and a `@since` note for the new labels.

Follow-up to [52094].

Fixes #43060.

git-svn-id: https://develop.svn.wordpress.org/trunk@52163 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 16:43:29 +00:00
Jonathan Desrosiers
f55fc8bc8c External Libraries: Update the regenerator-runtime package to version 0.13.9.
Props hareesh-pillai, sourovroy, hellofromTonya.
Fixes #54027.

git-svn-id: https://develop.svn.wordpress.org/trunk@52162 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 16:33:36 +00:00
Robert Anderson
9b142dd264 Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Navigation: Fix click-button size, submenu directions, scrollbars.
- Group - Fix overzealous regex when restoring inner containers
- Babel Preset: Update Babel packages to 7.16 version
- theme.json: adds a setting property that enables some other ones
- Polish metabox container.
- Fix submenu justification and spacer orientation.
- Fix Gutenberg 11.8.2 in WordPress trunk
- Strip meta tags from pasted links in Chromium
- Hide visilibility and status for navigation posts
- Navigation: Refactor and simplify setup state.
- Nav block menu switcher - decode HTML entities and utilise accessible markup pattern
- Rename fse_navigation_area to wp_navigation_area
- theme.json: adds a setting property that enables some other ones
- Revert "theme.json: adds a setting property that enables some other ones"
- Skip flaky image block test
- WordPress/gutenberg@3c935c4
- React to any errors coming up in gutenberg_migrate_menu_to_navigation_post
- Return wp error from wp_insert_post
- Fix not transforming logical assignments for packages

See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52161 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 12:47:22 +00:00
Robert Anderson
47b5b384e5 Editor: Load iframed assets in Site Editor
Configure the Site Editor to load iframed block editor assets. This fixes some
styling issues in the Site Editor.

Follows [52069].
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52160 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 10:59:48 +00:00
Robert Anderson
5b811e3397 Editor: Fix fatal call to add_query_args()
It should be add_query_arg(), not add_query_args().

Follows [52145].
See #54337.
Props sabernhardt.


git-svn-id: https://develop.svn.wordpress.org/trunk@52159 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 06:17:57 +00:00
Robert Anderson
5d64794e6f Editor: Fix how the Site Editor is linked to
- Add 'Edit site' to the top admin bar.
- Link to the Template and Template Part CPTs.
- Add deep link to the Global Styles UI.

Follows [52069].
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52158 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 03:42:08 +00:00
Timothy Jacobs
91c3f80355 Users: Prevent infinite loop when using capability checks during determine_current_user on multisite.
On multisite, when checking if a user has a certain capability WordPress makes an additional check to see if the user is a super admin. The `is_super_admin()` function contained a call to `wp_get_current_user()` so as the global current user object could be used if it matched the queried user id.

This would cause an infinite loop if a hook attached to the `determine_current_user` filter was itself making a permission check. For example when limiting who can use the Application Passwords feature based on their capabilities.

Since [50790] the `WP_User` instance for the current user is shared between `wp_get_current_user()` and `get_userdata()`. This means we can remove the `wp_get_current_user` call from `is_super_admin()` while still retaining the same behavior.

Props chrisvanpatten, peterwilsoncc.
Fixes #53386.


git-svn-id: https://develop.svn.wordpress.org/trunk@52157 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 01:08:35 +00:00
Robert Anderson
b609efa519 Build/Test Tools: Restore the https URL for browserify-aes
Follows [52143].
See #54337.
Props TobiasBg.


git-svn-id: https://develop.svn.wordpress.org/trunk@52156 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 00:17:23 +00:00
Robert Anderson
02ad588c99 Editor: Fix incorrect access of ID field
Now that WP_Query is set to return 'ids', accessing $matching_posts[0]->ID is
incorrect.

Props spacedmonkey.
Follows [52145].
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52155 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-15 00:10:39 +00:00
Sergey Biryukov
8154a715b4 Comments: Use get_comment_author() to retrieve the comment author name in get_comment_reply_link().
This ensures that the `get_comment_author` filter is applied to the comment author name as expected.

Follow-up to [29822], [47506].

Props mjulian7, audrasjb, chaion07, hellofromTonya, SergeyBiryukov.
Fixes #53678.

git-svn-id: https://develop.svn.wordpress.org/trunk@52154 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-14 17:59:04 +00:00
Weston Ruter
9aa70c8ebf Embeds: Fix parsing of post embeds in wp_filter_oembed_result() by appending wp-embed script instead of prepending it in get_post_embed_html().
Due to the way that the `blockquote` and `iframe` are being parsed with a regular expression in `wp_filter_oembed_result()`, if there is any content at all before the `blockquote` start tag then it will fail to be included in the first matching group. By appending the `wp-embed` script instead of prepending it in `get_post_embed_html()`, then the parsing issue is avoided.

Also use non-greedy match `wp_maybe_enqueue_oembed_host_js()`.

Amends [52132].
Fixes #44632.


git-svn-id: https://develop.svn.wordpress.org/trunk@52153 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-13 07:26:52 +00:00
Sergey Biryukov
1e6bede076 Twenty Eleven: Improve comment form styling for required fields.
Previously, with absolute positioning, the star character to signify required comment form fields could overlap the text in some languages. The star's styling was also inconsistent between the input labels and the comment notes paragraph.

This commit makes the star's styling more consistent and ensures it does not overlap with the text.

Follow-up to [52029].

Props sabernhardt, hellofromTonya.
Fixes #54408.

git-svn-id: https://develop.svn.wordpress.org/trunk@52152 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-13 04:23:07 +00:00
Weston Ruter
72ab145390 Embeds: Fix inclusion of wp-embed-template script and style when SCRIPT_DEBUG is disabled.
Amends [52132].
See #44632.


git-svn-id: https://develop.svn.wordpress.org/trunk@52151 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-13 00:57:35 +00:00
Sergey Biryukov
133a3dd1a3 Coding Standards: Rename the $gzData argument to $gz_data in WP_Http_Encoding::compatible_gzinflate().
This fixes a `Variable "$gzData" is not in valid snake_case format` WPCS warning.

Follow-up to [11684].

See #53359.

git-svn-id: https://develop.svn.wordpress.org/trunk@52150 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 23:50:07 +00:00
Joe Dolson
85333a6192 Bundled Theme: Display required text field in core themes.
Fix Twenty Nineteen and Twenty Twenty-One setting the `logged_in_as` parameter to null, which also eliminated the required field text. See #16206.

Props sabernhardt, poena.
Fixes #54392.

git-svn-id: https://develop.svn.wordpress.org/trunk@52149 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 22:45:33 +00:00
Jonathan Desrosiers
0c812b536b Build/Test Tools: Exclude plugins and non-bundled themes from PHP compatibility scans.
Fixes #54425.

git-svn-id: https://develop.svn.wordpress.org/trunk@52148 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 18:38:54 +00:00
Weston Ruter
e4132b5a61 Twenty Twenty-One: Prevent printing skip link focus fix when SCRIPT_DEBUG is enabled.
An `else` statement was missing in `twenty_twenty_one_skip_link_focus_fix()`. See ba83586ff1.

Fixes #54429.


git-svn-id: https://develop.svn.wordpress.org/trunk@52147 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 16:06:35 +00:00
Tonya Mork
2ff7174e7c Build/Test Tools: Mock no results remote request in WP_REST_Block_Directory_Controller:: get_items().
* Refactors the mock logic to a helper function for reuse in multiple tests.
* Mocks the remote request in `WP_REST_Block_Directory_Controller_Test:: test_get_items_no_results()` using the mock helper.

Follow-up to [48242], [52137].

Props hellofromTonya, sergeybiryukov.
See #54420.

git-svn-id: https://develop.svn.wordpress.org/trunk@52146 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 13:45:05 +00:00
Robert Anderson
74df751e48 Editor: Add Navigation Area infrastructure
Copies Navigation Area infrastrucutre from lib/navigation.php in Gutenberg. This
allows a Navigation block to be associated with a particular area which persists
when switching theme.

Props antonvlasenko, mamaduka, spacedmonkey.
See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52145 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 03:53:18 +00:00
Tonya Mork
ff04bb0017 Bootstrap/Load: Check $_SERVER['SCRIPT_NAME'] exists before passing to strpos() in wp_fix_server_vars().
If `SCRIPT_NAME'` does not exist (which can happen in cron jobs), the following happens:

* PHP 8.1+:
    * `Warning: Undefined array key "SCRIPT_NAME"`
    * `Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated` 
* PHP 8.0: `Warning: Undefined array key "SCRIPT_NAME"`
* PHP 5.6-7.4: No warning or notice

This commit checks if the key exists before passing it to `strpos()`. This resolves the warning, notice, and future error.

Follow-up to [3034], [3069], [12732].

Props audrasjb, costdev, hellofromTonya, karpstrucking, mcjambi, sergeybiryukov.
Fixes #54142.

git-svn-id: https://develop.svn.wordpress.org/trunk@52144 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 01:08:35 +00:00
Robert Anderson
95adcec4c9 Update 'react' and 'react-dom'
Update 'react' and 'react-dom' packages to version 17.0.1. This is the version
expected by @wordpress components.

See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52143 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-12 00:03:30 +00:00
Sergey Biryukov
9451b13db3 Twenty Twenty-One: Correct default image alignment in the editor.
By default, the theme centers images on the front end when no alignment is selected. In the editor, however, images were aligned to the left side of the block.

This commit ensures that the alignment in the editor matches the one on the front end.

Props sabernhardt, ashfame, poena, annezazu.
Fixes #53809.

git-svn-id: https://develop.svn.wordpress.org/trunk@52142 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 19:33:48 +00:00
David Baumwald
04f62997d3 Posts, Post Types: Update _edit_last meta when posts are edited in bulk.
When posts are edited in bulk, the `_edit_last` meta was not updated for each post.  This change adds a call to update the `_edit_last` meta to the current user ID for each post the is updated.

Props calebwoodbridge, peterwilsoncc, guillaumeturpin, audrasjb.
Fixes #42446.

git-svn-id: https://develop.svn.wordpress.org/trunk@52141 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 19:07:52 +00:00
David Baumwald
d762d720cc Options, Meta APIs: Correct docs for $_meta_value parameter in xxx_{$meta_type}_meta hooks.
In `add_{$meta_type}_meta`, `added_{$meta_type}_meta`, `update_{$meta_type}_meta`, `updated_{$meta_type}_meta`, `delete_{$meta_type}_meta`, and `deleted_{$meta_type}_meta` hooks, the `$_meta_value` parameter was documented as "Serialized if non-scalar".  However, `$_meta_value` is a copy of the raw meta value before `maybe_serialize` is run and is not serialized.  This change updates each of the above hooks' docblocks to remove "Serialized if non-scalar" from the `$_meta_value` parameter description.

Props pputzer, hasanuzzamanshamim.
Fixes #53102.

git-svn-id: https://develop.svn.wordpress.org/trunk@52140 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 18:30:27 +00:00
Joe Dolson
7b61f1305a Upgrade/Install: Update screen reader text counts in adminbar.
Update the hidden screen-reader-text update count in the adminbar when updates are run on the plugin or theme screens.

Props pento, paulschreiber, adamsilverstein, afercia, SergeyBiryukov, sabernhardt.
Fixes #29022.

git-svn-id: https://develop.svn.wordpress.org/trunk@52139 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 17:19:58 +00:00
Tonya Mork
206ee73bdd Build/Test Tools: Mock remote request for unknown plugin in WP_REST_Plugins_Controller::create_item().
Instead of hitting the live API, this commit mocks the remote request when testing creating an item that's an unknown plugin.

Follow-up to [48242].

Props hellofromTonya, noisysocks, sergeybiryukov, TimothyBlynJacobs.
See #54420.

git-svn-id: https://develop.svn.wordpress.org/trunk@52138 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 16:58:27 +00:00
Tonya Mork
046d86f95b Build/Test Tools: Mock remote request for WP_REST_Block_Directory_Controller::get_items().
Instead of hitting the live API, this commit mocks the remote request.

Follow-up to [48242].

Props hellofromTonya, noisysocks, sergeybiryukov, TimothyBlynJacobs.
Fixes #54420.

git-svn-id: https://develop.svn.wordpress.org/trunk@52137 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 16:52:22 +00:00
Tonya Mork
06dc5e170f Template: Fix "undefined index: 00" when archive month query is empty in wp_title().
When `m` query_tag has a valid year, i.e. `?m=2021`, and there are posts for that year, `substr()` returns a `false` on PHP 5.6 and an empty string on PHP 7.0+. Passing either of those values to `$wp_locale->get_month()` results in a PHP notice on PHP 5.6 to PHP 7.4 and a PHP Warning on PHP 8.0+.

Why? The `$month` lookup table has zeroized keys from '01' to '12'. A empty value is passed to `zeroise()` returns `'00'` which is directly passed as a key in the month property. That key does not exist.

While `$wp_locale->get_month()` would benefit from guarding/validation, this fix ensures a falsey value is not passed as a month.

Tests are added including a test that fails with this fix not applied.

Follow-up to [801], [35294], [35624].

Props antpb, audrasjb, costdev, davidmosterd, drewapicture, herregroen, hellofromTonya, michelwppi, sergeybiryukov.
Fixes #31521.

git-svn-id: https://develop.svn.wordpress.org/trunk@52136 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 16:27:44 +00:00
Robert Anderson
d2ddc42e6d Update @wordpress packages
Update packages to include these bug fixes from Gutenberg:

- Group - Fix inner container regexes using fixed div tag
- Image block: Make sure the Image block border radius is inherited if the image is linked
- Navigation: Small fixes
- FSE: Add template_type guards
- Template Part Block: Add some guards
- Fix getEntityRecords to ensure resolution on REST API failure
- Ensure menus before map operation in Nav block
- Link editing: Account for link anchor no longer being present when generating unique link instance key
- Navigation: Hide post attributes meta box
- Fix failing tests and compatibility with 5.9.
- Fix missing <MainDashboardButton> slot fill in site editor
- Move WP_REST_Block_Navigation_Areas_Controller from Gutenberg to Core.
- Fix site editor reset styles in WP 5.9

See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52135 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 07:41:38 +00:00
Robert Anderson
37c8dfc09f Hide Customize from admin bar when using a block theme
Don't add the Customize link to the admin bar when a block theme is activated.

See #54337.


git-svn-id: https://develop.svn.wordpress.org/trunk@52134 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 04:45:22 +00:00
Robert Anderson
f7d670c767 REST API: Add /wp/v2/block-navigation-areas endpoint
Copies WP_REST_Block_Navigation_Areas_Controller from the Gutenberg plugin. This
provides the /wp/v2/block-navigation-areas endpoint used by the Navigation
block.

Props antonvlasenko, TimothyBlynJacobs.
Fixes #54393.


git-svn-id: https://develop.svn.wordpress.org/trunk@52133 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 03:50:22 +00:00
Weston Ruter
02a2f9c9f5 Embeds: Conditionally enqueue wp-embed only if needed and send ready message in case script loads after post embed windows.
* Prevent loading `wp-embed` script unconditionally on every page in favor of conditionally enqueueing when a post embed is detected. The `wp-embed` script is also explicitly marked as being in the footer group. Sites which currently disable post embed scripts from being enqueued via `remove_action( 'wp_head', 'wp_oembed_add_host_js' )` will continue to do so.
* Send a `ready` message from the host page to each post embed window in case the `iframe` loads before the `wp-embed` script does. When the `ready` message is received by the post embed window, it sends the same `height` message as it sends when it loads.
* Eliminate use of `grunt-include` to inject emoji script and the post embed script. Instead obtain the script contents via `file_get_contents()` (as is done elsewhere in core) and utilize `wp_print_inline_script_tag()`/`wp_get_inline_script_tag()` to construct out the script. This simplifies the logic and allows the running of src without `SCRIPT_DEBUG` enabled.
* For the embed code that users are provided to copy for embedding outside of WP, add the `secret` on the `blockquote` and `iframe`. This ensures the `blockquote` will be hidden when the `iframe` loads. The embed code in question is accessed here via `get_post_embed_html()`.

Props westonruter, swissspidy, pento, flixos90, ocean90.
Fixes #44632, #44306.


git-svn-id: https://develop.svn.wordpress.org/trunk@52132 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-11 02:47:10 +00:00
David Baumwald
1e785fa0c3 Taxonomy: Document that the get_terms filter can have null for $taxonomies.
The `get_terms` filter currently documents that the filter passes an array as both the first and second parameters, which is normally true, except that the second can be `null` when not specified.  This change updates the filter's docblock to indicate that the second parameter can also be of a `null` type.

Props dd32, audrasjb, mukesh27.
Fixes #54222.

git-svn-id: https://develop.svn.wordpress.org/trunk@52131 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 21:09:30 +00:00
Aaron Jorbin
4160c23106 Build/Test: Change default GitHub branch to trunk
See: https://make.wordpress.org/core/2021/11/10/default-git-branch-for-wordpress-wordpress-develop/
See: https://make.wordpress.org/core/2020/06/18/proposal-update-all-git-repositories-to-use-main-instead-of-master/

Fixes #54399



git-svn-id: https://develop.svn.wordpress.org/trunk@52130 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 20:58:15 +00:00
Jonathan Desrosiers
40799ba11f Tests: Update qUnit test fixtures after [52128].
See #54336.

git-svn-id: https://develop.svn.wordpress.org/trunk@52129 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 20:26:14 +00:00
Jonathan Desrosiers
e1ac6c3fba General: Minor fixes to Global Style related code.
Follow up to [52041,52049-52052,52054,52106,52108-52110].

Props swisspidy, TobiasBg, spacedmonkey, kebbet, oandregal.
See #54336.

git-svn-id: https://develop.svn.wordpress.org/trunk@52128 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 19:54:51 +00:00
John Blackbourn
f60e4ba84f Docs: Add missing documentation for the $javascript parameter of the wp_inline_script_attributes filter.
See #53399


git-svn-id: https://develop.svn.wordpress.org/trunk@52127 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 18:39:40 +00:00
Sergey Biryukov
c3b6a5f44c Docs: List the expected return type first in a few functions:
* `get_previous_post()`
* `get_next_post()`
* `get_adjacent_post()`.

Follow-up to [46696], [47060], [49929], [49963], [51286].

See #53399.

git-svn-id: https://develop.svn.wordpress.org/trunk@52111 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 15:30:31 +00:00
Jonathan Desrosiers
c59c7dd5f9 Docs: Avoid using “CPT” instead of “custom post type”.
Additionally, when referring to built in Core post types, “custom” is unnecessary.

This also adds a period to the end of the `wp_global_styles` post type description.

Follow up to [38829], [51003], [52041], [52049], [52062].

See #53399, #54335, #54336.

git-svn-id: https://develop.svn.wordpress.org/trunk@52110 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 14:16:03 +00:00
Jonathan Desrosiers
663666d6a4 i18n: Add missing translation wrapper for the Global Styles post type description.
Follow up to [52041].

See #54336.

git-svn-id: https://develop.svn.wordpress.org/trunk@52109 602fd350-edb4-49c9-b593-d223f7449a82
2021-11-10 14:05:29 +00:00