编辑:user-suggest.js
/** * Suggests users in a multisite environment. * * For input fields where the admin can select a user based on email or * username, this script shows an autocompletion menu for these inputs. Should * only be used in a multisite environment. Only users in the currently active * site are shown. * * @since 3.4.0 * @output wp-admin/js/user-suggest.js */ /* global ajaxurl, current_site_id, isRtl */ (function( $ ) { var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : ''; $( function() { var position = { offset: '0, -1' }; if ( typeof isRtl !== 'undefined' && isRtl ) { position.my = 'right top'; position.at = 'right bottom'; } /** * Adds an autocomplete function to input fields marked with the class * 'wp-suggest-user'. * * A minimum of two characters is required to trigger the suggestions. The * autocompletion menu is shown at the left bottom of the input field. On * RTL installations, it is shown at the right top. Adds the class 'open' to * the input field when the autocompletion menu is shown. * * Does a backend call to retrieve the users. * * Optional data-attributes: * - data-autocomplete-type (add, search) * The action that is going to be performed: search for existing users * or add a new one. Default: add * - data-autocomplete-field (user_login, user_email) * The field that is returned as the value for the suggestion. * Default: user_login * * @see wp-admin/includes/admin-actions.php:wp_ajax_autocomplete_user() */ $( '.wp-suggest-user' ).each( function(){ var $this = $( this ), autocompleteType = ( typeof $this.data( 'autocompleteType' ) !== 'undefined' ) ? $this.data( 'autocompleteType' ) : 'add', autocompleteField = ( typeof $this.data( 'autocompleteField' ) !== 'undefined' ) ? $this.data( 'autocompleteField' ) : 'user_login'; $this.autocomplete({ source: ajaxurl + '?action=autocomplete-user&autocomplete_type=' + autocompleteType + '&autocomplete_field=' + autocompleteField + id, delay: 500, minLength: 2, position: position, open: function() { $( this ).addClass( 'open' ); }, close: function() { $( this ).removeClass( 'open' ); } }); }); }); })( jQuery );
保存文件
位置:
home
/
londongranite
/
public_html
/
wp-admin
/
js
批量上传
创建
创建
批量权限
批量删除
名称
权限
大小
修改时间
操作
↑ 返回上级
-
-
-
-
polym
drwxr-xr-x
-
2026-08-13 06:44
权限
删除
重命名
widgets
drwxr-xr-x
-
2024-10-28 16:19
权限
删除
重命名
accordion.js
-rw-r--r--
2.86 KB
2024-10-13 23:09
编辑
下载
权限
删除
重命名
accordion.min.js
-rw-r--r--
758 B
2024-10-13 23:09
编辑
下载
权限
删除
重命名
application-passwords.min.js
-rw-r--r--
2.95 KB
2023-09-18 02:51
编辑
下载
权限
删除
重命名
color-picker.js
-rw-r--r--
9.54 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
color-picker.min.js
-rw-r--r--
3.4 KB
2022-04-09 00:07
编辑
下载
权限
删除
重命名
customize-nav-menus.js
-rw-r--r--
111.46 KB
2026-03-15 20:43
编辑
下载
权限
删除
重命名
customize-nav-menus.min.js
-rw-r--r--
47.14 KB
2026-03-15 20:43
编辑
下载
权限
删除
重命名
dashboard.min.js
-rw-r--r--
8.65 KB
2026-03-15 20:43
编辑
下载
权限
删除
重命名
editor-expand.min.js
-rw-r--r--
13.14 KB
2024-06-27 16:55
编辑
下载
权限
删除
重命名
inline-edit-post.js
-rw-r--r--
20.2 KB
2026-08-06 19:42
编辑
下载
权限
删除
重命名
inline-edit-post.min.js
-rw-r--r--
9.37 KB
2026-08-06 19:42
编辑
下载
权限
删除
重命名
inline-edit-tax.js
-rw-r--r--
7.61 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
inline-edit-tax.min.js
-rw-r--r--
2.93 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
language-chooser.js
-rw-r--r--
890 B
2021-02-24 00:45
编辑
下载
权限
删除
重命名
language-chooser.min.js
-rw-r--r--
423 B
2021-02-24 00:45
编辑
下载
权限
删除
重命名
link.min.js
-rw-r--r--
2.26 KB
2026-05-21 23:23
编辑
下载
权限
删除
重命名
media-upload.js
-rw-r--r--
3.38 KB
2021-01-22 17:32
编辑
下载
权限
删除
重命名
media.min.js
-rw-r--r--
2.38 KB
2024-10-07 06:49
编辑
下载
权限
删除
重命名
password-strength-meter.js
-rw-r--r--
4.14 KB
2021-01-22 17:32
编辑
下载
权限
删除
重命名
password-strength-meter.min.js
-rw-r--r--
1.1 KB
2021-01-22 17:32
编辑
下载
权限
删除
重命名
privacy-tools.js
-rw-r--r--
10.67 KB
2024-06-21 22:17
编辑
下载
权限
删除
重命名
privacy-tools.min.js
-rw-r--r--
5.03 KB
2024-06-21 22:17
编辑
下载
权限
删除
重命名
set-post-thumbnail.js
-rw-r--r--
876 B
2020-07-07 22:55
编辑
下载
权限
删除
重命名
set-post-thumbnail.min.js
-rw-r--r--
620 B
2020-07-07 22:55
编辑
下载
权限
删除
重命名
svg-painter.js
-rw-r--r--
3.2 KB
2024-09-08 02:44
编辑
下载
权限
删除
重命名
tags-box.js
-rw-r--r--
10.88 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
tags-box.min.js
-rw-r--r--
3 KB
2023-02-02 21:36
编辑
下载
权限
删除
重命名
tags-suggest.js
-rw-r--r--
5.64 KB
2024-02-19 03:16
编辑
下载
权限
删除
重命名
tags-suggest.min.js
-rw-r--r--
2.22 KB
2024-02-19 03:16
编辑
下载
权限
删除
重命名
tags.js
-rw-r--r--
5.96 KB
2026-03-15 20:43
编辑
下载
权限
删除
重命名
tags.min.js
-rw-r--r--
2.41 KB
2026-03-15 20:43
编辑
下载
权限
删除
重命名
theme-plugin-editor.js
-rw-r--r--
25.56 KB
2026-05-21 23:23
编辑
下载
权限
删除
重命名
theme-plugin-editor.min.js
-rw-r--r--
11.82 KB
2026-05-21 23:23
编辑
下载
权限
删除
重命名
user-suggest.js
-rw-r--r--
2.25 KB
2021-03-18 23:01
编辑
下载
权限
删除
重命名
user-suggest.min.js
-rw-r--r--
676 B
2021-03-18 23:01
编辑
下载
权限
删除
重命名
word-count.min.js
-rw-r--r--
1.49 KB
2023-02-02 21:36
编辑
下载
权限
删除
重命名
xfn.js
-rw-r--r--
740 B
2021-03-18 23:01
编辑
下载
权限
删除
重命名