WordPress.org

Make WordPress Core

Ticket #40442: enhancement-40442.1.diff

File enhancement-40442.1.diff, 5.0 KB (added by ajayghaghretiya1, 3 years ago)
  • src/wp-admin/nav-menus.php

     
    514514wp_initial_nav_menu_meta_boxes();
    515515
    516516if ( ! current_theme_supports( 'menus' ) && ! $num_locations )
    517         $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( 'Your theme does not natively support menus, but you can use them in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%s">Widgets</a> screen.' ), admin_url( 'widgets.php' ) ) . '</p></div>';
     517        $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( 'Your theme does not natively support menus, but you can use them in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%s">Widgets</a> screen.' ), admin_url( 'widgets.php' ) ) . '</p></div>';
    518518
    519519if ( ! $locations_screen ) : // Main tab
    520         $overview  = '<p>' . __( 'This screen is used for managing your custom navigation menus.' ) . '</p>';
     520        $overview  = '<p>' . __( 'This screen is used for managing your navigation menus.' ) . '</p>';
    521521        /* translators: 1: Widgets admin screen URL, 2 and 3: The name of the default themes */
    522         $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Custom Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the custom menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Sixteen', 'Twenty Seventeen' ) . '</p>';
     522        $overview .= '<p>' . sprintf( __( 'Menus can be displayed in locations defined by your theme, even used in sidebars by adding a &#8220;Navigation Menu&#8221; widget on the <a href="%1$s">Widgets</a> screen. If your theme does not support the Navigation menus feature (the default themes, %2$s and %3$s, do), you can learn about adding this support by following the Documentation link to the side.' ), admin_url( 'widgets.php' ), 'Twenty Sixteen', 'Twenty Seventeen' ) . '</p>';
    523523        $overview .= '<p>' . __( 'From this screen you can:' ) . '</p>';
    524524        $overview .= '<ul><li>' . __( 'Create, edit, and delete menus' ) . '</li>';
    525525        $overview .= '<li>' . __( 'Add, organize, and modify individual menu items' ) . '</li></ul>';
  • src/wp-includes/widgets/class-wp-nav-menu-widget.php

     
    88 */
    99
    1010/**
    11  * Core class used to implement the Custom Menu widget.
     11 * Core class used to implement the Navigation Menu widget.
    1212 *
    1313 * @since 3.0.0
    1414 *
     
    1717class WP_Nav_Menu_Widget extends WP_Widget {
    1818
    1919        /**
    20          * Sets up a new Custom Menu widget instance.
     20         * Sets up a new Navigation Menu widget instance.
    2121         *
    2222         * @since 3.0.0
    2323         * @access public
    2424         */
    2525        public function __construct() {
    2626                $widget_ops = array(
    27                         'description' => __( 'Add a custom menu to your sidebar.' ),
     27                        'description' => __( 'Add a Navigation menu to your sidebar.' ),
    2828                        'customize_selective_refresh' => true,
    2929                );
    30                 parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops );
     30                parent::__construct( 'nav_menu', __('Navigation Menu'), $widget_ops );
    3131        }
    3232
    3333        /**
    34          * Outputs the content for the current Custom Menu widget instance.
     34         * Outputs the content for the current Navigation Menu widget instance.
    3535         *
    3636         * @since 3.0.0
    3737         * @access public
    3838         *
    3939         * @param array $args     Display arguments including 'before_title', 'after_title',
    4040         *                        'before_widget', and 'after_widget'.
    41          * @param array $instance Settings for the current Custom Menu widget instance.
     41         * @param array $instance Settings for the current Navigation Menu widget instance.
    4242         */
    4343        public function widget( $args, $instance ) {
    4444                // Get menu
     
    6161                );
    6262
    6363                /**
    64                  * Filters the arguments for the Custom Menu widget.
     64                 * Filters the arguments for the Navigation Menu widget.
    6565                 *
    6666                 * @since 4.2.0
    6767                 * @since 4.4.0 Added the `$instance` parameter.
    6868                 *
    6969                 * @param array    $nav_menu_args {
    70                  *     An array of arguments passed to wp_nav_menu() to retrieve a custom menu.
     70                 *     An array of arguments passed to wp_nav_menu() to retrieve a Navigation menu.
    7171                 *
    7272                 *     @type callable|bool $fallback_cb Callback to fire if the menu doesn't exist. Default empty.
    7373                 *     @type mixed         $menu        Menu ID, slug, or name.
     
    8282        }
    8383
    8484        /**
    85          * Handles updating settings for the current Custom Menu widget instance.
     85         * Handles updating settings for the current Navigation Menu widget instance.
    8686         *
    8787         * @since 3.0.0
    8888         * @access public
     
    104104        }
    105105
    106106        /**
    107          * Outputs the settings form for the Custom Menu widget.
     107         * Outputs the settings form for the Navigation Menu widget.
    108108         *
    109109         * @since 3.0.0
    110110         * @access public