b0y-101 Mini Shell


Current Path : E:/www2/tcas/wp-content/themes/businesszen/inc/
File Upload :
Current File : E:/www2/tcas/wp-content/themes/businesszen/inc/options.php

<?php
/**
 * Theme Palace options
 *
 * @package Theme Palace
 * @subpackage Businesszen
 * @since Businesszen 1.0.0
 */

/**
 * List of pages for page choices.
 * @return Array Array of page ids and name.
 */
function businesszen_page_choices() {
    $pages = get_pages();
    $choices = array();
    $choices[0] = esc_html__( '--Select--', 'businesszen' );
    foreach ( $pages as $page ) {
        $choices[ $page->ID ] = $page->post_title;
    }
    return  $choices;
}

/**
 * List of posts for post choices.
 * @return Array Array of post ids and name.
 */
function businesszen_post_choices() {
    $posts = get_posts( array( 'numberposts' => -1 ) );
    $choices = array();
    $choices[0] = esc_html__( '--Select--', 'businesszen' );
    foreach ( $posts as $post ) {
        $choices[ $post->ID ] = $post->post_title;
    }
    return  $choices;
}

/**
 * List of events for post choices.
 * @return Array Array of post ids and name.
 */
function businesszen_event_choices() {
    $posts = get_posts( array( 'numberposts' => -1, 'post_type' => 'tp-event' ) );
    $choices = array();
    $choices[0] = esc_html__( '--Select--', 'businesszen' );
    foreach ( $posts as $post ) {
        $choices[ $post->ID ] = $post->post_title;
    }
    return  $choices;
}

/**
 * List of trips for post choices.
 * @return Array Array of post ids and name.
 */
function businesszen_trip_choices() {
    $posts = get_posts( array( 'post_type' => 'itineraries', 'numberposts' => -1 ) );
    $choices = array();
    $choices[0] = esc_html__( '--Select--', 'businesszen' );
    foreach ( $posts as $post ) {
        $choices[ $post->ID ] = $post->post_title;
    }
    return  $choices;
}

function businesszenduct_choices() {
    $full_product_list = array();
    $product_id = array();
    $loop = new WP_Query(array('post_type' => array('product', 'product_variation'), 'posts_per_page' => -1));
    while ($loop->have_posts()) : $loop->the_post();
        $product_id[] = get_the_id();
    endwhile;
    wp_reset_postdata();
    $choices = array();
    $choices[0] = esc_html__( '--Select--', 'businesszen' );
    foreach ( $product_id  as $id ) {
        $choices[ $id ] = get_the_title( $id );
    }
    return  $choices;
}



if ( ! function_exists( 'businesszen_selected_sidebar' ) ) :
    /**
     * Sidebars options
     * @return array Sidbar positions
     */
    function businesszen_selected_sidebar() {
        $businesszen_selected_sidebar = array(
            'sidebar-1'             => esc_html__( 'Default Sidebar', 'businesszen' ),
            'optional-sidebar'      => esc_html__( 'Optional Sidebar 1', 'businesszen' ),
            'optional-sidebar-2'    => esc_html__( 'Optional Sidebar 2', 'businesszen' ),
            'optional-sidebar-3'    => esc_html__( 'Optional Sidebar 3', 'businesszen' ),
            'optional-sidebar-4'    => esc_html__( 'Optional Sidebar 4', 'businesszen' ),
        );

        $output = apply_filters( 'businesszen_selected_sidebar', $businesszen_selected_sidebar );

        return $output;
    }
endif;

if ( ! function_exists( 'businesszen_site_layout' ) ) :
    /**
     * Site Layout
     * @return array site layout options
     */
    function businesszen_site_layout() {
        $businesszen_site_layout = array(
            'wide-layout'  => get_template_directory_uri() . '/assets/images/full.png',
            'boxed-layout' => get_template_directory_uri() . '/assets/images/boxed.png',
        );

        $output = apply_filters( 'businesszen_site_layout', $businesszen_site_layout );
        return $output;
    }
endif;


