Make WordPress Core

Ticket #32710: 32710.2.diff

File 32710.2.diff, 1.3 KB (added by paulwilde, 9 years ago)
  • wp-admin/js/customize-nav-menus.js

    diff --git a/wp-admin/js/customize-nav-menus.js b/wp-admin/js/customize-nav-menus.js
    index a973e3e..7c482f1 100644
    a b  
    250250                        });
    251251
    252252                        self.currentRequest.fail(function( data ) {
    253                                 $content.empty().append( $( '<p class="nothing-found"></p>' ).text( data.message ) );
     253                                $content.empty().append( $( '<div class="nothing-found"></div>' ).html( data.message ) );
    254254                                wp.a11y.speak( data.message );
    255255                                self.pages.search = -1;
    256256                        });
  • wp-includes/class-wp-customize-nav-menus.php

    diff --git a/wp-includes/class-wp-customize-nav-menus.php b/wp-includes/class-wp-customize-nav-menus.php
    index 65a4c60..28f2e6a 100644
    a b final class WP_Customize_Nav_Menus { 
    174174                $results = $this->search_available_items_query( array( 'pagenum' => $p, 's' => $s ) );
    175175
    176176                if ( empty( $results ) ) {
    177                         wp_send_json_error( array( 'message' => __( 'No results found.' ) ) );
     177                        wp_send_json_error( array( 'message' => '<p>' . __( 'No results found.' ) . '</p><p>' . __( 'You must create and publish content before you can add it as a menu item. You can also add links to external sites in the Custom Links section below.' ) . '</p>' ) );
    178178                } else {
    179179                        wp_send_json_success( array( 'items' => $results ) );
    180180                }