'ffffff', )); add_image_size( 'adventure-tour-featured-image', 2000, 1200, true ); add_image_size( 'adventure-tour-thumbnail-avatar', 100, 100, true ); $GLOBALS['content_width'] = 525; register_nav_menus( array( 'primary' => __( 'Primary Menu', 'adventure-tour' ), ) ); add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, 'flex-height' => true, ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css' ) ); } add_action( 'after_setup_theme', 'adventure_tour_setup' ); function adventure_tour_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'adventure-tour' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'adventure-tour' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your pages and posts', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar 3', 'adventure-tour' ), 'id' => 'sidebar-3', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'adventure-tour' ), 'id' => 'footer-1', 'description' => __( 'Add widgets here to appear in your footer.', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'adventure-tour' ), 'id' => 'footer-2', 'description' => __( 'Add widgets here to appear in your footer.', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'adventure-tour' ), 'id' => 'footer-3', 'description' => __( 'Add widgets here to appear in your footer.', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'adventure-tour' ), 'id' => 'footer-4', 'description' => __( 'Add widgets here to appear in your footer.', 'adventure-tour' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'adventure_tour_widgets_init' ); function adventure_tour_customize_register() { global $wp_customize; $wp_customize->remove_section( 'adventure_trekking_camp_pro' ); $wp_customize->remove_section( 'adventure_trekking_camp_product_box_section' ); } add_action( 'customize_register', 'adventure_tour_customize_register', 11 ); function adventure_tour_services_sec_dropdown(){ if(get_option('adventure_tour_services_sec_enable') == true ) { return true; } return false; } function adventure_tour_customize( $wp_customize ) { wp_enqueue_style('customizercustom_css', esc_url( get_stylesheet_directory_uri() ). '/assets/css/customizer.css'); require get_theme_file_path( 'inc/custom-control.php' ); $wp_customize->add_section('adventure_tour_pro', array( 'title' => __('UPGRADE ADVENTURE PREMIUM', 'adventure-tour'), 'priority' => 1, )); $wp_customize->add_setting('adventure_tour_pro', array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control(new Adventure_Tour_Pro_Control($wp_customize, 'adventure_tour_pro', array( 'label' => __('ADVENTURE TOUR PREMIUM', 'adventure-tour'), 'section' => 'adventure_tour_pro', 'settings' => 'adventure_tour_pro', 'priority' => 1, ))); // Services Section $wp_customize->add_section( 'adventure_tour_services_section' , array( 'title' => __( 'Services Settings', 'adventure-tour' ), 'priority' => 4, ) ); $wp_customize->add_setting( 'adventure_tour_services_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Adventure_Tour_Customizer_Customcontrol_Section_Heading( $wp_customize, 'adventure_tour_services_heading', array( 'label' => esc_html__( 'Services Settings', 'adventure-tour' ), 'section' => 'adventure_tour_services_section', 'settings' => 'adventure_tour_services_heading', ) ) ); $wp_customize->add_setting( 'adventure_tour_services_sec_enable', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'adventure_trekking_camp_callback_sanitize_switch', ) ); $wp_customize->add_control( new Adventure_Tour_Customizer_Customcontrol_Switch( $wp_customize, 'adventure_tour_services_sec_enable', array( 'settings' => 'adventure_tour_services_sec_enable', 'section' => 'adventure_tour_services_section', 'label' => __( 'Check To show Section', 'adventure-tour' ), 'choices' => array( '1' => __( 'On', 'adventure-tour' ), 'off' => __( 'Off', 'adventure-tour' ), ), 'active_callback' => '', ) ) ); $adventure_tour_args = array('numberposts' => -1); $adventure_tour_post_list = get_posts($adventure_tour_args); $s = 0; $adventure_tour_pst_sls[]= __('Select','adventure-tour'); foreach ($adventure_tour_post_list as $key => $adventure_tour_p_post) { $adventure_tour_pst_sls[$adventure_tour_p_post->ID]=$adventure_tour_p_post->post_title; } for ( $s = 1; $s <= 4; $s++ ) { $wp_customize->add_setting('adventure_tour_mid_section_icon'.$s,array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('adventure_tour_mid_section_icon'.$s,array( 'label' => esc_html__('Icon','adventure-tour'), 'description' => esc_html__('Add the fontawesome class to add icon ex: fas fa-envelope','adventure-tour'), 'section' => 'adventure_tour_services_section', 'setting' => 'adventure_tour_mid_section_icon', 'type' => 'text', 'active_callback' => 'adventure_tour_services_sec_dropdown', )); $wp_customize->add_setting('adventure_tour_services_sec_settigs'.$s,array( 'sanitize_callback' => 'adventure_trekking_camp_sanitize_select', )); $wp_customize->add_control('adventure_tour_services_sec_settigs'.$s,array( 'type' => 'select', 'choices' => $adventure_tour_pst_sls, 'label' => __('Select post','adventure-tour'), 'section' => 'adventure_tour_services_section', 'active_callback' => 'adventure_tour_services_sec_dropdown', )); } wp_reset_postdata(); $wp_customize->add_setting( 'adventure_tour_services_images', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_tour_services_images', array( 'label' => esc_html__('Service Right Image ','adventure-tour'), 'section' => 'adventure_tour_services_section', 'active_callback' => 'adventure_tour_services_sec_dropdown', ) ) ); } add_action( 'customize_register', 'adventure_tour_customize' ); function adventure_tour_enqueue_comments_reply() { if( is_singular() && comments_open() && ( get_option( 'thread_comments' ) == 1) ) { // Load comment-reply.js (into footer) wp_enqueue_script( 'comment-reply', '/wp-includes/js/comment-reply.min.js', array(), false, true ); } } add_action('wp_enqueue_scripts', 'adventure_tour_enqueue_comments_reply'); if ( ! defined( 'ADVENTURE_TOUR_PRO_LINK' ) ) { define('ADVENTURE_TOUR_PRO_LINK',__('https://www.ovationthemes.com/wordpress/adventure-tour-wordpress-theme/','adventure-tour')); } if ( ! defined( 'ADVENTURE_TREKKING_CAMP_SUPPORT' ) ) { define('ADVENTURE_TREKKING_CAMP_SUPPORT',__('https://wordpress.org/support/theme/adventure-tour','adventure-tour')); } if ( ! defined( 'ADVENTURE_TREKKING_CAMP_REVIEW' ) ) { define('ADVENTURE_TREKKING_CAMP_REVIEW',__('https://wordpress.org/support/theme/adventure-tour/reviews/','adventure-tour')); } if ( ! defined( 'ADVENTURE_TREKKING_CAMP_LIVE_DEMO' ) ) { define('ADVENTURE_TREKKING_CAMP_LIVE_DEMO',__('https://www.ovationthemes.com/demos/adventure-tour/','adventure-tour')); } if ( ! defined( 'ADVENTURE_TREKKING_CAMP_BUY_PRO' ) ) { define('ADVENTURE_TREKKING_CAMP_BUY_PRO',__('https://www.ovationthemes.com/wordpress/adventure-tour-wordpress-theme/','adventure-tour')); } if ( ! defined( 'ADVENTURE_TREKKING_CAMP_PRO_DOC' ) ) { define('ADVENTURE_TREKKING_CAMP_PRO_DOC',__('https://www.ovationthemes.com/docs/ot-adventure-tour-pro-doc/','adventure-tour')); } if ( ! defined( 'ADVENTURE_TREKKING_CAMP_THEME_NAME' ) ) { define('ADVENTURE_TREKKING_CAMP_THEME_NAME',__('Premium Adventure Theme','adventure-tour')); } /* Pro control */ if (class_exists('WP_Customize_Control') && !class_exists('Adventure_Tour_Pro_Control')): class Adventure_Tour_Pro_Control extends WP_Customize_Control{ public function render_content(){?> '; return $form; }