Name ); /** * Includes * * @since 1.0.0 */ require( BAVOTASAN_THEME_TEMPLATE . '/library/theme-options.php' ); // Functions for theme options page require( BAVOTASAN_THEME_TEMPLATE . '/library/preview-pro.php' ); // Functions for preview pro page require( BAVOTASAN_THEME_TEMPLATE . '/library/custom-metaboxes.php' ); // Functions for home page alignment /** * Prepare the content width * * @since 1.0.0 */ $bavotasan_theme_options = bavotasan_theme_options(); if ( ! isset( $content_width ) ) $content_width = $bavotasan_theme_options['width'] - 30; 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( 'ward', 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(); // This theme uses wp_nav_menu() in one location. register_nav_menu( 'primary', __( 'Primary Menu', 'ward' ) ); // 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-page', 500, 400, true ); // Add support for custom backgrounds add_theme_support( 'custom-background' ); // Add HTML5 elements add_theme_support( 'html5', array( 'comment-list', 'search-form', 'comment-form', ) ); } endif; // bavotasan_setup add_action( 'wp_head', 'bavotasan_styles' ); /** * Add a style block to the theme for the current link color. * * This function is attached to the 'wp_head' action hook. * * @since 1.0.0 */ function bavotasan_styles() { $bavotasan_theme_options = bavotasan_theme_options(); ?> add_node( array( 'id' => 'bavotasan_toolbar', 'title' => BAVOTASAN_THEME_NAME, 'href' => admin_url( 'customize.php' ) ) ); } add_action( 'wp_enqueue_scripts', 'bavotasan_add_js' ); if ( ! function_exists( 'bavotasan_add_js' ) ) : /** * Load all JavaScript to header * * This function is attached to the 'wp_enqueue_scripts' action hook. * * @uses is_admin() * @uses is_singular() * @uses get_option() * @uses wp_enqueue_script() * @uses BAVOTASAN_THEME_URL * * @since 1.0.0 */ function bavotasan_add_js() { if ( is_singular() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); wp_enqueue_script( 'bootstrap', BAVOTASAN_THEME_URL .'/library/js/bootstrap.min.js', array( 'jquery' ), '2.2.2', true ); wp_enqueue_script( 'theme_js', BAVOTASAN_THEME_URL .'/library/js/theme.js', array( 'bootstrap' ), '', true ); wp_enqueue_style( 'theme_stylesheet', get_stylesheet_uri() ); wp_enqueue_style( 'google_fonts', 'http://fonts.googleapis.com/css?family=Lato:300', false, null, 'all' ); } endif; // bavotasan_add_js add_action( 'widgets_init', 'bavotasan_widgets_init' ); if ( ! function_exists( 'bavotasan_widgets_init' ) ) : /** * Creating the two sidebars * * This function is attached to the 'widgets_init' action hook. * * @uses register_sidebar() * * @since 1.0.0 */ function bavotasan_widgets_init() { require( BAVOTASAN_THEME_TEMPLATE . '/library/widgets/widget-image-icon.php' ); // Custom Image/Icon Text widget register_sidebar( array( 'name' => __( 'First Sidebar', 'ward' ), 'id' => 'sidebar', 'description' => __( 'This is the first sidebar widgetized area. All defaults widgets work great here.', 'ward' ), 'before_widget' => '', 'before_title' => '