<meta itemprop="addressLocality" class="optional" content="<?php echo esc_attr(spine_get_option('contact_addressLocality')); ?> "> <meta itemprop="postalCode" class="required" content="<?php echo esc_attr(spine_get_option('contact_postalCode')); ?> "> </div> <meta itemprop="telephone" class="required" content="<?php echo esc_attr(spine_get_option('contact_telephone')); ?> "> <meta itemprop="email" class="required" content="<?php echo esc_attr(spine_get_option('contact_email')); ?> "> <?php $contact_point = spine_get_option('contact_ContactPoint'); if (!empty($contact_point)) { ?> <meta itemprop="ContactPoint" title="<?php echo esc_attr(spine_get_option('contact_ContactPointTitle')); ?> " class="optional" content="<?php echo esc_attr($contact_point); ?> "><?php } ?> </div>
<?php $spine_classes = array(); $spine_classes[] = esc_attr(spine_get_option('spine_color')); $spine_classes[] = esc_attr('search-' . spine_get_option('search_state')); if (true == spine_get_option('crop') && is_front_page()) { $spine_classes[] = 'cropped'; } $spine_classes[] = esc_attr(spine_get_option('bleed')); $spine_classes = implode(' ', $spine_classes); ?> <div id="spine" class="spine-column <?php echo $spine_classes; ?> shelved"> <div id="glue" class="spine-glue"> <?php get_template_part('spine/header'); ?> <section id="spine-navigation" class="spine-navigation"> <?php get_template_part('spine/site-navigation'); ?> <?php get_template_part('spine/offsite-navigation'); ?>
<figure class="article-thumbnail"><a href="<?php the_permalink(); ?> "><?php the_post_thumbnail('spine-thumbnail_size'); ?> </a></figure><?php } // If a manual excerpt is available, default to that. If `<!--more-->` exists in content, default // to that. If an option is set specifically to display excerpts, default to that. Otherwise show // full content. if ($post->post_excerpt) { echo get_the_excerpt() . ' <a href="' . get_permalink() . '"><span class="excerpt-more-default">» More ...</span></a>'; } elseif (strstr($post->post_content, '<!--more-->')) { the_content('<span class="content-more-default">» More ...</span>'); } elseif ('excerpt' === spine_get_option('archive_content_display')) { the_excerpt(); } else { the_content(); } ?> </div><!-- .article-summary --> <?php } else { ?> <div class="article-body"> <?php the_content(); ?> <?php wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'spine'), 'after' => '</div>'));
<?php // Just a stub for now ?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <?php if (spine_get_option('articletitle_show') == 'true') { ?> <header class="article-header"> <h1 class="article-title"><?php the_title(); ?> </h1> </header> <?php } ?> <?php the_content(); ?> </article>
* Retrieve an array of values to be used in the header. * * site_name * site_tagline * page_title * post_title * section_title * subsection_title * posts_page_title * sup_header_default * sub_header_default * sup_header_alternate * sub_header_alternate */ $spine_main_header_values = spine_get_main_header(); if (spine_get_option('main_header_show') == 'true') { ?> <header class="main-header"> <div class="main-header-sitename"> <sup class="sup-header"> <span class="sup-header-default"><?php echo strip_tags($spine_main_header_values['sup_header_default'], '<a>'); ?> </span> </sup> </div> <?php if (spine_has_featured_image()) { $featured_image_src = spine_get_featured_image_src(); ?> <figure class="featured-image" style="background-image: url('<?php
/** * Determine what should be displayed in the spine's main header area for the * sub and sub sections. * * @return array List of elements for output in main header. */ function spine_get_main_header() { $page_for_posts = absint(get_option('page_for_posts', 0)); if (0 !== $page_for_posts) { $posts_page_title = get_the_title($page_for_posts); } else { $posts_page_title = ''; } $site_name = get_bloginfo('name', 'display'); $site_tagline = get_bloginfo('description', 'display'); $page_title = get_the_title(); $post_title = get_the_title(); $global_sup_header = spine_get_option('global_main_header_sup'); $global_sub_header = spine_get_option('global_main_header_sub'); // Attempt to determine the section and subsection through page hierarchy. $section_title = spine_section_meta('title', 'section'); $subsection_title = spine_section_meta('title', 'subsection'); // By default, the `sup-header` area is the site's configured Title $sup_header_default = '<a href="' . esc_url(home_url('/')) . '" rel="home">' . $site_name . '</a>'; // The `sub-header` area is properly set in the conditional logic that follows. $sub_header_default = ''; // Alternate `sup-header` and `sub-header` areas are available for targeting as data attributes via CSS. $sup_header_alternate = ''; $sub_header_alternate = ''; // On date archive views, use one of the day, month, year as the sub header. Use the page title of // page_for_posts if available as the sup header, otherwise use the site name. if (is_archive()) { if (is_category()) { $sub_header_default = single_cat_title('', false); } else { if (is_tag()) { $sub_header_default = single_tag_title('', false); } else { if (is_tax('wsuwp_university_category')) { $sub_header_default = single_term_title('', false); } else { if (is_day()) { $sub_header_default = get_the_date(); } else { if (is_month()) { $sub_header_default = get_the_date('F Y'); } else { if (is_year()) { $sub_header_default = get_the_date('Y'); } else { if (is_author()) { $sub_header_default = get_the_author(); } else { $sub_header_default = 'Archives'; } } } } } } } if (0 === $page_for_posts) { $section_title = $site_name; } else { $section_title = $posts_page_title; } } // For any posts or post types, if page_for_posts is not set or this view is // of a custom post type, use the post type's label as the sub header. Otherwise // use the title of the page_for_posts page. if (is_single()) { if (0 === $page_for_posts || !is_singular('post')) { $post = get_post(); $post_type = get_post_type_object(get_post_type($post)); $sub_header_default = $post_type->labels->name; } else { $sub_header_default = $posts_page_title; } } // If this page is a child of another page, use the subsection title as a sub // header. Otherwise, use the current page's title. if (is_page()) { if (spine_is_sub()) { $sub_header_default = $subsection_title; } else { $sub_header_default = $site_tagline; } } // If this is the front page, explicitly overwrite to defaults that may have been // changed in the is_page() area. In both the front page and in the next block for // is_home(), the site name as sup header should not link to home. if (is_front_page()) { $sup_header_default = $site_name; $sub_header_default = $site_tagline; } if (is_home() && !is_front_page()) { $sup_header_default = $site_name; if (0 === $page_for_posts) { $page_title = $site_name; $sub_header_default = $site_tagline; } else { $sub_header_default = $posts_page_title; $page_title = $posts_page_title; } } if (is_search()) { $sup_header_alternate = 'Search Terms'; $sub_header_default = 'Search Results'; $sub_header_alternate = esc_html(get_search_query()); } if (is_404()) { $sub_header_default = 'Page not found'; } // If global headers are chosen, store the default as alternate and assign the global. if ('' !== trim($global_sup_header)) { $sup_header_alternate = $sup_header_default; $sup_header_default = $global_sup_header; } if ('' !== trim($global_sub_header)) { $sub_header_alternate = $sub_header_default; $sub_header_default = $global_sub_header; } // Both sup and sub headers can be overridden with the use of post meta. if (is_singular() || is_front_page()) { $sup_override = get_post_meta(get_the_ID(), 'sup-header', true); $sub_override = get_post_meta(get_the_ID(), 'sub-header', true); if (!empty($sup_override)) { $sup_header_default = wp_kses_post($sup_override); } if (spine_get_option('articletitle_header') == 'true') { $sub_header_default = $page_title; } if (!empty($sub_override)) { $sub_header_default = wp_kses_post($sub_override); } } $sup_header_default = apply_filters('spine_sup_header_default', $sup_header_default); $sub_header_default = apply_filters('spine_sub_header_default', $sub_header_default); $main_header_elements = array('site_name' => $site_name, 'site_tagline' => $site_tagline, 'page_title' => $page_title, 'post_title' => $post_title, 'section_title' => $section_title, 'subsection_title' => $subsection_title, 'posts_page_title' => $posts_page_title, 'sup_header_default' => $sup_header_default, 'sub_header_default' => $sub_header_default, 'sup_header_alternate' => $sup_header_alternate, 'sub_header_alternate' => $sub_header_alternate); return apply_filters('spine_main_header_elements', $main_header_elements); }
$spineless = " spineless"; } else { $spineless = ""; } ?> <?php get_template_part('parts/before-jacket'); ?> <div id="jacket" class="style-<?php echo esc_attr(spine_get_option('theme_style')); ?> colors-<?php echo esc_attr(spine_get_option('secondary_colors')); ?> spacing-<?php echo esc_attr(spine_get_option('theme_spacing')); ?> "> <?php get_template_part('parts/before-binder'); ?> <div id="binder" class="<?php echo esc_attr(spine_get_option('grid_style')); echo $spineless; echo esc_attr(spine_get_option('large_format')); echo esc_attr(spine_get_option('broken_binding')); ?> "> <?php get_template_part('parts/before-main');
/** * Add excerpt style in classes to article on list views. * * @param array $classes List of classes to be added to the article element. * * @return array Modified list of classes. */ function spine_excerpt_style_classes($classes) { global $post; if (!is_singular()) { if ($post->post_excerpt) { $classes[] = "summary-excerpted"; } elseif (strstr($post->post_content, '<!--more-->')) { $classes[] = "summary-divided"; } elseif ('excerpt' === spine_get_option('archive_content_display')) { $classes[] = "summary-truncated"; } else { $classes[] = "summary-unabridged"; } if (spine_has_background_image()) { $classes[] = 'has-background-image'; } if (spine_has_featured_image()) { $classes[] = 'has-featured-image'; } if (spine_has_thumbnail_image()) { $classes[] = 'has-thumbnail-image'; } } return $classes; }
<?php if (true == spine_get_option('crop') && is_front_page()) { $cropping = ' cropped'; } else { $cropping = ''; } ?> <div id="spine" class="spine-column search-opened <?php echo esc_attr(spine_get_option('spine_color')); echo $cropping; echo esc_attr(spine_get_option('bleed')); ?> shelved"> <div id="glue" class="spine-glue"> <?php get_template_part('spine/header'); ?> <section id="spine-navigation" class="spine-navigation"> <?php get_template_part('spine/site-navigation'); ?> <?php get_template_part('spine/offsite-navigation'); ?>