-
-
Save dhananjaygbhardwaj/8b2db2cfc1a417f7716caddf75f5ff2f to your computer and use it in GitHub Desktop.
Customize the text before the comment form in WordPress. Note: Logged in users will not see this text.
This file contains hidden or 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
<?php //remove this line | |
add_filter( 'comment_form_defaults', 'cd_pre_comment_text' ); | |
/** | |
* Change the text output that appears before the comment form | |
* Note: Logged in user will not see this text. | |
* | |
* @author Carrie Dils <http://www.carriedils.com> | |
* @uses comment_notes_before <http://codex.wordpress.org/Function_Reference/comment_form> | |
* | |
*/ | |
function cd_pre_comment_text( $arg ) { | |
$arg['comment_notes_before'] = "Want to see your ugly mug by your comment? Get a free custom avatar at <a href='http://www.gravatar.com' target='_blank' >Gravatar</a>."; | |
return $arg; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment