WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. rec19
    Member
    Posted 5 months 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
    Member
    Posted 5 months 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.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.