[wp-hackers] set wordpress privacy from functions.php
Otto
otto at ottodestruct.com
Mon Mar 7 18:22:48 UTC 2011
On Mon, Mar 7, 2011 at 12:06 PM, 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' );
> }
Better way:
add_filter( 'pre_option_blog_public', '__return_zero' );
-Otto
More information about the wp-hackers
mailing list