post_type; $f_id = get_option('featured-post--'.$post_type, false); $featuredPost = new FeaturedPost($f_id, $post_type); $hero_image = ($featuredPost && $featuredPost->image) ? $featuredPost->image : get_theme_mod($template . '_image_setting'); } return $hero_image; } /** * The hero has different sizes depending on which template is displayed * @param [type] $template [description] * @return [type] [description] */ function uswds_hero_size($template = null){ $setting = get_theme_mod($template . '_hero_size_setting'); $hero_size = $setting ? 'usa-hero--'.$setting : 'usa-hero--slim'; return $hero_size; } /** * The front page displays a "callout", here is the markup * @return [type] [description] */ function uswds_get_hero_callout(){ $page = ($id = get_theme_mod('frontpage_hero_callout_setting')) ? $id : null; $description = get_bloginfo( 'description', 'display' ); $title = get_bloginfo( 'name', 'display' ); if(!$title || !$description){ echo '