Version ) ); define( 'BAVOTASAN_THEME_NAME', $bavotasan_theme_data->Name ); /** * Includes * * @since 1.0.0 */ require( BAVOTASAN_THEME_TEMPLATE . '/library/customizer.php' ); // Functions for theme options page require( BAVOTASAN_THEME_TEMPLATE . '/library/about.php' ); // Functions for how to require( BAVOTASAN_THEME_TEMPLATE . '/library/preview-pro.php' ); // Functions for upgrade /** * Prepare the content width * * @since 1.0.3 */ function bavotasan_content_width() { $bavotasan_theme_options = bavotasan_theme_options(); $bavotasan_array_content = array( 'col-md-2' => .1666, 'col-md-3' => .25, 'col-md-4' => .3333, 'col-md-5' => .4166, 'col-md-6' => .5, 'col-md-7' => .5833, 'col-md-8' => .6666, 'col-md-9' => .75, 'col-md-10' => .8333, 'col-md-12' => 1 ); return round( $bavotasan_array_content[$bavotasan_theme_options['primary']] * $bavotasan_theme_options['width'] - 30 ); } if ( ! isset( $content_width ) ) $content_width = absint( bavotasan_content_width() ); add_action( 'after_setup_theme', 'bavotasan_setup' ); if ( ! function_exists( 'bavotasan_setup' ) ) : /** * Initial setup * * This function is attached to the 'after_setup_theme' action hook. * * @uses load_theme_textdomain() * @uses get_locale() * @uses BAVOTASAN_THEME_TEMPLATE * @uses add_theme_support() * @uses add_editor_style() * @uses add_custom_background() * @uses add_custom_image_header() * @uses register_default_headers() * * @since 1.0.0 */ function bavotasan_setup() { load_theme_textdomain( 'destin-basic', BAVOTASAN_THEME_TEMPLATE . '/library/languages' ); // Add default posts and comments RSS feed links to
. add_theme_support( 'automatic-feed-links' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style( 'library/css/admin/editor-style.css' ); // This theme uses wp_nav_menu() in two location. register_nav_menu( 'primary', __( 'Primary Menu', 'destin-basic' ) ); // Add support for a variety of post formats add_theme_support( 'post-formats', array( 'gallery', 'image', 'video', 'audio', 'quote', 'link', 'status', 'aside' ) ); // This theme uses Featured Images (also known as post thumbnails) for archive pages add_theme_support( 'post-thumbnails' ); add_image_size( 'home', 400, 800 ); add_image_size( 'featured-img', 840, 410, true ); // Add support for custom backgrounds add_theme_support( 'custom-background', array( 'default-color' => '2f3238', ) ); // Add HTML5 elements add_theme_support( 'html5', array( 'comment-list', 'comment-form', ) ); // Add title tag support add_theme_support( 'title-tag' ); // Infinite scroll add_theme_support( 'infinite-scroll', array( 'type' => 'scroll', 'wrapper' => false, 'footer' => false, 'footer_widgets' => 'extended-footer', 'render'=> 'bavotasan_front_page_render', ) ); // Remove default gallery styles add_filter( 'use_default_gallery_style', '__return_false' ); // Add Woocommerce support add_theme_support( 'woocommerce' ); } endif; // bavotasan_setup function bavotasan_front_page_render() { global $wp_query, $paged; ?> __( 'First Sidebar', 'destin-basic' ), 'id' => 'sidebar', 'description' => __( 'This is the first sidebar. It won’t appear on the home page unless you set a static front page.', 'destin-basic' ), 'before_widget' => '', 'before_title' => '