"cerulean", "default_style" => "cerulean", "version" => "1.2" ); $bootpress_settings = wp_parse_args($bootpress_settings, $defaults); if ( ! isset( $content_width ) ) $content_width = 900; function bootpress_setup() { load_theme_textdomain( 'bootpress', get_template_directory() . '/lang' ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // This theme supports a variety of post formats. add_theme_support( 'post-formats', array( 'aside', 'image', 'link', 'quote', 'status' ) ); // This theme uses wp_nav_menu() in one location. //add custom menu register_nav_menus(array('primary'=>'Bootpress Top Menu','footer'=>'Bootpress Footer Menu')); /* * This theme supports custom background color and image, * and here we also set up the default background color. */ //add_theme_support( 'custom-background', array('default-color' => 'FFFFFF') ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) ); // This theme uses a custom image size for featured images, displayed on "standard" posts. add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop } add_action( 'after_setup_theme', 'bootpress_setup' ); //bootpress title function bootpress_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'bootpress' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'bootpress_wp_title', 10, 2 ); add_filter('get_avatar','bootpress_avatar'); function bootpress_avatar($class) { $class = str_replace("class='avatar", "class='avatar img-thumbnail", $class) ; return $class; } //Enque Scripts and styles function bootpress_theme_stylesheets() { global $bootpress_settings; wp_register_style('bootstrap3', get_template_directory_uri() . '/dist/css/'.$bootpress_settings["style"]. '.min.css', array(), $bootpress_settings['version'], 'all' ); wp_enqueue_style( 'stylesheet', get_stylesheet_uri(), array('bootstrap3'), '1', 'all' ); wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/dist/js/bootstrap.min.js',array( 'jquery' ),$bootpress_settings['version'],true ); wp_enqueue_script('bootpress-js', get_template_directory_uri() . '/js/bootpress.js',array( 'jquery' ),$bootpress_settings['version'],true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action('wp_enqueue_scripts', 'bootpress_theme_stylesheets'); add_action ("wp_footer", "bootpress_init_footer",1); function bootpress_init_footer() { ?>
__( 'Right Hand Sidebar','bootpress' ), 'id' => 'right-sidebar', 'description' => __( 'Widgets in this area will be shown on the right-hand side.','bootpress' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); } add_action( 'widgets_init', 'bootpress_register_sidebars' ); //bs3 menu class wp_bootstrap_navwalker extends Walker_Nav_Menu { function check_current($classes) { return preg_match('/(current[-_])|active|dropdown/', $classes); } function start_lvl(&$output, $depth = 0, $args = array()) { if($depth >= 1){ $output .= "\n