Changeset 12987 for trunk/wp-includes/post.php
- Timestamp:
- 02/06/2010 10:07:57 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r12948 r12987 1977 1977 // post name. 1978 1978 if ( !isset($post_name) || empty($post_name) ) { 1979 if ( !in_array( $post_status, array( 'draft', 'pending' ) ) )1979 if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) 1980 1980 $post_name = sanitize_title($post_title); 1981 1981 else … … 1990 1990 1991 1991 if ( empty($post_date_gmt) || '0000-00-00 00:00:00' == $post_date_gmt ) { 1992 if ( !in_array( $post_status, array( 'draft', 'pending' ) ) )1992 if ( !in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) 1993 1993 $post_date_gmt = get_gmt_from_date($post_date); 1994 1994 else … … 2090 2090 } 2091 2091 2092 if ( empty($data['post_name']) && !in_array( $data['post_status'], array( 'draft', 'pending' ) ) ) {2092 if ( empty($data['post_name']) && !in_array( $data['post_status'], array( 'draft', 'pending', 'auto-draft' ) ) ) { 2093 2093 $data['post_name'] = sanitize_title($data['post_title'], $post_ID); 2094 2094 $wpdb->update( $wpdb->posts, array( 'post_name' => $data['post_name'] ), $where ); … … 2173 2173 2174 2174 // Drafts shouldn't be assigned a date unless explicitly done so by the user 2175 if ( in_array($post['post_status'], array('draft', 'pending' )) && empty($postarr['edit_date']) &&2175 if ( in_array($post['post_status'], array('draft', 'pending', 'auto-draft')) && empty($postarr['edit_date']) && 2176 2176 ('0000-00-00 00:00:00' == $post['post_date_gmt']) ) 2177 2177 $clear_date = true; … … 2277 2277 */ 2278 2278 function wp_unique_post_slug($slug, $post_ID, $post_status, $post_type, $post_parent) { 2279 if ( in_array( $post_status, array( 'draft', 'pending' ) ) )2279 if ( in_array( $post_status, array( 'draft', 'pending', 'auto-draft' ) ) ) 2280 2280 return $slug; 2281 2281
Note: See TracChangeset
for help on using the changeset viewer.