summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/post.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/includes/post.php')
-rw-r--r--wp-admin/includes/post.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php
index 2ee6210..aa1e833 100644
--- a/wp-admin/includes/post.php
+++ b/wp-admin/includes/post.php
@@ -74,7 +74,7 @@ function edit_post() {
if (!isset( $_POST['ping_status'] ))
$_POST['ping_status'] = 'closed';
- foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) {
+ foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {
$_POST['edit_date'] = '1';
break;
@@ -288,7 +288,7 @@ function wp_write_post() {
if (!isset( $_POST['ping_status'] ))
$_POST['ping_status'] = 'closed';
- foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) {
+ foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {
$_POST['edit_date'] = '1';
break;
@@ -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 ) {