Skip to content

Commit

Permalink
Use Mozilla wordmark as standard og:image
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcook committed Oct 20, 2015
1 parent 60d6359 commit 956f08d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions themes/OneMozilla/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@
<meta property="og:url" content="<?php if (is_singular()) : the_permalink(); else : bloginfo('url'); endif; ?>">
<meta property="og:description" content="<?php fc_meta_desc(); ?>">
<?php if (is_singular()) : ?>
<?php if (has_post_thumbnail()) : ?>
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' ); ?>
<meta property="og:image" content="<?php echo $thumb['0']; ?>">
<?php endif; ?>
<?php if ($thumbs = get_attached_media('image')) : ?>
<?php foreach ($thumbs as $thumb) : ?>
<?php $thumb = wp_get_attachment_image_src( $thumb->ID, 'medium' ); ?>
<meta property="og:image" content="<?php echo $thumb['0']; ?>">
<?php endforeach; ?>
<?php endif; ?>
<?php if (has_post_thumbnail()) : ?>
<?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' ); ?>
<meta property="og:image" content="<?php echo $thumb['0']; ?>">
<?php else : ?>
<meta property="og:image" content="<?php echo get_template_directory_uri(); ?>/img/mozilla-wordmark.png">
<?php endif; ?>
<?php elseif (get_header_image()) : ?>
<meta property="og:image" content="<?php echo get_header_image(); ?>">
<?php endif; ?>
<meta property="og:image" content="<?php echo get_template_directory_uri(); ?>/img/mozilla-wordmark.png">


<meta name="title" content="<?php if (is_singular()) : single_post_title(); echo ' | '; endif; bloginfo('name'); ?>">
<meta name="description" content="<?php fc_meta_desc(); ?>">
Expand Down
Binary file added themes/OneMozilla/img/mozilla-wordmark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 956f08d

Please sign in to comment.