mirror of
https://github.com/WordPress/WordPress.git
synced 2024-08-24 23:03:06 +02:00
* Removes all instances of site-search, so away it goes. Sidesteps a number of bugs with site-search. * Renames user-search to user-suggest, which means it better describes the current behavior (autocompletion) while allowing for future behavior (instant search). * Ties user suggestions to a single .wp-suggest-user class. with help from markjaquith, helenyhou, wonderboymusic. fixes #20835. git-svn-id: http://core.svn.wordpress.org/trunk@21003 1a063a9b-81f0-0310-95a4-ce76da25c4cd
13 lines
566 B
JavaScript
13 lines
566 B
JavaScript
(function($) {
|
|
var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : '';
|
|
$(document).ready( function() {
|
|
$( '.wp-suggest-user' ).autocomplete({
|
|
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
|
|
delay: 500,
|
|
minLength: 2,
|
|
position: ( 'undefined' !== typeof isRtl && isRtl ) ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' },
|
|
open: function() { $(this).addClass('open'); },
|
|
close: function() { $(this).removeClass('open'); }
|
|
});
|
|
});
|
|
})(jQuery); |