( ! empty( $site_id ) ) {
$this->site_id = absint( $site_id );
} else {
$this->site_id = get_current_blog_id();
}
$this->role_key = $wpdb->get_blog_prefix( $this->site_id ) . 'user_roles';
if ( ! empty( $this->roles ) && ! $this->use_db ) {
return;
}
$this->roles = $this->get_roles_data();
$this->init_roles();
}
/**
* Gets the ID of the site for which roles are currently initialized.
*
* @since 4.9.0
*
* @return int Site ID.
*/
public function get_site_id() {
return $this->site_id;
}
/**
* Gets the available roles data.
*
* @since 4.9.0
*
* @global array $wp_user_roles Used to set the 'roles' property value.
*
* @return array Roles array.
*/
protected function get_roles_data() {
global $wp_user_roles;
if ( ! empty( $wp_user_roles ) ) {
return $wp_user_roles;
}
if ( is_multisite() && get_current_blog_id() !== $this->site_id ) {
remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 );
$roles = get_blog_option( $this->site_id, $this->role_key, array() );
add_action( 'switch_blog', 'wp_switch_roles_and_user', 1, 2 );
return $roles;
}
return get_option( $this->role_key, array() );
}
}
Fatal error: require_once(): Failed opening required '/home/he2a35ddd308f/public_html/wp-includes/blocks/social-link.php' (include_path='.:/opt/alt/php74/usr/share/pear') in /home/he2a35ddd308f/public_html/wp-includes/blocks/require-dynamic-blocks.php on line 73
Fatal error: Uncaught Error: Call to a member function set() on null in /home/he2a35ddd308f/public_html/wp-includes/l10n.php:857
Stack trace:
#0 /home/he2a35ddd308f/public_html/wp-includes/l10n.php(960): load_textdomain('default', '/home/he2a35ddd...', 'lv')
#1 /home/he2a35ddd308f/public_html/wp-includes/class-wp-fatal-error-handler.php(49): load_default_textdomain()
#2 [internal function]: WP_Fatal_Error_Handler->handle()
#3 {main}
thrown in /home/he2a35ddd308f/public_html/wp-includes/l10n.php on line 857