#bliss_container{width:%dpx;} @media screen and (max-width:%dpx){ #bliss_container{ width:90%%; margin:35px 5%%; } } ', $width, $breakpoint); }else{ if(isset($width) && $width === 0){ echo ''; } } $header_background = get_header_image(); // feature support for custom-header image. if($header_background && $header_background != ''){ printf(' ', esc_url($header_background)); } } add_action('wp_head', 'bliss_user_customizations', 100);// a low priority so these styles will be called last. /* color scheme selection via theme options */ function bliss_color_scheme($classes){ // get the user-selected color scheme. Formerly: Defaults to light grey. Now: defaults to blue! // other options: blue, green, or maroon. $color = esc_attr(of_get_option('bliss_colors', 'blue-contrast'));// formerly "light" if($color){ // add the color as a class name to the $classes array $classes[] = $color; } return $classes; } add_filter('body_class', 'bliss_color_scheme'); function bliss_font_in_footer(){ /* We put the Google Fonts font in the footer and call it late in the stack, to give it time to load before applying the typeface to the content. */ echo ' '; } add_action('wp_footer', 'bliss_font_in_footer', 100); # end theme styles # # theme functions # // per http://codex.wordpress.org/Theme_Development#Untrusted_Data // define a custom function for cleaning titles, when they are output within an html attribute. // BUT functions defined in the global scope must be prefixed with the unique theme name! // Thanks to nitkr for pointing this out. function bliss_clean_title_link(){ //http://codex.wordpress.org/Function_Reference/the_title_attribute printf( '%s', get_permalink(), the_title_attribute( 'echo=0' ), get_the_title() ); } // as per http://codex.wordpress.org/Function_Reference/wp_title#Covering_Homepage function bliss_homepage_title($title){ if( empty( $title ) && ( is_home() || is_front_page() ) ) { return esc_attr( get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' ) ); } return $title; } add_filter( 'wp_title', 'bliss_homepage_title', 9);// call early, so it can be overridden by plugins // per theme review: // these calls to add_editor_style and add_theme_support // MUST be hooked to after_setup_theme function bliss_add_editor_styles() { /* Editor styles, recommended by ThemeCheck. */ // http://codex.wordpress.org/Function_Reference/add_editor_style add_editor_style( 'css/admin.css' ); /* theme support, as recommended by ThemeCheck: */ add_theme_support('post-thumbnails'); add_theme_support('custom-header'); add_theme_support('custom-background'); add_theme_support('title-tag');// since WordPress 4.1 /* theme support, as REQUIRED by ThemeCheck */ add_theme_support('automatic-feed-links'); // theme support for html5, introduced in bliss v.1.0.1 add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption', 'widgets' ) ); // theme support for WooCommerce, as of Bliss version 1.0.6 add_theme_support('woocommerce'); } add_action( 'after_setup_theme', 'bliss_add_editor_styles' ); function bliss_collapsing_nav_menu(){ $path = get_template_directory_uri() . '/js/collapsing-nav-menu.js'; wp_enqueue_script('collapsing_nav', $path, array(), '1', true); } add_action('wp_enqueue_scripts', 'bliss_collapsing_nav_menu'); // next, we include formatting.php // which is concerned with menus, sidebars, and the "Read More" link. require_once('includes/formatting.php'); // custom meta boxes. require_once('includes/metaboxes.php'); // Sliders to go with those meta boxes. require_once('includes/slideshows.php'); // pagination. require_once('includes/pagination.php'); /* breadcrumbs */ require_once('includes/breadcrumbs.php'); ?>