From 2990f8260c111123fdcaa2dfb31178e10ed497ef Mon Sep 17 00:00:00 2001 From: Thomas Guillot Date: Thu, 4 Sep 2014 13:28:24 +0200 Subject: [PATCH] _s: Update to entry meta output. See #537 * Rename function * Move edit link outside of function * Remove comments link on single post --- content-page.php | 2 +- content-search.php | 3 ++- content-single.php | 3 ++- content.php | 3 ++- inc/template-tags.php | 10 ++++------ 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/content-page.php b/content-page.php index fde16f7e..b0cc3458 100644 --- a/content-page.php +++ b/content-page.php @@ -22,6 +22,6 @@ diff --git a/content-search.php b/content-search.php index f1426040..9786ba35 100644 --- a/content-search.php +++ b/content-search.php @@ -24,6 +24,7 @@ diff --git a/content-single.php b/content-single.php index 20c5d7df..130db9a5 100644 --- a/content-single.php +++ b/content-single.php @@ -24,6 +24,7 @@ diff --git a/content.php b/content.php index 200bcc6a..9efa5cb8 100644 --- a/content.php +++ b/content.php @@ -26,6 +26,7 @@ diff --git a/inc/template-tags.php b/inc/template-tags.php index 57023a5d..7a846af1 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -134,11 +134,11 @@ function _s_category_transient_flusher() { add_action( 'edit_category', '_s_category_transient_flusher' ); add_action( 'save_post', '_s_category_transient_flusher' ); -if ( ! function_exists( '_s_entry_meta' ) ) : +if ( ! function_exists( '_s_entry_footer' ) ) : /** - * Prints HTML with meta information for the categories, tags, comments and edit link. + * Prints HTML with meta information for the categories, tags and comments. */ -function _s_entry_meta() { +function _s_entry_footer() { /* Hide category and tag text for pages */ if ( 'post' == get_post_type() ) { /* translators: used between list items, there is a space after the comma */ @@ -154,12 +154,10 @@ function _s_entry_meta() { } } - if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { + if ( ! is_single() && ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { echo ''; comments_popup_link( __( 'Leave a comment', '_s' ), __( '1 Comment', '_s' ), __( '% Comments', '_s' ) ); echo ''; } - - edit_post_link( __( 'Edit', '_s' ), '', '' ); } endif;