esc_html__( 'Main Menu', 'blogpress-16' ), ) ); add_theme_support( "custom-header" ); add_theme_support( 'custom-background' ); add_theme_support( 'custom-logo', array( 'height' => 240, 'width' => 240, 'flex-height' => true, ) ); } $GLOBALS['content_width'] = apply_filters( 'blogpress16_content_width', 900 ); endif; add_action( 'after_setup_theme', 'blogpress16_setup' ); /***********************************************************************************************/ /* Function for Google Fonts */ /***********************************************************************************************/ function blogpress16_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-16' ); 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 blogpress16_scripts() { wp_enqueue_style('bootstrap', THEMEDIR.'/include/css/bootstrap.css',array(),'3.3.1', 'all'); wp_enqueue_style('google-fonts-bitter', blogpress16_fonts_url(), array(), null ); wp_enqueue_style('font-awesome', THEMEDIR.'/include/css/font-awesome.min.css',array(),'4.5.0', 'all'); wp_enqueue_style('blogpress16-theme', get_stylesheet_uri() ); wp_enqueue_script('bootstrap', THEMEDIR.'/include/js/bootstrap.min.js',array('jquery'),'3.3.1',true); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'blogpress16_scripts' ); /***********************************************************************************************/ /* Registers an editor stylesheet for the theme */ /***********************************************************************************************/ function blogpress16_add_editor_styles() { add_editor_style(); } add_action('admin_init','blogpress16_add_editor_styles'); /***********************************************************************************************/ /* Register Sidebar */ /***********************************************************************************************/ add_action( 'widgets_init', 'blogpress16_widgets_init' ); function blogpress16_widgets_init() { register_sidebar( array( 'name' => __( 'Main Sidebar', 'blogpress-16' ), 'id' => 'sidebar-1', 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'blogpress-16' ), 'before_widget' => '
', 'before_title' => '$depth, 'max_depth' => $args['max_depth'] ) ) ); ?> comment_approved == '0') : ?>