Trouble with using hook to hide Persistent Mode options
-
After adding the following to my functions.php file, the “Use persistent mode” checkbox was still visible to site administrators:
add_filter(‘disable_comments_allow_persistent_mode’, ‘__return_false’);
On line #354 of disable-comments.php, it appears the filter is not applied when a WordPress install is not in Multisite mode:
return ( !is_multisite() || ( !$this->networkactive && apply_filters( 'disable_comments_allow_persistent_mode', true ) ) );I was able to hide the “Use persistent mode” checkbox afterI made the following edit to line #354:
return ( !is_multisite() && apply_filters( 'disable_comments_allow_persistent_mode', true ) || ( !$this->networkactive && apply_filters( 'disable_comments_allow_persistent_mode', true ) ) );Is this a possible bug? I am running WP 3.5.1, non-multisite, on the Genesis Framework.
Thanks!
The topic ‘Trouble with using hook to hide Persistent Mode options’ is closed to new replies.