$widgets ) { if ( ! empty( $widgets ) && 'wp_inactive_widgets' != $widget_area ) { foreach ( $widgets as $position => $widget_id ) { $options = Widget::get_options( $widget_id ); // If not accessible then exclude this item. $exclude = ! Is::accessible( $options['which_users'], $options['roles'], 'widget' ); $exclude = apply_filters( 'jp_cc_should_exclude_widget', $exclude, $options, $widget_id ); // unset non-visible item if ( $exclude ) { unset( $widget_areas[ $widget_area ][ $position ] ); } } } } return $widget_areas; } }