[resolved] set an admin option to true by default (3 posts)

  1. rec19
    Posted 2 years ago #

    I am designing a multisite and I would like people that comment to be registered and logged in.

    There is a checkox option in each user account in the admin/settings/discussion that says:
    'Users must be registered and logged in to comment ',

    however I want this to be true by default then remove this line.

    Does anyone know a hack to set this to true in functions.php ?

    Also, if I need to do something like this in the future, how do find out how to change certain admin values to a default value in functions.php

  2. The DB value would be comment_registration

    So you COULD put this in a mu-plugin <?php update_option( comment_registration, '1' ); ?>

    That would always keep it checked.

  3. rec19
    Posted 2 years ago #

    Thanks Ipstenu

    I didn't think I was ever going to find the answer to this having looked on the internet. This was perfect.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.