roles ) ) { return true; } return false; } function get_condition(){ // always show for in customize preview mode if ( is_customize_preview() ){ return true; } $rule = [ 'condition' => get_option( 'wpbottommenu_condition', 'entire' ), 'archives_condition' => get_option( 'wpbottommenu_archives_condition', 'all' ), 'singular_condition' => get_option( 'wpbottommenu_singular_condition', 'all' ), 'woocommerce_condition' => get_option( 'wpbottommenu_woocommerce_condition', 'all' ), 'singular_page_condition' => get_option( 'wpbottommenu_singular_page_condition', 'all' ), 'singular_post_condition' => get_option( 'wpbottommenu_singular_post_condition', 'all' ), 'singular_product_condition' => get_option( 'wpbottommenu_singular_product_condition', 'all' ), ]; $roles = get_option( 'wpbottommenu_user_role_condition', array( 'all' ) ); if ( $this->wpbm_condition_render( $rule ) ){ if ( $this->wpbm_user_role_condition( $roles ) ){ return $this->wpbm_user_role_condition( $roles ); } } } }