run:R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:52
R W Run
DIR
2026-03-11 16:18:51
R W Run
DIR
2026-03-11 16:18:51
R W Run
23.8 KB
2026-03-11 16:18:51
R W Run
7.8 KB
2026-03-11 16:18:52
R W Run
36.1 KB
2026-03-11 16:18:51
R W Run
11.9 KB
2026-03-11 16:18:52
R W Run
18.94 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:52
R W Run
28.6 KB
2026-03-11 16:18:51
R W Run
316 By
2026-03-11 16:18:51
R W Run
12.9 KB
2026-03-11 16:18:51
R W Run
61.02 KB
2026-03-11 16:18:52
R W Run
15 KB
2026-03-11 16:18:51
R W Run
112.05 KB
2026-03-11 16:18:51
R W Run
12.47 KB
2026-03-11 16:18:51
R W Run
15.07 KB
2026-03-11 16:18:52
R W Run
9.84 KB
2026-03-11 16:18:52
R W Run
13.17 KB
2026-03-11 16:18:52
R W Run
33.83 KB
2026-03-11 16:18:51
R W Run
42.63 KB
2026-03-11 16:18:51
R W Run
55.71 KB
2026-03-11 16:18:52
R W Run
12.53 KB
2026-03-11 16:18:51
R W Run
2.55 KB
2026-03-11 16:18:52
R W Run
28.92 KB
2026-03-11 16:18:52
R W Run
539 By
2026-03-11 16:18:51
R W Run
367 By
2026-03-11 16:18:52
R W Run
42.65 KB
2026-03-11 16:18:51
R W Run
401 By
2026-03-11 16:18:51
R W Run
6.61 KB
2026-03-11 16:18:51
R W Run
664 By
2026-03-11 16:18:52
R W Run
20.63 KB
2026-03-11 16:18:51
R W Run
2.18 KB
2026-03-11 16:18:52
R W Run
453 By
2026-03-11 16:18:52
R W Run
457 By
2026-03-11 16:18:51
R W Run
36.83 KB
2026-03-11 16:18:52
R W Run
2.41 KB
2026-03-11 16:18:52
R W Run
8.28 KB
2026-03-11 16:18:51
R W Run
13.89 KB
2026-03-11 16:18:51
R W Run
11.76 KB
2026-03-11 16:18:51
R W Run
2.65 KB
2026-03-11 16:18:51
R W Run
7.43 KB
2026-03-11 16:18:51
R W Run
17.46 KB
2026-03-11 16:18:51
R W Run
5.14 KB
2026-03-11 16:18:52
R W Run
16.7 KB
2026-03-11 16:18:51
R W Run
8.28 KB
2026-03-11 16:18:52
R W Run
2.92 KB
2026-03-11 16:18:52
R W Run
1.32 KB
2026-03-11 16:18:51
R W Run
4.6 KB
2026-03-11 16:18:52
R W Run
11.62 KB
2026-03-11 16:18:52
R W Run
2.5 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
11.25 KB
2026-03-11 16:18:52
R W Run
5.32 KB
2026-03-11 16:18:51
R W Run
10.99 KB
2026-03-11 16:18:52
R W Run
68.32 KB
2026-03-11 16:18:51
R W Run
6.34 KB
2026-03-11 16:18:51
R W Run
5.49 KB
2026-03-11 16:18:51
R W Run
1.99 KB
2026-03-11 16:18:52
R W Run
7.02 KB
2026-03-11 16:18:51
R W Run
4.91 KB
2026-03-11 16:18:52
R W Run
16.86 KB
2026-03-11 16:18:51
R W Run
24.23 KB
2026-03-11 16:18:51
R W Run
3.97 KB
2026-03-11 16:18:51
R W Run
47.66 KB
2026-03-11 16:18:51
R W Run
9.22 KB
2026-03-11 16:18:51
R W Run
25.51 KB
2026-03-11 16:18:51
R W Run
198.38 KB
2026-03-11 16:18:52
R W Run
56.65 KB
2026-03-11 16:18:51
R W Run
10.46 KB
2026-03-11 16:18:51
R W Run
10.95 KB
2026-03-11 16:18:52
R W Run
29.26 KB
2026-03-11 16:18:51
R W Run
70.91 KB
2026-03-11 16:18:52
R W Run
35.3 KB
2026-03-11 16:18:52
R W Run
16.61 KB
2026-03-11 16:18:52
R W Run
2.57 KB
2026-03-11 16:18:52
R W Run
39.83 KB
2026-03-11 16:18:51
R W Run
70.64 KB
2026-03-11 16:18:51
R W Run
15.56 KB
2026-03-11 16:18:52
R W Run
7.33 KB
2026-03-11 16:18:52
R W Run
253 By
2026-03-11 16:18:51
R W Run
7.96 KB
2026-03-11 16:18:52
R W Run
3.23 KB
2026-03-11 16:18:52
R W Run
969 By
2026-03-11 16:18:52
R W Run
16.28 KB
2026-03-11 16:18:51
R W Run
7.22 KB
2026-03-11 16:18:51
R W Run
12.95 KB
2026-03-11 16:18:51
R W Run
6.53 KB
2026-03-11 16:18:51
R W Run
3.42 KB
2026-03-11 16:18:52
R W Run
5.84 KB
2026-03-11 16:18:51
R W Run
1.97 KB
2026-03-11 16:18:51
R W Run
4.3 KB
2026-03-11 16:18:52
R W Run
2.91 KB
2026-03-11 16:18:51
R W Run
16.46 KB
2026-03-11 16:18:52
R W Run
40.6 KB
2026-03-11 16:18:51
R W Run
20.22 KB
2026-03-11 16:18:51
R W Run
36.11 KB
2026-03-11 16:18:52
R W Run
17.01 KB
2026-03-11 16:18:51
R W Run
7.27 KB
2026-03-11 16:18:52
R W Run
6.62 KB
2026-03-11 16:18:52
R W Run
16.49 KB
2026-03-11 16:18:52
R W Run
1.79 KB
2026-03-11 16:18:52
R W Run
29.82 KB
2026-03-11 16:18:51
R W Run
6.67 KB
2026-03-11 16:18:52
R W Run
8.98 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:51
R W Run
12.01 KB
2026-03-11 16:18:51
R W Run
17.11 KB
2026-03-11 16:18:51
R W Run
6.74 KB
2026-03-11 16:18:52
R W Run
30.93 KB
2026-03-11 16:18:51
R W Run
4.99 KB
2026-03-11 16:18:51
R W Run
4.25 KB
2026-03-11 16:18:51
R W Run
24.72 KB
2026-03-11 16:18:51
R W Run
29.96 KB
2026-03-11 16:18:52
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
160 KB
2026-03-11 16:18:51
R W Run
6.72 KB
2026-03-11 16:18:52
R W Run
10.92 KB
2026-03-11 16:18:51
R W Run
4.77 KB
2026-03-11 16:18:51
R W Run
3.38 KB
2026-03-11 16:18:51
R W Run
11.18 KB
2026-03-11 16:18:51
R W Run
62.19 KB
2026-03-11 16:18:51
R W Run
2.46 KB
2026-03-11 16:18:51
R W Run
9.17 KB
2026-03-11 16:18:51
R W Run
32.15 KB
2026-03-11 16:18:51
R W Run
34.05 KB
2026-03-11 16:18:52
R W Run
7.15 KB
2026-03-11 16:18:51
R W Run
3.47 KB
2026-03-11 16:18:52
R W Run
1.87 KB
2026-03-11 16:18:52
R W Run
30.91 KB
2026-03-11 16:18:51
R W Run
7.29 KB
2026-03-11 16:18:52
R W Run
7.35 KB
2026-03-11 16:18:51
R W Run
12.54 KB
2026-03-11 16:18:51
R W Run
19.12 KB
2026-03-11 16:18:51
R W Run
18.12 KB
2026-03-11 16:18:52
R W Run
39.99 KB
2026-03-11 16:18:52
R W Run
5.17 KB
2026-03-11 16:18:52
R W Run
979 By
2026-03-11 16:18:51
R W Run
18.44 KB
2026-03-11 16:18:52
R W Run
10.24 KB
2026-03-11 16:18:51
R W Run
1.77 KB
2026-03-11 16:18:52
R W Run
34.9 KB
2026-03-11 16:18:51
R W Run
7.19 KB
2026-03-11 16:18:52
R W Run
160.5 KB
2026-03-11 16:18:51
R W Run
64.27 KB
2026-03-11 16:18:51
R W Run
27.95 KB
2026-03-11 16:18:51
R W Run
4.69 KB
2026-03-11 16:18:51
R W Run
2.94 KB
2026-03-11 16:18:51
R W Run
43.13 KB
2026-03-11 16:18:52
R W Run
2.25 KB
2026-03-11 16:18:52
R W Run
22.5 KB
2026-03-11 16:18:51
R W Run
13.01 KB
2026-03-11 16:18:52
R W Run
3.27 KB
2026-03-11 16:18:51
R W Run
18 KB
2026-03-11 16:18:51
R W Run
210.4 KB
2026-03-11 16:18:52
R W Run
25.86 KB
2026-03-11 16:18:52
R W Run
115.85 KB
2026-03-11 16:18:51
R W Run
373 By
2026-03-11 16:18:52
R W Run
343 By
2026-03-11 16:18:52
R W Run
338 By
2026-03-11 16:18:51
R W Run
100.73 KB
2026-03-11 16:18:52
R W Run
130.93 KB
2026-03-11 16:18:51
R W Run
19.1 KB
2026-03-11 16:18:51
R W Run
17.41 KB
2026-03-11 16:18:52
R W Run
41.98 KB
2026-03-11 16:18:52
R W Run
400 By
2026-03-11 16:18:52
R W Run
11.1 KB
2026-03-11 16:18:52
R W Run
37.02 KB
2026-03-11 16:18:51
R W Run
2.24 KB
2026-03-11 16:18:51
R W Run
188.13 KB
2026-03-11 16:18:51
R W Run
338 By
2026-03-11 16:18:51
R W Run
38 KB
2026-03-11 16:18:51
R W Run
4.02 KB
2026-03-11 16:18:52
R W Run
5.38 KB
2026-03-11 16:18:51
R W Run
3.05 KB
2026-03-11 16:18:52
R W Run
2.61 KB
2026-03-11 16:18:51
R W Run
1.16 KB
2026-03-11 16:18:52
R W Run
4.04 KB
2026-03-11 16:18:51
R W Run
3.71 KB
2026-03-11 16:18:51
R W Run
24.6 KB
2026-03-11 16:18:51
R W Run
9.56 KB
2026-03-11 16:18:51
R W Run
346.43 KB
2026-03-11 16:18:52
R W Run
281.84 KB
2026-03-11 16:18:52
R W Run
14.95 KB
2026-03-11 16:18:51
R W Run
8.44 KB
2026-03-11 16:18:52
R W Run
168.95 KB
2026-03-11 16:18:52
R W Run
20.71 KB
2026-03-11 16:18:52
R W Run
25.27 KB
2026-03-11 16:18:51
R W Run
5.72 KB
2026-03-11 16:18:51
R W Run
4.63 KB
2026-03-11 16:18:52
R W Run
81.73 KB
2026-03-11 16:18:51
R W Run
67.18 KB
2026-03-11 16:18:51
R W Run
156.36 KB
2026-03-11 16:18:52
R W Run
55.19 KB
2026-03-11 16:18:51
R W Run
162 By
2026-03-11 16:18:51
R W Run
61.72 KB
2026-03-11 16:18:51
R W Run
216.06 KB
2026-03-11 16:18:52
R W Run
65.09 KB
2026-03-11 16:18:51
R W Run
25.24 KB
2026-03-11 16:18:52
R W Run
4.81 KB
2026-03-11 16:18:51
R W Run
6.48 KB
2026-03-11 16:18:52
R W Run
21.25 KB
2026-03-11 16:18:51
R W Run
2.79 KB
2026-03-11 16:18:52
R W Run
89.69 KB
2026-03-11 16:18:52
R W Run
19.42 KB
2026-03-11 16:18:52
R W Run
3.69 KB
2026-03-11 16:18:52
R W Run
4.11 KB
2026-03-11 16:18:51
R W Run
40.74 KB
2026-03-11 16:18:51
R W Run
25.38 KB
2026-03-11 16:18:51
R W Run
43.31 KB
2026-03-11 16:18:52
R W Run
102.57 KB
2026-03-11 16:18:52
R W Run
6.18 KB
2026-03-11 16:18:51
R W Run
124.47 KB
2026-03-11 16:18:52
R W Run
35.65 KB
2026-03-11 16:18:52
R W Run
6.94 KB
2026-03-11 16:18:52
R W Run
67.04 KB
2026-03-11 16:18:52
R W Run
10.62 KB
2026-03-11 16:18:51
R W Run
289.35 KB
2026-03-11 16:18:52
R W Run
36.23 KB
2026-03-11 16:18:51
R W Run
200 By
2026-03-11 16:18:52
R W Run
200 By
2026-03-11 16:18:52
R W Run
98.29 KB
2026-03-11 16:18:52
R W Run
30.02 KB
2026-03-11 16:18:52
R W Run
19.03 KB
2026-03-11 16:18:52
R W Run
5.06 KB
2026-03-11 16:18:52
R W Run
255 By
2026-03-11 16:18:51
R W Run
22.66 KB
2026-03-11 16:18:52
R W Run
154.63 KB
2026-03-11 16:18:51
R W Run
9.68 KB
2026-03-11 16:18:51
R W Run
258 By
2026-03-11 16:18:51
R W Run
23.49 KB
2026-03-11 16:18:51
R W Run
3.16 KB
2026-03-11 16:18:51
R W Run
8.4 KB
2026-03-11 16:18:52
R W Run
441 By
2026-03-11 16:18:51
R W Run
7.39 KB
2026-03-11 16:18:51
R W Run
173 KB
2026-03-11 16:18:52
R W Run
544 By
2026-03-11 16:18:52
R W Run
4.17 KB
2026-03-11 16:18:51
R W Run
35.97 KB
2026-03-11 16:18:52
R W Run
1.69 KB
2026-03-11 16:18:51
R W Run
2.84 KB
2026-03-11 16:18:52
R W Run
6.09 KB
2026-03-11 16:18:51
R W Run
8.71 KB
2026-03-11 16:18:51
R W Run
131.84 KB
2026-03-11 16:18:51
R W Run
37.45 KB
2026-03-11 16:18:51
R W Run
173.89 KB
2026-03-11 16:18:51
R W Run
7.09 KB
2026-03-11 16:18:51
R W Run
6.41 KB
2026-03-11 16:18:51
R W Run
1.08 KB
2026-03-11 16:18:51
R W Run
69.46 KB
2026-03-11 16:18:52
R W Run
445 By
2026-03-11 16:18:51
R W Run
799 By
2026-03-11 16:18:52
R W Run
error_log
📄class-wp-roles.php
1<?php
2/**
3 * User API: WP_Roles class
4 *
5 * @package WordPress
6 * @subpackage Users
7 * @since 4.4.0
8 */
9
10/**
11 * Core class used to implement a user roles API.
12 *
13 * The role option is simple, the structure is organized by role name that store
14 * the name in value of the 'name' key. The capabilities are stored as an array
15 * in the value of the 'capability' key.
16 *
17 * array (
18 * 'rolename' => array (
19 * 'name' => 'rolename',
20 * 'capabilities' => array()
21 * )
22 * )
23 *
24 * @since 2.0.0
25 */
26#[AllowDynamicProperties]
27class WP_Roles {
28 /**
29 * List of roles and capabilities.
30 *
31 * @since 2.0.0
32 * @var array[]
33 */
34 public $roles;
35
36 /**
37 * List of the role objects.
38 *
39 * @since 2.0.0
40 * @var WP_Role[]
41 */
42 public $role_objects = array();
43
44 /**
45 * List of role names.
46 *
47 * @since 2.0.0
48 * @var string[]
49 */
50 public $role_names = array();
51
52 /**
53 * Option name for storing role list.
54 *
55 * @since 2.0.0
56 * @var string
57 */
58 public $role_key;
59
60 /**
61 * Whether to use the database for retrieval and storage.
62 *
63 * @since 2.1.0
64 * @var bool
65 */
66 public $use_db = true;
67
68 /**
69 * The site ID the roles are initialized for.
70 *
71 * @since 4.9.0
72 * @var int
73 */
74 protected $site_id = 0;
75
76 /**
77 * Constructor.
78 *
79 * @since 2.0.0
80 * @since 4.9.0 The `$site_id` argument was added.
81 *
82 * @global array $wp_user_roles Used to set the 'roles' property value.
83 *
84 * @param int $site_id Site ID to initialize roles for. Default is the current site.
85 */
86 public function __construct( $site_id = null ) {
87 global $wp_user_roles;
88
89 $this->use_db = empty( $wp_user_roles );
90
91 $this->for_site( $site_id );
92 }
93
94 /**
95 * Makes private/protected methods readable for backward compatibility.
96 *
97 * @since 4.0.0
98 *
99 * @param string $name Method to call.
100 * @param array $arguments Arguments to pass when calling.
101 * @return mixed|false Return value of the callback, false otherwise.
102 */
103 public function __call( $name, $arguments ) {
104 if ( '_init' === $name ) {
105 return $this->_init( ...$arguments );
106 }
107 return false;
108 }
109
110 /**
111 * Sets up the object properties.
112 *
113 * The role key is set to the current prefix for the $wpdb object with
114 * 'user_roles' appended. If the $wp_user_roles global is set, then it will
115 * be used and the role option will not be updated or used.
116 *
117 * @since 2.1.0
118 * @deprecated 4.9.0 Use WP_Roles::for_site()
119 */
120 protected function _init() {
121 _deprecated_function( __METHOD__, '4.9.0', 'WP_Roles::for_site()' );
122
123 $this->for_site();
124 }
125
126 /**
127 * Reinitializes the object.
128 *
129 * Recreates the role objects. This is typically called only by switch_to_blog()
130 * after switching wpdb to a new site ID.
131 *
132 * @since 3.5.0
133 * @deprecated 4.7.0 Use WP_Roles::for_site()
134 */
135 public function reinit() {
136 _deprecated_function( __METHOD__, '4.7.0', 'WP_Roles::for_site()' );
137
138 $this->for_site();
139 }
140
141 /**
142 * Adds a role name with capabilities to the list.
143 *
144 * Updates the list of roles, if the role doesn't already exist.
145 *
146 * The list of capabilities can be passed either as a numerically indexed array of capability names, or an
147 * associative array of boolean values keyed by the capability name. To explicitly deny the role a capability, set
148 * the value for that capability to false.
149 *
150 * Examples:
151 *
152 * // Add a role that can edit posts.
153 * wp_roles()->add_role( 'custom_role', 'Custom Role', array(
154 * 'read',
155 * 'edit_posts',
156 * ) );
157 *
158 * Or, using an associative array:
159 *
160 * // Add a role that can edit posts but explicitly cannot not delete them.
161 * wp_roles()->add_role( 'custom_role', 'Custom Role', array(
162 * 'read' => true,
163 * 'edit_posts' => true,
164 * 'delete_posts' => false,
165 * ) );
166 *
167 * @since 2.0.0
168 * @since 6.9.0 Support was added for a numerically indexed array of strings for the capabilities array.
169 *
170 * @param string $role Role name.
171 * @param string $display_name Role display name.
172 * @param array<string,bool>|array<int,string> $capabilities Capabilities to be added to the role.
173 * Default empty array.
174 * @return WP_Role|void WP_Role object, if the role is added.
175 */
176 public function add_role( $role, $display_name, $capabilities = array() ) {
177 if ( empty( $role ) || isset( $this->roles[ $role ] ) ) {
178 return;
179 }
180
181 if ( wp_is_numeric_array( $capabilities ) ) {
182 $capabilities = array_fill_keys( $capabilities, true );
183 }
184
185 $this->roles[ $role ] = array(
186 'name' => $display_name,
187 'capabilities' => $capabilities,
188 );
189 if ( $this->use_db ) {
190 update_option( $this->role_key, $this->roles, true );
191 }
192 $this->role_objects[ $role ] = new WP_Role( $role, $capabilities );
193 $this->role_names[ $role ] = $display_name;
194 return $this->role_objects[ $role ];
195 }
196
197 /**
198 * Removes a role by name.
199 *
200 * @since 2.0.0
201 *
202 * @param string $role Role name.
203 */
204 public function remove_role( $role ) {
205 if ( ! isset( $this->role_objects[ $role ] ) ) {
206 return;
207 }
208
209 unset( $this->role_objects[ $role ] );
210 unset( $this->role_names[ $role ] );
211 unset( $this->roles[ $role ] );
212
213 if ( $this->use_db ) {
214 update_option( $this->role_key, $this->roles );
215 }
216
217 if ( get_option( 'default_role' ) === $role ) {
218 update_option( 'default_role', 'subscriber' );
219 }
220 }
221
222 /**
223 * Adds a capability to role.
224 *
225 * @since 2.0.0
226 *
227 * @param string $role Role name.
228 * @param string $cap Capability name.
229 * @param bool $grant Optional. Whether role is capable of performing capability.
230 * Default true.
231 */
232 public function add_cap( $role, $cap, $grant = true ) {
233 if ( ! isset( $this->roles[ $role ] ) ) {
234 return;
235 }
236
237 $this->roles[ $role ]['capabilities'][ $cap ] = $grant;
238 if ( $this->use_db ) {
239 update_option( $this->role_key, $this->roles );
240 }
241 }
242
243 /**
244 * Removes a capability from role.
245 *
246 * @since 2.0.0
247 *
248 * @param string $role Role name.
249 * @param string $cap Capability name.
250 */
251 public function remove_cap( $role, $cap ) {
252 if ( ! isset( $this->roles[ $role ] ) ) {
253 return;
254 }
255
256 unset( $this->roles[ $role ]['capabilities'][ $cap ] );
257 if ( $this->use_db ) {
258 update_option( $this->role_key, $this->roles );
259 }
260 }
261
262 /**
263 * Retrieves a role object by name.
264 *
265 * @since 2.0.0
266 *
267 * @param string $role Role name.
268 * @return WP_Role|null WP_Role object if found, null if the role does not exist.
269 */
270 public function get_role( $role ) {
271 if ( isset( $this->role_objects[ $role ] ) ) {
272 return $this->role_objects[ $role ];
273 } else {
274 return null;
275 }
276 }
277
278 /**
279 * Retrieves a list of role names.
280 *
281 * @since 2.0.0
282 *
283 * @return string[] List of role names.
284 */
285 public function get_names() {
286 return $this->role_names;
287 }
288
289 /**
290 * Determines whether a role name is currently in the list of available roles.
291 *
292 * @since 2.0.0
293 *
294 * @param string $role Role name to look up.
295 * @return bool
296 */
297 public function is_role( $role ) {
298 return isset( $this->role_names[ $role ] );
299 }
300
301 /**
302 * Initializes all of the available roles.
303 *
304 * @since 4.9.0
305 */
306 public function init_roles() {
307 if ( empty( $this->roles ) ) {
308 return;
309 }
310
311 $this->role_objects = array();
312 $this->role_names = array();
313 foreach ( array_keys( $this->roles ) as $role ) {
314 $this->role_objects[ $role ] = new WP_Role( $role, $this->roles[ $role ]['capabilities'] );
315 $this->role_names[ $role ] = $this->roles[ $role ]['name'];
316 }
317
318 /**
319 * Fires after the roles have been initialized, allowing plugins to add their own roles.
320 *
321 * @since 4.7.0
322 *
323 * @param WP_Roles $wp_roles A reference to the WP_Roles object.
324 */
325 do_action( 'wp_roles_init', $this );
326 }
327
328 /**
329 * Sets the site to operate on. Defaults to the current site.
330 *
331 * @since 4.9.0
332 *
333 * @global wpdb $wpdb WordPress database abstraction object.
334 *
335 * @param int $site_id Site ID to initialize roles for. Default is the current site.
336 */
337 public function for_site( $site_id = null ) {
338 global $wpdb;
339
340 if ( ! empty( $site_id ) ) {
341 $this->site_id = absint( $site_id );
342 } else {
343 $this->site_id = get_current_blog_id();
344 }
345
346 $this->role_key = $wpdb->get_blog_prefix( $this->site_id ) . 'user_roles';
347
348 if ( ! empty( $this->roles ) && ! $this->use_db ) {
349 return;
350 }
351
352 $this->roles = $this->get_roles_data();
353
354 $this->init_roles();
355 }
356
357 /**
358 * Gets the ID of the site for which roles are currently initialized.
359 *
360 * @since 4.9.0
361 *
362 * @return int Site ID.
363 */
364 public function get_site_id() {
365 return $this->site_id;
366 }
367
368 /**
369 * Gets the available roles data.
370 *
371 * @since 4.9.0
372 *
373 * @global array $wp_user_roles Used to set the 'roles' property value.
374 *
375 * @return array Roles array.
376 */
377 protected function get_roles_data() {
378 global $wp_user_roles;
379
380 if ( ! empty( $wp_user_roles ) ) {
381 return $wp_user_roles;
382 }
383
384 if ( is_multisite() && get_current_blog_id() !== $this->site_id ) {
385 remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 );
386
387 $roles = get_blog_option( $this->site_id, $this->role_key, array() );
388
389 add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );
390
391 return $roles;
392 }
393
394 return get_option( $this->role_key, array() );
395 }
396}
397
Ui Ux Design – Teachers Night Out https://cardgames4educators.com Wed, 16 Oct 2024 22:24:18 +0000 en-US hourly 1 https://wordpress.org/?v=6.9.4 https://cardgames4educators.com/wp-content/uploads/2024/06/cropped-Card-4-Educators-logo-32x32.png Ui Ux Design – Teachers Night Out https://cardgames4educators.com 32 32 Masters In English How English Speaker https://cardgames4educators.com/masters-in-english-how-english-speaker/ https://cardgames4educators.com/masters-in-english-how-english-speaker/#comments Mon, 27 May 2024 08:54:45 +0000 https://themexriver.com/wp/kadu/?p=1

