rebase code on oct-10-2023

This commit is contained in:
Rachit Bhargava
2023-10-10 17:51:46 -04:00
parent b16ad94b69
commit 8f1a2c3a66
2197 changed files with 184921 additions and 35568 deletions

View File

@@ -20,9 +20,7 @@ class WP_Classic_To_Block_Menu_Converter {
* @since 6.3.0
*
* @param WP_Term $menu The Menu term object of the menu to convert.
* @return string|WP_Error The serialized and normalized parsed blocks on success,
* an empty string when there are no menus to convert,
* or WP_Error on invalid menu.
* @return string the serialized and normalized parsed blocks.
*/
public static function convert( $menu ) {
@@ -36,7 +34,7 @@ class WP_Classic_To_Block_Menu_Converter {
$menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'update_post_term_cache' => false ) );
if ( empty( $menu_items ) ) {
return '';
return array();
}
// Set up the $menu_item variables.