[wp-trac] [WordPress Trac] #11375: allow to disable the private status
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 9 20:54:17 UTC 2009
#11375: allow to disable the private status
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: ryan
Type: enhancement | Status: new
Priority: normal | Milestone: 3.0
Component: Query | Version: 2.9
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
The private status generates all sorts of OR clauses in SQL queries, which
is bad from a performance standpoint.
Blogs that do not have any private posts or pages should have the ability
to disable the feature altogether, in order to optimize the SQL
statements.
Adding an option in a Settings page arguably is plugin material, but WP
doesn't currently allow to remove the status altogether.
Were it to be implemented, WP should keep a trace (in a transient) of the
following:
{{{
$has_private_posts = (bool) $wpdb->get_var("SELECT EXISTS 1 FROM
$wpdb->posts WHERE post_status = 'private';");
}}}
checking its value and disabling the type = private type accordingly in
non-admin areas would significantly enhance the user experience for those
who never use such things.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11375>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list