__( 'Upload', 'flexible' ), 'remove' => __( 'Remove', 'flexible' ) )); wp_enqueue_style( 'flexible-choosen', get_template_directory_uri() . '/inc/admin/css/chosen.css', array(), '1.0.1' ); wp_enqueue_style( 'flexible-admin-styles', get_template_directory_uri() . '/inc/admin/css/admin-styles.css', array(), '1.0.0' ); wp_enqueue_script( 'flexible-choose-scripts', get_template_directory_uri() . '/inc/admin/js/chosen.jquery.js', array('jquery'), '1.0.0', true ); wp_enqueue_script( 'flexible-admin-scripts', get_template_directory_uri() . '/inc/admin/js/admin-scripts.js', false, '1.0.0', true ); } /*-------------------------------------------------------------------------------*/ /** * Enqueue scripts and styles. */ function flexible_scripts() { wp_enqueue_style( 'flexible-font-awesome', get_template_directory_uri().'/font-awesome/css/font-awesome.min.css', array(), '4.5.0' ); wp_enqueue_style( 'flexible-google-font', 'https://fonts.googleapis.com/css?family=Roboto:400,300,400italic,500,700,700italic,500italic,900' ); wp_enqueue_style( 'flexible-style', get_stylesheet_uri() ); wp_enqueue_style( 'flexible-responsive', get_template_directory_uri() . '/css/flexible-responsive.css'); wp_enqueue_script( 'flexible-bxSlider', get_template_directory_uri() .'/js/jquery.bxslider.js', array( 'jquery' ), '4.1.2', true ); wp_enqueue_script( 'flexible-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'flexible-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); wp_enqueue_script( 'flexible-onePage', get_template_directory_uri() .'/js/jquery.nav.js', array('jquery'), '1.0.0' ,true ); $header_sticky_option = get_theme_mod( 'flexible_header_sticky', '0' ); if( empty( $header_sticky_option ) && $header_sticky_option != 1 ) { wp_enqueue_script( 'flexible-sticky', get_template_directory_uri() .'/js/sticky/jquery.sticky.js', array('jquery'), '1.0.2' ,true ); wp_enqueue_script( 'flexible-sticky-setting', get_template_directory_uri() .'/js/sticky/sticky-setting.js', array('flexible-sticky'), '1.0.0' ,true ); } wp_enqueue_script( 'flexible-parallax', get_template_directory_uri() .'/js/jquery.parallax-1.1.3.js', array(), '1.1.3' ,true ); wp_enqueue_script( 'flexible-custom-scripts', get_template_directory_uri() .'/js/flexible-custom.js', array( 'jquery', 'flexible-bxSlider' ) ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'flexible_scripts' ); /*------------------------------------------------------------------------------------*/ if ( ! function_exists( 'flexible_the_custom_logo' ) ) : /** * Displays the optional custom logo. * * Does nothing if the custom logo is not available. */ function flexible_the_custom_logo() { if ( function_exists( 'the_custom_logo' ) ) { the_custom_logo(); } } endif; /*------------------------------------------------------------------------------------*/ /** * Flexible front slider */ add_action( 'flexible_front_slider', 'flexible_front_slider_cb', 10 ); if( !function_exists( 'flexible_front_slider_cb' ) ) : function flexible_front_slider_cb() { ?>

ID] = $flexible_page->post_title; } /** * Flexible category dropdown */ $flexible_categories = get_categories( array( 'hide_empty' => 0 ) ); $flexible_category_dropdown['0'] = __( 'Select Category', 'flexible' ); foreach ( $flexible_categories as $flexible_category ) { $flexible_category_dropdown[$flexible_category->term_id] = $flexible_category->cat_name; } /** * Flexible category list */ $flexible_cat_args = array( 'type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC', 'hide_empty' => 1, 'taxonomy' => 'category', ); $flexible_categories = get_categories( $flexible_cat_args ); $flexible_categories_lists = array(); foreach( $flexible_categories as $category ) { $flexible_categories_lists[$category->term_id] = $category->name; } /*------------------------------------------------------------------------*/ /** * Flexible homepage excerpt */ if( ! function_exists( 'flexible_get_excerpt' ) ): function flexible_get_excerpt( $content, $limit ) { $striped_content = strip_tags( $content ); $striped_content = strip_shortcodes( $striped_content ); $limit_content = mb_substr( $striped_content, 0 , $limit ); if( $limit_content < $content ){ $limit_content .= "..."; } return $limit_content; } endif; /** * Function to get excerpt content according to define length */ if( ! function_exists( 'flexible_archive_excerpt' ) ): function flexible_archive_excerpt( $content, $limit ) { $content = strip_tags( $content ); $content = strip_shortcodes( $content ); $words = explode( ' ', $content ); return implode( ' ', array_slice( $words, 0, $limit ) ); } endif; /*-------------------------------------------------------------------------*/ /** * Function define about page/post/archive sidebar */ if( ! function_exists( 'flexible_get_sidebar' ) ): function flexible_get_sidebar() { global $post; if( $post ) { $sidebar_meta_option = get_post_meta( $post->ID, 'flexible_page_sidebar', true ); } if( is_home() ) { $front_id = get_option( 'page_for_posts' ); $sidebar_meta_option = get_post_meta( $front_id, 'flexible_page_sidebar', true ); } if( empty( $sidebar_meta_option ) || is_archive() || is_search() ) { $sidebar_meta_option = 'default_sidebar'; } $vmag_archive_sidebar = get_theme_mod( 'flexible_archive_sidebar', 'right_sidebar' ); $vmag_post_default_sidebar = get_theme_mod( 'flexible_default_post_sidebar', 'right_sidebar' ); $vmag_page_default_sidebar = get_theme_mod( 'flexible_default_page_sidebar', 'right_sidebar' ); if( $sidebar_meta_option == 'default_sidebar' ) { if( is_single() ) { if( $vmag_post_default_sidebar == 'right_sidebar' ) { get_sidebar(); } elseif( $vmag_post_default_sidebar == 'left_sidebar' ) { get_sidebar( 'left' ); } } elseif( is_page() ) { if( $vmag_page_default_sidebar == 'right_sidebar' ) { get_sidebar(); } elseif( $vmag_page_default_sidebar == 'left_sidebar' ) { get_sidebar( 'left' ); } } elseif( $vmag_archive_sidebar == 'right_sidebar' ) { get_sidebar(); } elseif( $vmag_archive_sidebar == 'left_sidebar' ) { get_sidebar( 'left' ); } } elseif( $sidebar_meta_option == 'right_sidebar' ) { get_sidebar(); } elseif( $sidebar_meta_option == 'left_sidebar' ) { get_sidebar( 'left' ); } } endif; /** * Social media function */ if( !function_exists( 'flexible_social_media' ) ): function flexible_social_media() { $social_section_option = get_theme_mod( 'flexible_social_option', 0 ); $social_fb = get_theme_mod( 'flexible_fb_link', 'https://facebook.com/' ); $social_tw = get_theme_mod( 'flexible_tw_link', 'https://twitter.com/' ); $social_gp = get_theme_mod( 'flexible_gp_link', 'https://plus.google.com/' ); $social_lnk = get_theme_mod( 'flexible_lnk_link', 'https://linkedin.com/' ); $social_yt = get_theme_mod( 'flexible_yt_link', 'https://youtube.com/' ); $social_vm = get_theme_mod( 'flexible_vm_link', 'https://vimeo.com/' ); $social_pin = get_theme_mod( 'flexible_pin_link', 'https://www.pinterest.com/' ); $social_insta = get_theme_mod( 'flexible_insta_link', 'https://www.instagram.com/' ); if( $social_section_option != 1 ) { ?>