Erat himenaeos neque id sagittis massa. Hac suscipit pulvinar dignissim platea magnis eu. Don tellus a pharetra inceptos efficitur dui pulvinar. Feugiat facilisis penatibus pulvinar nunc dictumst donec odio platea habitasse. Lacus porta dolor purus elit ante bibendum tortor netus taciti nullam cubilia. Erat per suspendisse placerat morbi egestas pulvinar bibendum sollicitudin nec. Euismod cubilia eleifend velit himenaeos sodales lectus. Leo maximus cras ac porttitor aliquam torquent pulvinar odio volutpat parturient. Quisque risus finibus suspendisse mus purus magnis facilisi condimentum consectetur dui. Curae elit suspendisse cursus vehicula.

Turpis taciti class non vel pretium quis pulvinar tempor lobortis nunc. Libero phasellus parturient sapien volutpat malesuada ornare. Cubilia dignissim sollicitudin rhoncus lacinia maximus. Cras lorem fermentum bibendum pellentesque nisl etiam ligula enim cubilia. Vulputate pede sapien torquent montes tempus malesuada in mattis dis turpis vitae. Porta est tempor ex eget feugiat vulputate ipsum. Justo nec iaculis habitant diam arcu fermentum.

We offer comprehen sive emplo ment services such as assistance wit employer compliance.Our company is your strategic HR partner as instead of HR. john smithson

Cubilia dignissim sollicitudin rhoncus lacinia maximus. Cras lorem fermentum bibendum pellentesque nisl etiam ligula enim cubilia. Vulputate pede sapien torquent montes tempus malesuada in mattis dis turpis vitae.

Exploring Learning Landscapes in Academic

Feugiat facilisis penatibus pulvinar nunc dictumst donec odio platea habitasse. Lacus porta dolor purus elit ante bibendum tortor netus taciti nullam cubilia. Erat per suspendisse placerat morbi egestas pulvinar bibendum sollicitudin nec. Euismod cubilia eleifend velit himenaeos sodales lectus. Leo maximus cras ac porttitor aliquam torquent.

]]>
https://cardgames4educators.com/masters-in-english-how-english-speaker/feed/ 1