<?php
/**
 * Read more
 *
 * This template can be overridden by copying it to yourtheme/smart-post-show-pro/templates/item/read-more.php
 *
 * @package    Smart_Post_Show_Pro
 * @subpackage Smart_Post_Show_Pro/public
 */

$read_more_label_addition = apply_filters( 'sp_pcp_read_more_label_addition', get_the_title( $post->ID ), $post );
$pcp_read_label           = sprintf( $pcp_read_label, $read_more_label_addition );

if ( 'text_link' === $read_more_type ) {
	?>

	<?php if ( 'popup' === $pcp_page_link_type ) { ?>
		<a class="popup-modal pcp-readmore-link" target="<?php echo esc_attr( $readmore_target ); ?>" <?php echo esc_html( $pcp_link_rel_text ); ?>>
	<?php } elseif ( 'none' === $pcp_page_link_type ) { ?>
		<a class="pcp-readmore-link pcp-readmore-link-none" href="#" <?php echo esc_html( $pcp_link_rel_text ); ?>>
	<?php } else { ?>
		<a class="pcp-readmore-link" href="<?php the_permalink( $post ); ?>" target="<?php echo esc_attr( $readmore_target ); ?>" ta rel="<?php echo esc_attr( $pcp_link_rel ); ?>" href="<?php the_permalink( $post ); ?>" <?php echo esc_html( $pcp_link_rel_text ); ?>>
	<?php } ?>

	<?php echo esc_html( $pcp_read_label ); ?> </a>

	<?php
} else {
	?>
<div class="sp-pcp-readmore">
	<?php if ( 'popup' === $pcp_page_link_type ) { ?>
		<a class="popup-modal pcp-readmore-link" href="<?php the_permalink( $post ); ?>" target="<?php echo esc_attr( $readmore_target ); ?>" <?php echo esc_html( $pcp_link_rel_text ); ?>>
	<?php } elseif ( 'none' === $pcp_page_link_type ) { ?>
		<a class="pcp-readmore-link pcp-readmore-link-none" href="#" <?php echo esc_html( $pcp_link_rel_text ); ?>>
	<?php } else { ?>
		<a class="pcp-readmore-link" target="<?php echo esc_attr( $readmore_target ); ?>" href="<?php the_permalink( $post ); ?>" <?php echo esc_html( $pcp_link_rel_text ); ?>>
	<?php } ?>
	<?php echo esc_html( $pcp_read_label ); ?> </a>
</div>
	<?php
}
