|
@@ -245,3 +245,59 @@ add_filter( 'the_content_more_link', 'spearhead_continue_reading_link' );
|
|
|
|
|
|
// Filter the excerpt
|
|
// Filter the excerpt
|
|
add_filter( 'get_the_excerpt', 'spearhead_the_excerpt' );
|
|
add_filter( 'get_the_excerpt', 'spearhead_the_excerpt' );
|
|
|
|
+ * Post footer meta
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+if ( ! function_exists( 'spearhead_entry_meta_footer' ) ) :
|
|
|
|
+ /**
|
|
|
|
+ * Prints HTML with meta information for the categories, tags and comments.
|
|
|
|
+ */
|
|
|
|
+ function spearhead_entry_meta_footer() {
|
|
|
|
+
|
|
|
|
+ spearhead_posted_on();
|
|
|
|
+
|
|
|
|
+ // Edit post link.
|
|
|
|
+ edit_post_link(
|
|
|
|
+ sprintf(
|
|
|
|
+ wp_kses(
|
|
|
|
+ /* translators: %s: Name of current post. Only visible to screen readers. */
|
|
|
|
+ __( 'Edit <span class="screen-reader-text">%s</span>', 'seedlet' ),
|
|
|
|
+ array(
|
|
|
|
+ 'span' => array(
|
|
|
|
+ 'class' => array(),
|
|
|
|
+ ),
|
|
|
|
+ )
|
|
|
|
+ ),
|
|
|
|
+ get_the_title()
|
|
|
|
+ ),
|
|
|
|
+ '<span class="edit-link">',
|
|
|
|
+ '</span>'
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+endif;
|
|
|
|
+
|
|
|
|
+if ( ! function_exists( 'spearhead_posted_on' ) ) :
|
|
|
|
+ /**
|
|
|
|
+ * Prints HTML with meta information for the current post-date/time.
|
|
|
|
+ */
|
|
|
|
+ function spearhead_posted_on() {
|
|
|
|
+ $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
|
|
|
|
+ if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
|
|
|
|
+ $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ $time_string = sprintf(
|
|
|
|
+ $time_string,
|
|
|
|
+ esc_attr( get_the_date( DATE_W3C ) ),
|
|
|
|
+ esc_html( get_the_date( 'M d Y' ) ),
|
|
|
|
+ esc_attr( get_the_modified_date( DATE_W3C ) ),
|
|
|
|
+ esc_html( get_the_modified_date() )
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ printf(
|
|
|
|
+ '<span class="posted-on"><a href="%1$s" rel="bookmark">%2$s</a></span>',
|
|
|
|
+ esc_url( get_permalink() ),
|
|
|
|
+ $time_string
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+endif;
|