__( 'Primary Navigation', 'adventure-soul' ),
'secondary' => __('Secondary Navigation', 'adventure-soul')
));
}
add_action( 'after_setup_theme', 'sweans_theme_setup' );
add_filter('style_loader_tag', 'adventure_soul_remove_type_attr', 10, 2);
add_filter('script_loader_tag', 'adventure_soul_remove_type_attr', 10, 2);
function adventure_soul_remove_type_attr($tag, $handle) {
return preg_replace( "/type=['\"]text\/(javascript|css)['\"]/", '', $tag );
}
add_action(
'after_setup_theme',
function() {
add_theme_support( 'html5', [ 'script', 'style' ] );
}
);
function theme_prefix_fonts()
{
wp_enqueue_style( 'theme-prefix-fonts', "//fonts.googleapis.com/css?family=Dosis:400,700|Lato:400,900|Darker+Grotesque:400,500,600,700,900|Pacifico", '', '1.0.0', 'screen' );
}
add_action( 'wp_enqueue_scripts', 'theme_prefix_fonts' );
/*Register Sidebar*/
function adventure_widgets_init() {
//footer
register_sidebar( array(
'name' => 'Footer Widget Area 1',
'id' => 'custom-footer-widget-1',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
register_sidebar( array(
'name' => 'Footer Widget Area 2',
'id' => 'custom-footer-widget-2',
'before_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar( array(
'name' => 'Footer Widget Area 3',
'id' => 'custom-footer-widget-3',
'before_widget' => '',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
',
));
}
add_action( 'widgets_init', 'adventure_widgets_init' );
if ( ! isset( $content_width ) ) {
$content_width = 800;
}
add_action( 'after_setup_theme', 'theme_slug_setup' );
function theme_slug_setup() {
add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'sweans_theme_setup' );
function adventure_soul_scripts_with_jquery() {
/* Register & enqueue the script:*/
wp_enqueue_script( 'jquery', get_template_directory_uri() .'/js/jquery-3.4.1.min.js', false, '1.12.0', true);
wp_enqueue_script( 'custom-script', get_template_directory_uri() . '/js/custom.js', array( 'jquery') );
wp_enqueue_script( 'bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery') );
wp_enqueue_script( 'lightslider.min', get_template_directory_uri() . '/js/lightslider.min.js', array( 'jquery') );
/* For the css style:*/
wp_enqueue_style( 'bootstrap_style',get_template_directory_uri() .'/css/bootstrap.min.css' );
wp_enqueue_style( 'lightslider_style',get_template_directory_uri() .'/css/lightslider.min.css' );
wp_enqueue_style( 'admin_style',get_template_directory_uri() .'/css/admin-style.css' );
wp_enqueue_style( 'font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css');
wp_enqueue_style( 'style',get_stylesheet_uri() );
}
add_action( 'wp_enqueue_scripts', 'adventure_soul_scripts_with_jquery');
function newborn_enqueue_comments_reply() {
if( get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'comment_form_before', 'newborn_enqueue_comments_reply' );
add_theme_support( "custom-background" );
function adventure_soul_customize_register( $wp_customize ) {
$wp_customize->add_panel( 'adventure_soul_theme_settings', array(
'title' => esc_html__( 'adventure_soul: Theme Settings', 'adventure-soul' ),
'description' => esc_html__( 'Customize theme settings', 'adventure-soul'),
'priority' => 140,
) );
// ========================================================
// General Theme Settings
// ========================================================
$wp_customize->add_section( 'adventure_soul_general_settings', array(
'title' => esc_html__( 'General Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
) );
//Website Logo
$wp_customize->add_setting( 'adventure_soul_logo',
array(
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
//Website Logo: Controls
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_logo', array(
'label' => __( 'Logo', 'adventure-soul' ),
'section' => 'adventure_soul_general_settings',
'settings' => 'adventure_soul_logo',
) ) );
// Home banner Title 1
$wp_customize->add_setting( 'adventure_soul_post_title_1', array(
'default' => 'We Take You',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
// Home banner Title 1: Controls
$wp_customize->add_control( 'adventure_soul_post_title_1', array(
'settings' => 'adventure_soul_post_title_1',
'label' => esc_html__( 'Enter the banner title ', 'adventure-soul' ),
'section' => 'adventure_soul_general_settings',
'type' => 'text',
) );
// Home banner Title 2
$wp_customize->add_setting( 'adventure_soul_post_title_2', array(
'default' => 'Everywhere',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
// Home banner Title 2: Controls
$wp_customize->add_control( 'adventure_soul_post_title_2', array(
'settings' => 'adventure_soul_post_title_2',
'label' => esc_html__( 'Enter the banner title ', 'adventure-soul' ),
'section' => 'adventure_soul_general_settings',
'type' => 'text',
) );
// Home banner image
$wp_customize->add_setting( 'adventure_soul_banner_bg',
array(
'default' => get_template_directory_uri().'/images/packages-banner.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
// Home banner image
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_banner_bg', array(
'label' => __( 'banner', 'adventure-soul' ),
'section' => 'adventure_soul_general_settings',
'settings' => 'adventure_soul_banner_bg',
) ) );
// ========================================================
// Package Settings
// ========================================================
$wp_customize->add_section( 'adventure_soul_destination_settings', array(
'title' => esc_html__( 'Second Section Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
) );
// destination image
$wp_customize->add_setting( 'adventure_soul_destination',
array(
'default' => get_template_directory_uri() .'/images/section-2-img.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_destination', array(
'label' => __( 'destination img', 'adventure-soul' ),
'section' => 'adventure_soul_destination_settings',
'settings' => 'adventure_soul_destination',
) ) );
//destination Title 1
$wp_customize->add_setting( 'adventure_soul_destination_title_1', array(
'default' =>'SAVE UP for your Travels with the 52-Week Money Saving Challenge',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_destination_title_1', array(
'settings' => 'adventure_soul_destination_title_1',
'label' => esc_html__( 'Enter the destination title ', 'adventure-soul' ),
'section' => 'adventure_soul_destination_settings',
'type' => 'text',
) );
//destination content
$wp_customize->add_setting( 'adventure_soul_destination_content', array(
'default' =>'Traveling is not always cheap and many travelers postpone their Travel plans due to insufficient savings. Saving money for travel can often be rather challenging. At the end of the day, many travelers prefer to spend money on things we see immediately rather than future traveling adventures.1 way to save money for your journeys is your 52-Week In this guide, Jakub Krejci -- an electronic nomad who invest money to generate passive income -- will explain to you how it functions and how you can use it to save cash for your next trip.',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_destination_content', array(
'settings' => 'adventure_soul_destination_content',
'label' => esc_html__( 'Enter the destination content ', 'adventure-soul' ),
'section' => 'adventure_soul_destination_settings',
'type' => 'textarea',
));
//destination subTitle 1
$wp_customize->add_setting( 'adventure_soul_destination_title_2', array(
'default' =>'Hack Your Money Saving Challenge With P2P Lending',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_destination_title_2', array(
'settings' => 'adventure_soul_destination_title_2',
'label' => esc_html__( 'Enter the destination sub title ', 'adventure-soul' ),
'section' => 'adventure_soul_destination_settings',
'type' => 'text',
));
//package section
$wp_customize->add_section( 'adventure_soul_package_settings', array(
'title' => esc_html__( 'Package Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
) );
// adventures image
$wp_customize->add_setting( 'adventure_soul_advanture',
array(
'default'=>get_template_directory_uri() .'/images/section-2-img2.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_advanture', array(
'label' => __( 'package 1 img', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'settings' => 'adventure_soul_advanture',
) ) );
//adventures Title 1
$wp_customize->add_setting( 'adventure_soul_advanture_title_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_advanture_title_1', array(
'settings' => 'adventure_soul_advanture_title_1',
'label' => esc_html__( 'Enter the package 1 title ', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'type' => 'text',
) );
//adventures content
$wp_customize->add_setting( 'adventure_soul_advanture_content', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_advanture_content', array(
'settings' => 'adventure_soul_advanture_content',
'label' => esc_html__( 'Enter the package 1 content ', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'type' => 'text',
));
// package 2 image
$wp_customize->add_setting( 'adventure_soul_luxury',
array(
'default'=>get_template_directory_uri() .'/images/section-2-img3.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_luxury', array(
'label' => __( 'package 2 img', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'settings' => 'adventure_soul_luxury',
) ) );
//package 2 Title 1
$wp_customize->add_setting( 'adventure_soul_luxury_title_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_luxury_title_1', array(
'settings' => 'adventure_soul_luxury_title_1',
'label' => esc_html__( 'Enter package 2 title ', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'type' => 'text',
) );
//package 2 content
$wp_customize->add_setting( 'adventure_soul_luxury_content', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_luxury_content', array(
'settings' => 'adventure_soul_luxury_content',
'label' => esc_html__( 'Enter package 2 content ', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'type' => 'text',
));
// package 3 image
$wp_customize->add_setting( 'adventure_soul_package3',
array(
'default'=>get_template_directory_uri() .'/images/section-2-img4.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_package3', array(
'label' => __( 'package 3 img', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'settings' => 'adventure_soul_package3',
) ) );
//package 3 Title 1
$wp_customize->add_setting( 'adventure_soul_package3_title_1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_package3_title_1', array(
'settings' => 'adventure_soul_package3_title_1',
'label' => esc_html__( 'Enter package 3 title ', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'type' => 'text',
) );
//package 3 content
$wp_customize->add_setting( 'adventure_soul_package3_content', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_package3_content', array(
'settings' => 'adventure_soul_package3_content',
'label' => esc_html__( 'Enter package 3 content ', 'adventure-soul' ),
'section' => 'adventure_soul_package_settings',
'type' => 'text',
));
//video section
$wp_customize->add_section( 'adventure_soul_video_settings', array(
'title' => esc_html__( 'Video Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
) );
//video Title
$wp_customize->add_setting( 'adventure_soul_video_title', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_video_title', array(
'settings' => 'adventure_soul_video_title',
'label' => esc_html__( 'Enter video title ', 'adventure-soul' ),
'section' => 'adventure_soul_video_settings',
'type' => 'text',
) );
//video url
$wp_customize->add_setting( 'adventure_soul_video_url', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_video_url', array(
'settings' => 'adventure_soul_video_url',
'label' => esc_html__( 'Enter video url ', 'adventure-soul' ),
'section' => 'adventure_soul_video_settings',
'type' => 'text',
) );
//video section banner
$wp_customize->add_setting( 'adventure_soul_video_banner',
array(
'default'=>get_template_directory_uri() .'/images/section-3-bg.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_video_banner', array(
'label' => __( 'video banner', 'adventure-soul' ),
'section' => 'adventure_soul_video_settings',
'settings' => 'adventure_soul_video_banner',
) ) );
//slider section
$wp_customize->add_section( 'adventure_soul_slider_settings', array(
'title' => esc_html__( 'Slider Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
) );
//slider1 Title
$wp_customize->add_setting( 'adventure_soul_slider1_title1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider1_title1', array(
'settings' => 'adventure_soul_slider1_title1',
'label' => esc_html__( 'Enter the slider 1 title1 ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'text',
) );
//slider1 content
$wp_customize->add_setting( 'adventure_soul_slider1_content1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider1_content1', array(
'settings' => 'adventure_soul_slider1_content1',
'label' => esc_html__( 'Enter the slider 1 content ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'textarea',
) );
//slider1 Title2
$wp_customize->add_setting( 'adventure_soul_slider1_title2', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider1_title2', array(
'settings' => 'adventure_soul_slider1_title2',
'label' => esc_html__( 'Enter the slider 2 title ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'text',
) );
//slider1 content2
$wp_customize->add_setting( 'adventure_soul_slider1_content2', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider1_content2', array(
'settings' => 'adventure_soul_slider1_content2',
'label' => esc_html__( 'Enter the slider 2 content ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'textarea',
) );
// slider2 image1
$wp_customize->add_setting( 'adventure_soul_slider2_img1',
array(
'default'=>get_template_directory_uri() .'/images/Blog1.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_slider2_img1', array(
'label' => __( 'slider image1', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'settings' => 'adventure_soul_slider2_img1',
) ) );
//slider2 Title1
$wp_customize->add_setting( 'adventure_soul_slider2_title1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider2_title1', array(
'settings' => 'adventure_soul_slider2_title1',
'label' => esc_html__( 'Enter the slider 1 title1 ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'text',
) );
//slider2 content1
$wp_customize->add_setting( 'adventure_soul_slider2_content1', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider2_content1', array(
'settings' => 'adventure_soul_slider2_content1',
'label' => esc_html__( 'Enter the slider 1 content ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'textarea',
) );
// slider2 image2
$wp_customize->add_setting( 'adventure_soul_slider2_img2',
array(
'default'=>get_template_directory_uri() .'/images/Blog2.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'adventure_soul_slider2_img2', array(
'label' => __( 'slider image2', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'settings' => 'adventure_soul_slider2_img2',
) ) );
//slider2 Title2
$wp_customize->add_setting( 'adventure_soul_slider2_title2', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider2_title2', array(
'settings' => 'adventure_soul_slider2_title2',
'label' => esc_html__( 'Enter the slider 2 title ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'text',
) );
//slider2 content2
$wp_customize->add_setting( 'adventure_soul_slider2_content2', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_slider2_content2', array(
'settings' => 'adventure_soul_slider2_content2',
'label' => esc_html__( 'Enter the slider 2 content ', 'adventure-soul' ),
'section' => 'adventure_soul_slider_settings',
'type' => 'textarea',
) );
//single page section
$wp_customize->add_section( 'adventure_soul_page_settings', array(
'title' => esc_html__( 'Page Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
));
$wp_customize->add_setting( 'single_page_bg',
array(
'default'=>get_template_directory_uri().'/images/packages-banner.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'single_page_bg', array(
'label' => __( 'page banner', 'adventure-soul' ),
'section' => 'adventure_soul_page_settings',
'settings' => 'single_page_bg',
) ) );
//single page section
$wp_customize->add_section( 'adventure_soul_blog_settings', array(
'title' => esc_html__( 'Blog page Settings', 'adventure-soul' ),
'priority' => 130,
'panel' => 'adventure_soul_theme_settings',
));
$wp_customize->add_setting( 'blog_page_bg',
array(
'default'=>get_template_directory_uri().'/images/packages-banner.jpg',
'transport' => 'refresh',
'sanitize_callback' => 'adventure_soul_logo_display'
)
);
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'blog_page_bg', array(
'label' => __( 'blog banner', 'adventure-soul' ),
'section' => 'adventure_soul_blog_settings',
'settings' => 'blog_page_bg',
) ) );
$wp_customize->add_setting( 'adventure_soul_blog_title', array(
'default'=>'Your latest posts',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'adventure_soul_sanitize_text'
) );
$wp_customize->add_control( 'adventure_soul_blog_title', array(
'settings' => 'adventure_soul_blog_title',
'label' => esc_html__( 'blog page title ', 'adventure-soul' ),
'section' => 'adventure_soul_blog_settings',
'type' => 'text',
) );
}
add_action( 'customize_register', 'adventure_soul_customize_register' );
// ========================================================
// Santitize Logo field
// ========================================================
function adventure_soul_logo_display( $input ) {
$filetype = wp_check_filetype( $input );
if ( $filetype['ext'] && wp_ext2type( $filetype['ext'] ) === 'image' ) {
return esc_url( $input );
}
return '';
}
// ========================================================
// Santitize text field
// ========================================================
function adventure_soul_sanitize_text( $text ) {
return sanitize_text_field( $text );
}
//theme support
$args = NULL;
add_theme_support("custom-header", $args );
//add style
add_editor_style();
//contact data widget//
require get_parent_theme_file_path( '/inc/contact_data.php' );
//social media widget
require get_parent_theme_file_path( '/inc/social_data.php' );
?>