Skip to content

Commit

Permalink
Added func to functions.php to output fall back image for messed up p…
Browse files Browse the repository at this point in the history
…ost thumbnail entries

Fixes #35

//
------------------------------------------------------------------------
----------------------------
// Album Review titles -- append "Album Review:" to titles - Andre
//
------------------------------------------------------------------------
----------------------------
function fallback_thumbnail_image( $tag_or_src ) {
$thumbnail_fallback_tag = '<img
src="http://images.earmilk.com/delivery.png" alt="Really hot thumbnail
for this article post!" />';
$thumbnail_fallback_src = 'http://images.earmilk.com/delivery.png';
$response = '';
if ( $tag_or_src == 'src' ) {
$response = $thumbnail_fallback_src;
} elseif ( $tag_or_src == 'tag' ) {
$response = $thumbnail_fallback_tag;
} else {
$response = $thumbnail_fallback_tag;
}
return $response;
}
  • Loading branch information
Andre Bulatov committed Feb 23, 2016
1 parent 59d8785 commit 079a189
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions wp-content/themes/mag-wp/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,20 @@ function append_album_review_to_title( $title ) {
if(function_exists('add_filter')) {
add_filter('the_title', 'append_album_review_to_title');
}

// ----------------------------------------------------------------------------------------------------
// Album Review titles -- append "Album Review:" to titles - Andre
// ----------------------------------------------------------------------------------------------------
function fallback_thumbnail_image( $tag_or_src ) {
$thumbnail_fallback_tag = '<img src="http://images.earmilk.com/delivery.png" alt="Really hot thumbnail for this article post!" />';
$thumbnail_fallback_src = 'http://images.earmilk.com/delivery.png';
$response = '';
if ( $tag_or_src == 'src' ) {
$response = $thumbnail_fallback_src;
} elseif ( $tag_or_src == 'tag' ) {
$response = $thumbnail_fallback_tag;
} else {
$response = $thumbnail_fallback_tag;
}
return $response;
}

0 comments on commit 079a189

Please sign in to comment.