Example #1
0
	function smartline_display_postmeta() {
		
		// Get Theme Options from Database
		$theme_options = smartline_theme_options();

		// Display Date unless user has deactivated it via settings
		if ( true == $theme_options['meta_date'] ) :
		
			smartline_meta_date();
					
		endif; 
		
		// Display Author unless user has deactivated it via settings
		if ( true == $theme_options['meta_author'] ) :	
		
			smartline_meta_author();
		
		endif; 
		
		// Display Categories unless user has deactivated it via settings
		if ( true == $theme_options['meta_category'] ) :		

			smartline_meta_categories();
			
		endif;
		
		edit_post_link( esc_html__( 'Edit Post', 'smartline-lite' ));
	}
	function display_postmeta( $instance ) {
	
		// Get Widget Settings
		$defaults = $this->default_settings();
		extract( wp_parse_args( $instance, $defaults ) );
		
		// Display Date unless deactivated
		if ( $postmeta > 0 ) :
		
			smartline_meta_date();
					
		endif; 
		
		// Display Author unless deactivated
		if ( $postmeta == 2 ) :	
		
			smartline_meta_author();
		
		endif; 
		
		// Display Comments
		if ( $postmeta == 3 and comments_open() ) :
			
			smartline_meta_comments();
			
		endif;

	}