-
-
Save billerickson/cd94d4b2c8669e1d7eddf7dc34cb99bf to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Remove URL field from comment form | |
* | |
*/ | |
function be_remove_url_from_comment_form( $fields ) { | |
unset($fields['url']); | |
return $fields; | |
} | |
add_filter( 'comment_form_default_fields', 'be_remove_url_from_comment_form' ); | |
/** | |
* Remove URL from existing comments | |
* | |
*/ | |
function be_remove_url_from_existing_comments( $author_link, $author ) { | |
return $author; | |
} | |
add_filter( 'get_comment_author_link', 'be_remove_url_from_existing_comments', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment