Skip to content

Commit

Permalink
schema first iteration
Browse files Browse the repository at this point in the history
Signed-off-by: Norik Davtian <norik@bigemployee.com>
  • Loading branch information
NorikDavtian committed Apr 25, 2014
1 parent 28eb0e9 commit 1172b49
Show file tree
Hide file tree
Showing 12 changed files with 222 additions and 96 deletions.
2 changes: 1 addition & 1 deletion archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
?>
<?php if (have_posts()) : ?>
<header class="page-header">
<h1 class="page-title">
<h1 class="page-title" <?php schema('name'); ?>>
<?php
if (is_day()) {
printf(__('Daily Archives: %s', 'bigblank'), get_the_date());
Expand Down
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
return;
}
?>
<div id="comments" class="comments-area">
<div id="comments" class="comments-area" <?php schema('', 'Comment'); ?>>
<?php if (have_comments()) : ?>
<h2 class="comments-title">
<?php
Expand Down
6 changes: 3 additions & 3 deletions content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php schema(); ?>>
<?php
// Page thumbnail and title.
bigblank_post_thumbnail();
the_title('<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->');
the_title('<header class="entry-header"><h1 class="entry-title" ' . schema('name') . '>', '</h1></header><!-- .entry-header -->');
?>
<div class="entry-content">
<div class="entry-content" <?php schema('mainContentOfPage'); ?>>
<?php
the_content();
wp_link_pages(array(
Expand Down
12 changes: 6 additions & 6 deletions content-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('profile'); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class('profile'); ?> <?php schema('', 'Person'); ?>>
<header class="entry-header">
<?php if (has_post_thumbnail()): ?>
<div id="featured-header">
<?php the_post_thumbnail('post-thumbnail', 'itemprop=image'); ?>
</div>
<?php endif; ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php the_title('<h1 class="entry-title" ' . schema('name') . '>', '</h1>'); ?>
<?php $title = get_post_meta(get_the_ID(), 'title', true); ?>
<?php $facebook = get_post_meta(get_the_ID(), 'facebook', true); ?>
<?php $twitter = get_post_meta(get_the_ID(), 'twitter', true); ?>
<?php $google_plus = get_post_meta(get_the_ID(), 'google+', true); ?>
<?php $instagram = get_post_meta(get_the_ID(), 'instagram', true); ?>
<?php $youtube = get_post_meta(get_the_ID(), 'youtube', true); ?>
<?php $pinterest = get_post_meta(get_the_ID(), 'pinterest', true); ?>
<?php bigblank_print($title, '<h2><em>(', ')</em></h2>'); ?>
<?php bigblank_print($title, '<h2 ' . schema('jobTitle') . '><em>(', ')</em></h2>'); ?>
<?php bigblank_print($facebook, '<a href="', '"><i class="fa fa-facebook-square"></i></a>'); ?>
<?php bigblank_print($twitter, '<a href="', '"><i class="fa fa-twitter-square"></i></a>'); ?>
<?php bigblank_print($google_plus, '<a href="', '"><i class="fa fa-google-plus-square"></i></a>'); ?>
<?php bigblank_print($instagram, '<a href="', '"><i class="fa fa-instagram"></i></a>'); ?>
<?php bigblank_print($youtube, '<a href="', '"><i class="fa fa-youtube-play"></i></a>'); ?>
<?php bigblank_print($pinterest, '<a href="', '"><i class="fa fa-pinterest"></i></a>'); ?>
<?php if (has_term('', 'department')) : ?>
<span class="entry-meta entry-categories department">
<span class="entry-meta entry-categories department">
<?php echo get_the_term_list($post->ID, 'department', '', ', ', ''); ?>
</span>
</span>
<?php endif; ?>
</header>
<section class="entry-content">
<section class="entry-content" <?php schema('description'); ?>>
<?php the_content(); ?>
<?php edit_post_link(__('Edit', 'bigblank')); ?>
</section>
Expand Down
10 changes: 5 additions & 5 deletions content-team.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php schema(); ?>>
<?php
// Page thumbnail and title.
bigblank_post_thumbnail();
the_title('<header class="entry-header"><h1 class="entry-title">', '</h1></header><!-- .entry-header -->');
the_title('<header class="entry-header"><h1 class="entry-title" ' . schema('name') . '>', '</h1></header><!-- .entry-header -->');
?>
<div class="entry-content">
<div class="entry-content" <?php schema('mainContentOfPage'); ?>>
<?php
the_content();
edit_post_link(__('Edit', 'bigblank'));
Expand Down Expand Up @@ -41,9 +41,9 @@
?>
<?php the_content('Get to know ' . get_the_title()); ?>
<?php if (has_term('', 'department')) : ?>
<span class="entry-meta entry-categories department">
<span class="entry-meta entry-categories department">
<?php echo get_the_term_list($post->ID, 'department', '', ', ', ''); ?>
</span>
</span>
<?php endif; ?>
</div>
<?php edit_post_link(__('Edit', 'bigblank')); ?>
Expand Down
22 changes: 10 additions & 12 deletions content.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php schema(); ?>>
<?php bigblank_post_thumbnail(); ?>
<header class="entry-header">
<?php
if (is_single()) :
the_title('<h1 class="entry-title">', '</h1>');
the_title('<h1 class="entry-title" ' . schema('name') . '>', '</h1>');
else :
the_title('<h1 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h1>');
the_title('<h1 class="entry-title" ' . schema('name') . '><a href="' . esc_url(get_permalink()) . '" rel="bookmark" ' . schema('url') . '>', '</a></h1>');
endif;
?>
<div class="entry-meta">
Expand All @@ -30,11 +30,11 @@
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<?php if (is_search()) : ?>
<div class="entry-summary">
<div class="entry-summary" <?php schema('description'); ?>>
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<div class="entry-content" <?php schema('articleBody'); ?>>
<?php
the_content(sprintf(__('Continue Reading %s <span class="meta-nav">&rarr;</span>', 'bigblank'), get_the_title()));
wp_link_pages(array(
Expand All @@ -60,18 +60,16 @@
}
?>
<?php if (is_singular() && get_the_author_meta('description') && is_multi_author() && get_post_type() == "post") : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
<div class="author-info">
<div class="author-info" <?php schema('author', 'Person'); ?>>
<div class="author-avatar">
<?php echo get_avatar(get_the_author_meta('user_email'), apply_filters('gravatar', 128)); ?>
</div><!-- .author-avatar -->
<div class="author-description">
<h2><?php printf(__('About %s', 'betheme'), get_the_author()); ?></h2>
<h2 <?php schema('name'); ?>><?php printf(__('About %s', 'betheme'), get_the_author()); ?></h2>
<p><?php the_author_meta('description'); ?></p>
<div class="author-link">
<a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" rel="author">
<?php printf(__('View all posts by %s <span class="meta-nav">&rarr;</span>', 'betheme'), get_the_author()); ?>
</a>
</div><!-- .author-link -->
<a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?>" class="author-link" rel="author" <?php schema('url'); ?>>
<?php printf(__('View all posts by %s <span class="meta-nav">&rarr;</span>', 'betheme'), get_the_author()); ?>
</a><!-- .author-link -->
</div><!-- .author-description -->
</div><!-- .author-info -->
<?php endif; ?>
Expand Down
10 changes: 5 additions & 5 deletions image.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
// Start the Loop.
while (have_posts()) : the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> <?php schema(); ?>>
<header class="entry-header">
<?php the_title('<h1 class="entry-title">', '</h1>'); ?>
<?php the_title('<h1 class="entry-title" ' . schema('name') . '>', '</h1>'); ?>
<div class="entry-meta">
<time class="entry-date" datetime="<?php echo esc_attr(get_the_date('c')); ?>"><?php echo esc_html(get_the_date()); ?></time>
<a href="<?php echo wp_get_attachment_url(); ?>" class="full-size-link"><?php echo $metadata['width']; ?> &times; <?php echo $metadata['height']; ?></a>
<a href="<?php echo get_permalink($post->post_parent); ?>" class="parent-post-link" rel="gallery"><?php echo get_the_title($post->post_parent); ?></a>
<?php edit_post_link(__('Edit', 'bigblank')); ?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<div class="entry-attachment">
<div class="entry-content" <?php schema('mainContentOfPage'); ?>>
<div class="entry-attachment" <?php schema('', 'ImageObject'); ?>>
<div class="attachment">
<?php bigblank_the_attached_image(); ?>
</div><!-- .attachment -->
<?php if (has_excerpt()) : ?>
<div class="entry-caption">
<div class="entry-caption" <?php schema('caption'); ?>>
<?php the_excerpt(); ?>
</div><!-- .entry-caption -->
<?php endif; ?>
Expand Down
23 changes: 12 additions & 11 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function bigblank_post_nav() {
*/
function bigblank_posted_on() {
// Set up and print post meta information.
printf('<a href="%1$s" class="entry-date" rel="bookmark"><time class="published" datetime="%2$s">%3$s</time></a> <a class="author vcard url fn n" href="%4$s" rel="author">%5$s</a>', esc_url(get_permalink()), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
printf('<a href="%1$s" class="entry-date" rel="bookmark" ' . schema('url') . '><time class="published" datetime="%2$s" ' . schema('datePublished') . '>%3$s</time></a> <a class="author vcard url fn n" href="%4$s" rel="author" ' . schema('author') . '>%5$s</a>', esc_url(get_permalink()), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author());
}

endif;
Expand Down Expand Up @@ -265,9 +265,9 @@ function bigblank_post_thumbnail() {
endif;
?>
</div>
<?php else : ?>
<?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('post-thumbnail', 'itemprop=image'); ?>
<?php the_post_thumbnail('post-thumbnail', 'itemprop=image'); ?>
</a>
<?php
endif; // End is_singular()
Expand Down Expand Up @@ -297,7 +297,7 @@ function bigblank_layout_metabox($post) {
<input type="radio" name="bigblank_post_layout"
value="<?php echo esc_attr($layout['value']); ?>" <?php checked($post_layout, $layout['value']); ?> />
<span>
<?php echo $layout['label']; ?>
<?php echo $layout['label']; ?>
<br />
<img src="<?php echo esc_url($layout['thumbnail']); ?>" width="136" height="122" alt="" />
</span>
Expand Down Expand Up @@ -404,30 +404,31 @@ function bigblank_comments_open($open, $post_id) {

add_filter('comments_open', 'bigblank_comments_open', 10, 2);


/**
* Social Media Share Buttons Template Inspired by Ghost Kasper Theme
* @param string $url link to share
* @param string $title the post title to be shared
* @link https://github.com/rosario/kasper
*/

function bigblank_share_post($url, $title) {
?>
?>
<section class="share">
<h5>Share</h5>
<a class="fa fa-twitter fa-lg" href="http://twitter.com/share?text=<?php echo urlencode($title) ?>&amp;url=<?php echo urlencode($url) ?>"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');
return false;">
<span class="screen-reader-text">Twitter</span>
</a>
<a class="fa fa-facebook-square fa-lg" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($url) ?>"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
onclick="window.open(this.href, 'facebook-share', 'width=580,height=296');
return false;">
<span class="screen-reader-text">Facebook</span>
</a>
<a class="fa fa-google-plus-square fa-lg" href="https://plus.google.com/share?url=<?php echo urlencode($url) ?>"
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');
return false;">
<span class="screen-reader-text">Google+</span>
</a>
</section>
<?php
<?php
}
Loading

0 comments on commit 1172b49

Please sign in to comment.