HEX
Server: nginx/1.22.0
System: Linux iZ2ze74yt1daio6akmwwd9Z 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1000)
PHP: 7.4.30
Disabled: passthru,exec,system,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/doba123.com/wp-content/plugins/advanced-custom-fields/includes/acf-user-functions.php
<?php 

/**
 * acf_get_users
 *
 * Similar to the get_users() function but with extra functionality.
 *
 * @date	9/1/19
 * @since	5.7.10
 *
 * @param	array $args The query args.
 * @return	array
 */
function acf_get_users( $args = array() ) {
	
	// Get users.
	$users = get_users( $args );
	
	// Maintain order.
	if( $users && $args['include'] ) {
		
		// Generate order array.
		$order = array();
		foreach( $users as $i => $user ) {
			$order[ $i ] = array_search($user->ID, $args['include']);
		}
		
		// Sort results.
		array_multisort($order, $users);	
	}
	
	// Return
	return $users;
}

/**
 * acf_get_user_result
 *
 * Returns a result containing "id" and "text" for the given user.
 *
 * @date	21/5/19
 * @since	5.8.1
 *
 * @param	WP_User $user The user object.
 * @return	array
 */
function acf_get_user_result( $user ) {
	
	// Vars.
	$id = $user->ID;
	$text = $user->user_login;
	
	// Add name.
	if( $user->first_name && $user->last_name ) {
		$text .= " ({$user->first_name} {$user->last_name})";
	} elseif( $user->last_name ) {
		$text .= " ({$user->first_name})";
	}
	return compact('id', 'text');
}


/**
 * acf_get_user_role_labels
 *
 * Returns an array of user roles in the format "name => label".
 *
 * @date	20/5/19
 * @since	5.8.1
 *
 * @param	array $roles A specific array of roles.
 * @return	array
 */
function acf_get_user_role_labels( $roles = array() ) {
	
	// Load all roles if none provided.
	if( !$roles ) {
		$roles = get_editable_roles();
	}
	
	// Loop over roles and populare labels.
	$lables = array();
	foreach( $roles as $role ) {
		$lables[ $role ] = translate_user_role( $role );
	}
	
	// Return labels.
	return $lables;
}

/**
 * acf_allow_unfiltered_html
 *
 * Returns true if the current user is allowed to save unfiltered HTML.
 *
 * @date	9/1/19
 * @since	5.7.10
 *
 * @param	void
 * @return	bool
 */
function acf_allow_unfiltered_html() {
	
	// Check capability.
	$allow_unfiltered_html = current_user_can('unfiltered_html');
	
	/**
	 * Filters whether the current user is allowed to save unfiltered HTML.
	 *
	 * @date	9/1/19
	 * @since	5.7.10
	 *
	 * @param	bool allow_unfiltered_html The result.
	 */
	return apply_filters( 'acf/allow_unfiltered_html', $allow_unfiltered_html );
}