Make WordPress Core

Ticket #40678: 40678_addtomenu_hints.diff

File 40678_addtomenu_hints.diff, 2.6 KB (added by audrasjb, 7 years ago)

Adds hints to "Add to Menu" buttons - 2nd attempt

  • src/wp-admin/includes/nav-menu.php

    diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
    index 5b8bfd7..d1f773a 100644
    a b function wp_nav_menu_item_link_meta_box() { 
    300300
    301301                <p class="button-controls wp-clearfix">
    302302                        <span class="add-to-menu">
    303                                 <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-custom-menu-item" id="submit-customlinkdiv" />
     303                                <button type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" name="add-custom-menu-item" id="submit-customlinkdiv">
     304                                        <?php esc_attr_e( 'Add to Menu' ); ?><span class="screen-reader-text"> - <?php esc_attr_e( 'Activate "save menu" button to save your changes' ); ?></span>
     305                                </button>
    304306                                <span class="spinner"></span>
    305307                        </span>
    306308                </p>
    function wp_nav_menu_item_post_type_meta_box( $object, $box ) { 
    631633                        </span>
    632634
    633635                        <span class="add-to-menu">
    634                                 <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>" />
     636                                <button type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" name="add-post-type-menu-item" id="<?php echo esc_attr( 'submit-posttype-' . $post_type_name ); ?>">
     637                                        <?php esc_attr_e( 'Add to Menu' ); ?><span class="screen-reader-text"> - <?php esc_attr_e( 'Activate "save menu" button to save your changes' ); ?></span>
     638                                </button>
    635639                                <span class="spinner"></span>
    636640                        </span>
    637641                </p>
    function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) { 
    876880                        </span>
    877881
    878882                        <span class="add-to-menu">
    879                                 <input type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" value="<?php esc_attr_e( 'Add to Menu' ); ?>" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>" />
     883                                <button type="submit"<?php wp_nav_menu_disabled_check( $nav_menu_selected_id ); ?> class="button submit-add-to-menu right" name="add-taxonomy-menu-item" id="<?php echo esc_attr( 'submit-taxonomy-' . $taxonomy_name ); ?>">
     884                                        <?php esc_attr_e( 'Add to Menu' ); ?><span class="screen-reader-text"> - <?php esc_attr_e( 'Activate "save menu" button to save your changes' ); ?></span>
     885                                </button>
    880886                                <span class="spinner"></span>
    881887                        </span>
    882888                </p>