<?php

/**
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * It is also available at this URL: http://www.gnu.org/licenses/gpl-3.0.txt
 */

if (!function_exists('venice_lite_after_content_function')) {

	function venice_lite_after_content_function() {

		if ( venice_lite_get_archive_title() || is_page_template() || is_search() || is_home() ) {

			if ( !venice_lite_setting('venicelite_view_readmore') || venice_lite_setting('venicelite_view_readmore') == "on" ) {

				the_excerpt();

			} else if (venice_lite_setting('venicelite_view_readmore') == "off" ) {

				the_content();

			}

		} else {

			the_content();

			the_tags( '<footer class="tags"><strong>'. esc_html__('Tags:','venice-lite') . '</strong> ', ', ', '</footer>' );

			if ( venice_lite_setting('venicelite_view_author','on') == 'on' && is_singular('post') ) :

				do_action('venice_lite_post_author');

			endif;

			if ( ( !venice_lite_setting('venicelite_view_comments') || venice_lite_setting('venicelite_view_comments') == "on" ) && comments_open() ) :

				comments_template();

			endif;

		}


	}

	add_action( 'venice_lite_after_content', 'venice_lite_after_content_function', 10, 2 );

}

?>
