[wp-hackers] set wordpress privacy from functions.php
Michael D Adams
mda at blogwaffe.com
Mon Mar 7 18:24:17 UTC 2011
On Mon, Mar 7, 2011 at 10:06 AM, Barry Ceelen <barry at multipop.org> wrote:
> The setting you're looking for is 'blog_public'
>
> Public = 1
> Private = 0
>
> So you could do something along these lines this in your functions file or a plugin:
>
> add_action( 'init', 'private' );
>
> function keep_private() {
> update_option( 'blog_public', '0' );
> }
I would just filter it since you want different values on dev/prod.
add_filter( 'pre_option_blog_public', '__return_zero' );
More information about the wp-hackers
mailing list