Server IP : 172.67.216.182 / Your IP : 172.71.124.155 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,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 MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/lapma.in/wp-content/plugins/advanced-custom-fields/includes/ |
Upload File : |
<?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->first_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() ) { $all_roles = wp_roles()->get_names(); // Load all roles if none provided. if ( empty( $roles ) ) { $roles = array_keys( $all_roles ); } // Loop over roles and populare labels. $lables = array(); foreach ( $roles as $role ) { if ( isset( $all_roles[ $role ] ) ) { $lables[ $role ] = translate_user_role( $all_roles[ $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 boolean */ 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 ); }