Server IP : 104.21.14.103 / Your IP : 18.188.97.200 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/giankuin/dietcontrungnhanh.com/wp-content/themes/flatsome/inc/admin/advanced/functions/ |
Upload File : |
<?php /** * Retrieve a list or WP roles * * @param array|string $args Optional. Array or string of arguments. * * @return array List of roles matching defaults or `$args`. */ function flatsome_get_role_list( $args = '' ) { require_once ABSPATH . 'wp-admin/includes/user.php'; $defaults = [ 'exclude' => array(), ]; $parsed_args = wp_parse_args( $args, $defaults ); $roles = []; $_roles = get_editable_roles(); $_roles = is_multisite() ? array( 'super_admin' => array( 'name' => esc_html__( 'Super Admin', 'flatsome' ) ) ) + $_roles : $_roles; foreach ( $_roles as $_roles_slug => $_roles_data ) { if ( in_array( $_roles_slug, $parsed_args['exclude'], true ) ) { continue; } $roles[ $_roles_slug ] = $_roles_data['name']; } return $roles; }