pre_user_nicename

pre_user_nicename

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('pre_user_nicename') is found 1 times:

  • /wp-includes/user.php line 2215
    	 * @since 2.0.3
    	 *
    	 * @param string $user_nicename The user's nicename.
    	 */
    	$user_nicename = apply_filters( 'pre_user_nicename', $user_nicename );
    
    	if ( mb_strlen( $user_nicename ) > 50 ) {
    		return new WP_Error( 'user_nicename_too_long', __( 'Nicename may not be longer than 50 characters.' ) );
    	}
    
    	$user_nicename_check = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->users WHERE user_nicename = %s AND user_login != %s LIMIT 1", $user_nicename, $user_login ) );