themes-wordpress/scratchpad/template-parts/content-link.php
2018-02-27 14:24:29 +11:00

55 lines
1.6 KiB
PHP

<?php
/**
* Template part for displaying posts with the Link format
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Scratchpad
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php scratchpad_sticky(); ?>
<header class="entry-header">
<?php
/* Uses URL from post's link for title link, unless one doesn't exist. */
the_title( '<h2 class="entry-title"><a href="' . esc_url( scratchpad_get_link_url() ) . '" rel="bookmark">', '</a></h2>' ); ?>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'scratchpad' ), array( 'span' => array( 'class' => array() ) ) ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
) );
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'scratchpad' ),
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
?>
</div><!-- .entry-content -->
<footer class="entry-meta">
<?php scratchpad_post_format(); ?>
<?php scratchpad_posted_on(); ?>
<?php
edit_post_link(
sprintf(
/* translators: %s: Name of current post */
esc_html__( 'Edit %s', 'scratchpad' ),
the_title( '<span class="screen-reader-text">"', '"</span>', false )
),
'<span class="edit-link"><span class="sep">&bull;</span>',
'</span>'
);
?>
</footer><!-- .entry-footer -->
<?php get_template_part( 'images/inline', 'binderclip.svg' ); ?>
</article><!-- #post-## -->