Function:

mp_core_link_to_menu_editor()

Purpose:

This function shows, if no menu is set up, a link to “Appearance” > “Menus” so the user can manage their menus.

Overview:

This is used as a fall back for the wp_nav_menu function in WordPress. To make it fall back use it in the ‘fallback_cb’ array paramater for the wp_nav_menu function.

Usage:

wp_nav_menu( array( 'theme_location' => 'primary', 'fallback_cb' => 'mp_core_link_to_menu_editor' ) );

Returns:

(string)

A string containing a link to the “Appearance” > “Menus” page in the user’s WordPress.