if ( ! function_exists( 'businesszen_global_sidebar_position' ) ) :
    /**
     * Global Sidebar position
     * @return array Global Sidebar positions
     */
    function businesszen_global_sidebar_position() {
        $businesszen_global_sidebar_position = array(
            'right-sidebar' => get_template_directory_uri() . '/assets/images/right.png',
            'no-sidebar'    => get_template_directory_uri() . '/assets/images/full.png',
        );

        $output = apply_filters( 'businesszen_global_sidebar_position', $businesszen_global_sidebar_position );

        return $output;
    }
endif;


if ( ! function_exists( 'businesszen_sidebar_position' ) ) :
    /**
     * Sidebar position
     * @return array Sidbar positions
     */
    function businesszen_sidebar_position() {
        $businesszen_sidebar_position = array(
            'right-sidebar' => get_template_directory_uri() . '/assets/images/right.png',
            'no-sidebar'    => get_template_directory_uri() . '/assets/images/full.png',
        );

        $output = apply_filters( 'businesszen_sidebar_position', $businesszen_sidebar_position );

        return $output;
    }
endif;


if ( ! function_exists( 'businesszen_pagination_options' ) ) :
    /**
     * Pagination
     * @return array site pagination options
     */
    function businesszen_pagination_options() {
        $businesszen_pagination_options = array(
            'numeric'   => esc_html__( 'Numeric', 'businesszen' ),
            'default'   => esc_html__( 'Default(Older/Newer)', 'businesszen' ),
        );

        $output = apply_filters( 'businesszen_pagination_options', $businesszen_pagination_options );

        return $output;
    }
endif;

if ( ! function_exists( 'businesszen_get_spinner_list' ) ) :
    /**
     * List of spinner icons options.
     * @return array List of all spinner icon options.
     */
    function businesszen_get_spinner_list() {
        $arr = array(
            'default'               => esc_html__( 'Default', 'businesszen' ),
            'spinner-wheel'         => esc_html__( 'Wheel', 'businesszen' ),
            'spinner-double-circle' => esc_html__( 'Double Circle', 'businesszen' ),
            'spinner-two-way'       => esc_html__( 'Two Way', 'businesszen' ),
            'spinner-umbrella'      => esc_html__( 'Umbrella', 'businesszen' ),
            'spinner-dots'          => esc_html__( 'Dots', 'businesszen' ),
            'spinner-one-way'       => esc_html__( 'One Way', 'businesszen' ),
            'spinner-fidget'        => esc_html__( 'Fidget', 'businesszen' ),
        );
        return apply_filters( 'businesszen_spinner_list', $arr );
    }
endif;

if ( ! function_exists( 'businesszen_switch_options' ) ) :
    /**
     * List of custom Switch Control options
     * @return array List of switch control options.
     */
    function businesszen_switch_options() {
        $arr = array(
            'on'        => esc_html__( 'Enable', 'businesszen' ),
            'off'       => esc_html__( 'Disable', 'businesszen' )
        );
        return apply_filters( 'businesszen_switch_options', $arr );
    }
endif;

if ( ! function_exists( 'businesszen_hide_options' ) ) :
    /**
     * List of custom Switch Control options
     * @return array List of switch control options.
     */
    function businesszen_hide_options() {
        $arr = array(
            'on'        => esc_html__( 'Yes', 'businesszen' ),
            'off'       => esc_html__( 'No', 'businesszen' )
        );
        return apply_filters( 'businesszen_hide_options', $arr );
    }
endif;

if ( ! function_exists( 'businesszen_heading_tags' ) ) :
    /**
     * Destination Options
     * @return array site gallery options
     */
    function businesszen_heading_tags() {
        
        $businesszen_heading_tags = array(
			'h1'	=> esc_html__('H1', 'businesszen'),
			'h2'	=> esc_html__('H2', 'businesszen'),
			'h3'	=> esc_html__('H3', 'businesszen'),
			'h4'	=> esc_html__('H4', 'businesszen'),
			'h5'	=> esc_html__('H5', 'businesszen'),
			'h6'	=> esc_html__('H6', 'businesszen'),
			'p'		=> esc_html__('Paragraph', 'businesszen'),
		);

        $output = apply_filters( 'businesszen_heading_tags', $businesszen_heading_tags );


        return $output;
    }
endif;

Copyright © 2019 by b0y-101