WordPress.org

WordPress build repository browser

Changeset 42536


Ignore:
Timestamp:
02/13/18 15:38:31 (9 days ago)
Author:
atimmer
Message:

Docs: Improve JSDoc for wp-admin/js/user-suggest.js.

Props timhavinga.
Fixes #43270.

Built from https://develop.svn.wordpress.org/trunk@42708

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/user-suggest.js

    r26920 r42536  
    11/* global ajaxurl, current_site_id, isRtl */ 
     2/** 
     3 * Suggests users in a multisite environment. 
     4 * 
     5 * For input fields where the admin can select a user based on email or 
     6 * username, this script shows an autocompletion menu for these inputs. Should 
     7 * only be used in a multisite environment. Only users in the currently active 
     8 * site are shown. 
     9 * 
     10 * @since 3.4.0 
     11 */ 
    212 
    313(function( $ ) { 
     
    919            position.at = 'right bottom'; 
    1020        } 
     21 
     22        /** 
     23         * Adds an autocomplete function to input fields marked with the class 
     24         * 'wp-suggest-user'. 
     25         * 
     26         * A minimum of two characters is required to trigger 
     27         * the suggestions. The autocompletion menu is shown at the left bottom of the input 
     28         * field. On RTL installations, it is shown at the right top. 
     29         * Adds the class 'open' to the input field when the autocompletion menu 
     30         * is shown. 
     31         * 
     32         * Does a backend call to retrieve the users. 
     33         * 
     34         * Optional data-attributes: 
     35         * - data-autocomplete-type (add, search) 
     36         *   The action that is going to be performed: search for existing users 
     37         *   or add a new one. Default: add 
     38         * - data-autocomplete-field (user_login, user_email) 
     39         *   The field that is returned as the value for the suggestion. 
     40         *   Default: user_login 
     41         * 
     42         * @see wp-admin/includes/admin-actions.php:wp_ajax_autocomplete_user() 
     43         */ 
    1144        $( '.wp-suggest-user' ).each( function(){ 
    1245            var $this = $( this ), 
  • trunk/wp-includes/version.php

    r42535 r42536  
    55 * @global string $wp_version 
    66 */ 
    7 $wp_version = '5.0-alpha-42707'; 
     7$wp_version = '5.0-alpha-42708'; 
    88 
    99/** 
Note: See TracChangeset for help on using the changeset viewer.