Ticket #55071: 55071.3.diff
File 55071.3.diff, 4.0 KB (added by , 3 years ago) |
---|
-
src/wp-includes/user.php
diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 81944eda0e..6b8a17ca40 100644
a b function delete_user_option( $user_id, $option_name, $global = false ) { 757 757 */ 758 758 function get_users( $args = array() ) { 759 759 760 $args = wp_parse_args( $args ); 760 /** 761 * Filters the users. 762 * 763 * @since 5.9 764 * 765 * @param array $args Arguments to retrieve users. See WP_User_Query::prepare_query() 766 * for more information on accepted arguments. 767 */ 768 769 $args = apply_filters('get_users', wp_parse_args( $args )); 761 770 $args['count_total'] = false; 762 771 763 772 $user_search = new WP_User_Query( $args ); … … function get_users( $args = array() ) { 770 779 * 771 780 * @since 5.9.0 772 781 * 773 * @param string|array $args { 774 * Optional. Array or string of default arguments. 775 * 776 * @type string $orderby How to sort the users. Accepts 'nicename', 'email', 'url', 'registered', 777 * 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name', 778 * 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'. 779 * @type string $order Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'. 780 * @type int $number Maximum users to return or display. Default empty (all users). 781 * @type bool $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false. 782 * @type bool $show_fullname Whether to show the user's full name. Default false. 783 * @type string $feed If not empty, show a link to the user's feed and use this text as the alt 784 * parameter of the link. Default empty. 785 * @type string $feed_image If not empty, show a link to the user's feed and use this image URL as 786 * clickable anchor. Default empty. 787 * @type string $feed_type The feed type to link to, such as 'rss2'. Defaults to default feed type. 788 * @type bool $echo Whether to output the result or instead return it. Default true. 789 * @type string $style If 'list', each user is wrapped in an `<li>` element, otherwise the users 790 * will be separated by commas. 791 * @type bool $html Whether to list the items in HTML form or plaintext. Default true. 792 * @type string $exclude An array, comma-, or space-separated list of user IDs to exclude. Default empty. 793 * @type string $include An array, comma-, or space-separated list of user IDs to include. Default empty. 794 * } 782 * @param array $args Optional. Arguments to retrieve users. See WP_User_Query::prepare_query() 783 * for more information on accepted arguments. 795 784 * @return string|null The output if echo is false. Otherwise null. 796 785 */ 797 786 function wp_list_users( $args = array() ) { … … function wp_list_users( $args = array() ) { 813 802 814 803 $args = wp_parse_args( $args, $defaults ); 815 804 805 /** 806 * Filters the WP users list. 807 * 808 * @since 5.9 809 * 810 * @param array $args Allows to modify default arguments. 811 */ 812 $args = apply_filters( 'wp_list_users', $args ); 813 816 814 $return = ''; 817 815 818 816 $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number', 'exclude', 'include' ) ); … … function wp_list_users( $args = array() ) { 827 825 } 828 826 829 827 if ( $args['show_fullname'] && '' !== $user->first_name && '' !== $user->last_name ) { 830 $name = "$user->first_name $user->last_name"; 828 $full_name = "$user->first_name $user->last_name"; 829 830 /** 831 * Allows to modify user full name. 832 * 833 * @since 5.9 834 * 835 * @param string $full_name Full Name of the user default is "$user->first_name $user->last_name" 836 * @param object $user User data in object format 837 */ 838 839 $name = apply_filters( 'wp_list_users_fullname', $full_name, $user); 831 840 } else { 832 841 $name = $user->display_name; 833 842 }