-
-
Save srikat/873aafe7dee3f9c9dcd1 to your computer and use it in GitHub Desktop.
Customize the Author Says text in Genesis comments for Post Author: https://sridharkatakam.com/customize-the-author-says-text-in-genesis-comments-for-post-author/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Modify the author says text in comments while showing different text for comments made by author that published the post | |
add_filter( 'comment_author_says_text', 'sk_comment_author_says_text' ); | |
function sk_comment_author_says_text() { | |
global $post, $comment; | |
if ( $comment->user_id === $post->post_author ) { | |
return '- the post author says'; | |
} else { | |
return '- the commentator says'; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Modify the author says text in comments | |
add_filter( 'comment_author_says_text', 'sp_comment_author_says_text' ); | |
function sp_comment_author_says_text() { | |
return 'author says'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment