mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Use wp_count_posts() to determine availabel statuses for get_available_post_statuses(). fixes #6654 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@7638 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -506,10 +506,9 @@ function _relocate_children( $old_ID, $new_ID ) {
|
||||
}
|
||||
|
||||
function get_available_post_statuses($type = 'post') {
|
||||
global $wpdb;
|
||||
$stati = wp_count_posts($type);
|
||||
|
||||
$stati = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT post_status FROM $wpdb->posts WHERE post_type = %s", $type));
|
||||
return $stati;
|
||||
return array_keys(get_object_vars($stati));
|
||||
}
|
||||
|
||||
function wp_edit_posts_query( $q = false ) {
|
||||
|
||||
Reference in New Issue
Block a user