Commit Graph

7 Commits

Author SHA1 Message Date
Sergey Biryukov e5490118af Coding Standards: Include one space after `function` keyword for closures.
Note: This is enforced by WPCS 3.0.0.

Reference: [https://github.com/WordPress/WordPress-Coding-Standards/pull/2328 WPCS: PR #2328 Core: properly check formatting of function declaration statements].

Props jrf.
See #59161, #58831.
Built from https://develop.svn.wordpress.org/trunk@56559


git-svn-id: http://core.svn.wordpress.org/trunk@56071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-09-12 15:23:18 +00:00
hellofromTonya 87aa505a94 Editor: Fix error handling of converting classic to block menus.
Fixes the error handling for when `WP_Classic_To_Block_Menu_Converter::convert()` returns an instance of `WP_Error`. `WP_Navigation_Fallback::create_classic_menu_fallback()` now checks for `is_wp_error()` and if `true`, returns the error. And the `@return` type is updated to `string|WP_Error`.

Also includes a fix in the return type in `WP_Classic_To_Block_Menu_Converter::convert()` to return an empty string instead of an array instead, i.e. when bailing out for no menu items returned by `wp_get_nav_menu_items()`. The return type is clearly documented as a `string`.

Follow-up to [56052].

Props dlh, get_dave, antonvlasenko, hellofromTonya.
Fixes #58823.
Built from https://develop.svn.wordpress.org/trunk@56422


git-svn-id: http://core.svn.wordpress.org/trunk@55934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-21 17:51:19 +00:00
John Blackbourn 4667b9323f Docs: Miscellaneous docblock corrections and improvements.
See #58833

Built from https://develop.svn.wordpress.org/trunk@56414


git-svn-id: http://core.svn.wordpress.org/trunk@55926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-08-18 17:29:20 +00:00
audrasjb 26395d827e Docs: Various docblocks corrections.
See #57840.



Built from https://develop.svn.wordpress.org/trunk@56257


git-svn-id: http://core.svn.wordpress.org/trunk@55769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-18 07:37:21 +00:00
audrasjb 114ab18d18 Docs: Fix various incorrect `@since` mentions.
Props costdev, mukesh27.
Fixes #58834.
See #57840.



Built from https://develop.svn.wordpress.org/trunk@56256


git-svn-id: http://core.svn.wordpress.org/trunk@55768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-18 07:30:23 +00:00
isabel_brison b9dadf31a1 Editor: opt out of Navigation fallback.
Allows developers to opt out of the auto-creation of the Navigation fallback through a filter.

Props get_dave, spacedmonkey, ramonopoly.
Fixes #58750.

Built from https://develop.svn.wordpress.org/trunk@56202


git-svn-id: http://core.svn.wordpress.org/trunk@55714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-07-11 05:41:23 +00:00
isabel_brison 161b471f0b Editor: add navigation fallback.
Creates a fallback menu for the Navigation block including an API endpoint to retrieve it.

Props get_dave, spacedmonkey, kebbet, flixos90, mikeschroder, ramonopoly, audrasjb.
Fixes 58557.

Built from https://develop.svn.wordpress.org/trunk@56052


git-svn-id: http://core.svn.wordpress.org/trunk@55564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-06-27 05:54:19 +00:00