Super Admins can always comment
The snippet can be accessed without any authentication.
Authored by
Erick Hitter
<?php
/**
* Keep comments open for super admins (me)
*/
function eth_allow_me_to_comment( $open ) {
if ( ! is_user_logged_in() ) {
return $open;
}
if ( is_super_admin() ) {
$open = true;
}
return $open;
}
add_filter( 'comments_open', 'eth_allow_me_to_comment' );
Please register or sign in to comment