WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/24/2012 04:54:58 AM (9 years ago)
Author:
markjaquith
Message:

Autocomplete site names in Network Admin. More user completion areas. props Japh, DrewAPicture. see #19810.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/dashboard.php

    r20272 r20279  
    417417        $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>';
    418418
     419    if ( is_multisite()
     420        && current_user_can( 'promote_users' )
     421        && ! wp_is_large_network( 'users' )
     422        && is_super_admin()
     423        && is_network_admin()
     424    ) {
     425        wp_enqueue_script( 'user-search' );
     426    }
     427    if ( is_multisite()
     428        && current_user_can( 'manage_sites' )
     429        && ! wp_is_large_network( 'sites' )
     430        && is_super_admin()
     431        && is_network_admin()
     432    ) {
     433        wp_enqueue_script( 'site-search' );
     434    }
     435
    419436    $c_users = get_user_count();
    420437    $c_blogs = get_blog_count();
     
    441458    <form name="searchform" action="<?php echo network_admin_url('users.php'); ?>" method="get">
    442459        <p>
    443             <input type="search" name="s" value="" size="17" />
     460            <input type="search" name="s" value="" size="17" id="all-user-search-input" />
    444461            <?php submit_button( __( 'Search Users' ), 'button', 'submit', false, array( 'id' => 'submit_users' ) ); ?>
    445462        </p>
     
    448465    <form name="searchform" action="<?php echo network_admin_url('sites.php'); ?>" method="get">
    449466        <p>
    450             <input type="search" name="s" value="" size="17" />
     467            <input type="search" name="s" value="" size="17" id="site-search-input" />
    451468            <?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?>
    452469        </p>
Note: See TracChangeset for help on using the changeset viewer.