Created
August 6, 2014 20:16
-
-
Save Spoygg/479bd97cc0c589d9ce7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$templates = array(); | |
ob_start(); | |
//*** AUTHOR | |
?><a class="post_author" href="%author_url%">%author%</a><?php | |
$templates['author'] = ob_get_contents(); | |
ob_clean(); | |
//*** CATEGORIES | |
?><div class="post_categories">%categories%</div><?php | |
$templates['categories'] = ob_get_contents(); | |
ob_clean(); | |
//*** COMMENTS COUNT | |
?><div class="post_comments">%comments_count%</div><?php | |
$templates['comments_count'] = ob_get_contents(); | |
ob_clean(); | |
//*** CONTENTS | |
?><div class="post_content">post content customized %contents%</div><?php | |
$templates['contents'] = ob_get_contents(); | |
ob_clean(); | |
//*** DATE | |
?><time class="post_date" datetime="%date_iso%">%date%</time><?php | |
$templates['date'] = ob_get_contents(); | |
ob_clean(); | |
?><time class="post_update" datetime="%date_iso%">%update%</time><?php | |
$templates['update'] = ob_get_contents(); | |
ob_clean(); | |
//*** EXCERPT | |
?><div class="post_excerpt">this is some post excerpt customized %excerpt%</div><?php | |
$templates['excerpt'] = ob_get_contents(); | |
ob_clean(); | |
//*** FEATURED IMAGE | |
?><div class="post_thumbnail">does this get called at all %image%</div><?php | |
$templates['featured_image'] = ob_get_contents(); | |
ob_clean(); | |
//*** TAGS | |
?><div class="post_tags">%tags%</div><?php | |
$templates['tags'] = ob_get_contents(); | |
ob_clean(); | |
//*** TITLE | |
?><h1 class="post_title"><a href="%permalink%">%title%</a></h1><?php | |
$templates['title'] = ob_get_contents(); | |
ob_clean(); | |
ob_end_clean(); | |
return $templates; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment