esc_html__( 'Main Menu', 'blogpress-2016' ), ) ); add_theme_support( "custom-header" ); add_theme_support( 'custom-background' ); } endif; add_action( 'after_setup_theme', 'blogpress2016_setup' ); /***********************************************************************************************/ /* Content width */ /***********************************************************************************************/ function blogpress2016_content_width() { $GLOBALS['content_width'] = apply_filters( 'blogpress2016_content_width', 900 ); } add_action( 'after_setup_theme', 'blogpress2016_content_width', 0 ); /***********************************************************************************************/ /* Function for Google Fonts */ /***********************************************************************************************/ function blogpress2016_fonts_url() { $fonts_url = ''; /* Translators: If there are characters in your language that are not * supported by Lora, translate this to 'off'. Do not translate * into your own language. */ $bitter = _x( 'on', 'Bitter font: on or off', 'blogpress-2016' ); if ( 'off' !== $bitter ) { $font_families = array(); if ( 'off' !== $bitter ) { $font_families[] = 'Bitter:400,700'; } $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } /***********************************************************************************************/ /* Proper way to enqueue scripts and styles */ /***********************************************************************************************/ function blogpress2016_scripts() { wp_enqueue_style( 'blogpress2016-bootstrap', THEMEDIR.'/include/css/bootstrap.css'); wp_enqueue_style( 'blogpress2016-fonts', blogpress2016_fonts_url(), array(), null ); wp_enqueue_style( 'blogpress2016-font-awesome', THEMEDIR.'/include/css/font-awesome.min.css'); wp_enqueue_style( 'blogpress2016-theme', get_stylesheet_uri() ); wp_enqueue_script( 'blogpress2016-bootstrap', THEMEDIR.'/include/js/bootstrap.min.js'); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'blogpress2016_scripts' ); /***********************************************************************************************/ /* Registers an editor stylesheet for the theme */ /***********************************************************************************************/ function blogpress2016_add_editor_styles() { add_editor_style(); } add_action('admin_init','blogpress2016_add_editor_styles'); /***********************************************************************************************/ /* Register Sidebar */ /***********************************************************************************************/ add_action( 'widgets_init', 'blogpress2016_widgets_init' ); function blogpress2016_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'blogpress-2016' ), 'id' => 'sidebar-1', 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'blogpress-2016' ), 'before_widget' => '
', 'before_title' => '$depth, 'max_depth' => $args['max_depth'] ) ) ); ?> comment_approved == '0') : ?>