Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have an older theme that I've modified to support threaded comments. I would like the individual admins in my multisite install to be able to choose whether threaded comments are enabled. However, I'd like to restrict the ability to choose the maximum number of levels to super admins.

Looking at the capabilities, it seems that all capabilities for the settings screen are grouped together as one capability. Is it possible to restrict just this single option so that it is forced to be the same static value across the entire blog network?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

There is only one hook for threaded comments depth - thread_comments_depth_max and it sets max value for depth ( default is 10 ), you can use this filter and set max depth fox non-Super Admins number that you want.

if ( ! current_user_can( 'manage_network' ) ) {
   mamaduka_thread_comments_depth_max( $maxdeep ){
       return 5; // or any number you want
   }
   add_filter( 'thread_comments_depth_max', 'mamaduka_thread_comments_depth_max' );
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.