allow to disable the private status
|Reported by:||Denis-de-Bernardy||Owned by:||ryan|
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.
Change History (14)
2 years ago
- Keywords needs-patch performance added; dev-feedback featured editorial-flow removed