[wp-trac] [WordPress Trac] #16614: Allow blog privacy to be set in wp_config.php

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 22 18:34:13 UTC 2011


#16614: Allow blog privacy to be set in wp_config.php
-------------------------+-----------------------------
 Reporter:  kanuck54     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  3.1
 Severity:  normal       |   Keywords:
-------------------------+-----------------------------
 I imagine this scenario is fairly common: I regularly reverse-migrate data
 from the `client_live` database to the `client_dev` database on a client
 site, so that I'm always working with the very latest live data when
 working on their custom theme.

 In this scenario, the `WP_HOME` and `WP_SITEURL` constants in
 `wp_config.php` save me a ton of work; they very nearly foolproof the
 entire back-and-forth process.

 The one notable problem is blog privacy. Since `blog_public` is an option
 stored in the database, every time I reverse-migrate, our dev site
 switches from private to public, and I need to remember to switch it back
 so I don't accidentally send out pingbacks and notify a site where our
 development environment is located.

 I can mitigate this with (in order of increasing foolproof-itude) a theme
 function, or a plug-in, or a drop-in plug-in; but I think it would make
 the ''most'' sense if I could set this in `wp_config.php`, since, like
 `WP_DEBUG`, `WP_HOME` and `WP_SITEURL`, it's something that will
 frequently differ between two otherwise identical incarnations of a site.

 As I see it, defining a `WP_BLOG_PUBLIC` constant in `wp_config.php` could
 have the same effect as setting `WP_HOME` or `WP_SITEURL`; the option
 would still be visible in the Privacy Settings in the administration panel
 (`options-privacy.php`), but you wouldn't be able to change it.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16614>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list