* @copyright Copyright (c) 2013, Nicolas GUILLAUME
* @link http://themesandco.com/customizr
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
if ( ! class_exists( 'TC_post' ) ) :
class TC_post {
static $instance;
function __construct () {
self::$instance =& $this;
//add post header, content and footer to the __loop
add_action ( '__loop' , array( $this , 'tc_post_content' ));
//posts parts actions
add_action ( '__after_content' , array( $this , 'tc_post_footer' ));
}
/**
* The default template for displaying single post content
*
* @package Customizr
* @since Customizr 3.0
*/
function tc_post_content() {
//check conditional tags : we want to show single post or single custom post types
global $post;
$tc_show_single_post_content = isset($post) && 'page' != $post -> post_type && 'attachment' != $post -> post_type && is_singular() && !tc__f( '__is_home_empty');
if ( !apply_filters( 'tc_show_single_post_content', $tc_show_single_post_content ) )
return;
//display an icon for div if there is no title
$icon_class = in_array( get_post_format(), array( 'quote' , 'aside' , 'status' , 'link' ) ) ? apply_filters( 'tc_post_format_icon', 'format-icon' ) :'' ;
ob_start();
do_action( '__before_content' );
?>
%3$s