'include',
'text' => esc_html__( 'Include', 'botiga' ),
);
$settings['types'][] = array(
'id' => 'exclude',
'text' => esc_html__( 'Exclude', 'botiga' ),
);
$settings['display'][] = array(
'id' => 'all',
'text' => esc_html__( 'Entire Site', 'botiga' ),
);
$settings['display'][] = array(
'id' => 'basic',
'text' => esc_html__( 'Basic', 'botiga' ),
'options' => array(
array(
'id' => 'singular',
'text' => esc_html__( 'Singulars', 'botiga' ),
),
array(
'id' => 'archive',
'text' => esc_html__( 'Archives', 'botiga' ),
),
),
);
$settings['display'][] = array(
'id' => 'posts',
'text' => esc_html__( 'Posts', 'botiga' ),
'options' => array(
array(
'id' => 'single-post',
'text' => esc_html__( 'Single Post', 'botiga' ),
),
array(
'id' => 'post-archives',
'text' => esc_html__( 'Post Archives', 'botiga' ),
),
array(
'id' => 'post-categories',
'text' => esc_html__( 'Post Categories', 'botiga' ),
),
array(
'id' => 'post-tags',
'text' => esc_html__( 'Post Tags', 'botiga' ),
),
),
);
$settings['display'][] = array(
'id' => 'pages',
'text' => esc_html__( 'Pages', 'botiga' ),
'options' => array(
array(
'id' => 'single-page',
'text' => esc_html__( 'Single Page', 'botiga' ),
),
),
);
if ( class_exists( 'WooCommerce' ) ) {
$settings['display'][] = array(
'id' => 'woocommerce',
'text' => esc_html__( 'WooCommerce', 'botiga' ),
'options' => array(
array(
'id' => 'single-product',
'text' => esc_html__( 'Single Product', 'botiga' ),
),
array(
'id' => 'product-archives',
'text' => esc_html__( 'Product Archives', 'botiga' ),
),
array(
'id' => 'product-categories',
'text' => esc_html__( 'Product Categories', 'botiga' ),
),
array(
'id' => 'product-tags',
'text' => esc_html__( 'Product Tags', 'botiga' ),
),
array(
'id' => 'product-id',
'text' => esc_html__( 'Product Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'product-category-id',
'text' => esc_html__( 'Product Category Name', 'botiga' ),
'ajax' => true,
),
),
);
}
$settings['display'][] = array(
'id' => 'specifics',
'text' => esc_html__( 'Specific', 'botiga' ),
'options' => array(
array(
'id' => 'post-id',
'text' => esc_html__( 'Post Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'page-id',
'text' => esc_html__( 'Page Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'category-id',
'text' => esc_html__( 'Category Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'tag-id',
'text' => esc_html__( 'Tag Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'author-id',
'text' => esc_html__( 'Author Name', 'botiga' ),
'ajax' => true,
),
),
);
$available_post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' );
$available_post_types = array_diff( array_keys( $available_post_types ), array( 'post', 'page', 'product' ) );
if ( ! empty( $available_post_types ) ) {
$settings['display'][] = array(
'id' => 'cpt',
'text' => esc_html__( 'Custom Post Types', 'botiga' ),
'options' => array(
array(
'id' => 'cpt-post-id',
'text' => esc_html__( 'CPT: Post Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'cpt-term-id',
'text' => esc_html__( 'CPT: Term Name', 'botiga' ),
'ajax' => true,
),
array(
'id' => 'cpt-taxonomy-id',
'text' => esc_html__( 'CPT: Taxonomy Name', 'botiga' ),
'ajax' => true,
),
),
);
}
$settings['display'][] = array(
'id' => 'other',
'text' => esc_html__( 'Other', 'botiga' ),
'options' => array(
array(
'id' => 'front-page',
'text' => esc_html__( 'Front Page', 'botiga' ),
),
array(
'id' => 'blog',
'text' => esc_html__( 'Blog', 'botiga' ),
),
array(
'id' => 'search',
'text' => esc_html__( 'Search', 'botiga' ),
),
array(
'id' => '404',
'text' => esc_html__( '404', 'botiga' ),
),
array(
'id' => 'author',
'text' => esc_html__( 'Author', 'botiga' ),
),
array(
'id' => 'privacy-policy-page',
'text' => esc_html__( 'Privacy Policy Page', 'botiga' ),
),
),
);
$user_roles = array();
$user_rules = get_editable_roles();
if ( ! empty( $user_rules ) ) {
foreach ( $user_rules as $role_id => $role_data ) {
$user_roles[] = array(
'id' => 'user_role_'. $role_id,
'text' => $role_data['name'],
);
}
}
$settings['user'][] = array(
'id' => 'user-auth',
'text' => esc_html__( 'User Auth', 'botiga' ),
'options' => array(
array(
'id' => 'logged-in',
'text' => esc_html__( 'User Logged In', 'botiga' ),
),
array(
'id' => 'logged-out',
'text' => esc_html__( 'User Logged Out', 'botiga' ),
),
),
);
$settings['user'][] = array(
'id' => 'user-roles',
'text' => esc_html__( 'User Roles', 'botiga' ),
'options' => $user_roles,
);
$settings['user'][] = array(
'id' => 'other',
'text' => esc_html__( 'Other', 'botiga' ),
'options' => array(
array(
'id' => 'author',
'text' => esc_html__( 'Author', 'botiga' ),
'ajax' => true,
),
),
);
$settings = apply_filters( 'botiga_display_conditions_script_settings', $settings );
?>