Skip to content

Commit

Permalink
Admin class constructor updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Feb 22, 2021
1 parent 4d1ad3f commit 3ed5b58
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 44 deletions.
5 changes: 4 additions & 1 deletion classes/class-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ public function __construct( $plugin ) {
add_filter( 'role_has_cap', array( $this, 'filter_role_caps' ), 10, 3 );

if ( is_multisite() && $plugin->is_network_activated() && ! is_network_admin() ) {
$options = (array) get_site_option( 'wp_stream_network', array() );
$options = (array) get_site_option(
'wp_stream_network',
did_action( 'init' ) ? $this->plugin->settings->get_defaults() : array()
);
$option = isset( $options['general_site_access'] ) ? absint( $options['general_site_access'] ) : 1;

$this->disable_access = ( $option ) ? false : true;
Expand Down
93 changes: 50 additions & 43 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3ed5b58

Please sign in to comment.