WordPress.org

Support

Support » Multisite » [Resolved] set an admin option to true by default

[Resolved] set an admin option to true by default

  • 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

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    Thanks Ipstenu

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] set an admin option to true by default’ is closed to new replies.
Skip to toolbar