Commit Graph

4 Commits

Author SHA1 Message Date
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
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
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