PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 1.1.6
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v1.1.6
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
content-control / classes / Roles.php

Roles.php in Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More 1.1.6, at classes/Roles.php

34 lines 461 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 namespace JP\CC;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10
11 class Roles {
12 /**
13 * Returns a list of valid user roles.
14 *
15 * @return array|mixed|void
16 */
17 public static function allowed_user_roles() {
18 global $wp_roles;
19
20 static $roles;
21
22 if ( ! isset( $roles ) ) {
23 $roles = apply_filters( 'jp_cc_user_roles', $wp_roles->role_names );
24
25 if ( ! is_array( $roles ) || empty( $roles ) ) {
26 $roles = array();
27 }
28 }
29
30 return $roles;
31 }
32
33 }
34