Changeset 56176 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 07/09/2023 08:05:43 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r56123 r56176 136 136 $published_statuses = array( 'publish', 'future' ); 137 137 138 // Posts 'submitted for approval' are submitted to $_POST the same as if they were being published. 139 // Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts. 138 /* 139 * Posts 'submitted for approval' are submitted to $_POST the same as if they were being published. 140 * Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts. 141 */ 140 142 if ( isset( $post_data['post_status'] ) 141 143 && ( in_array( $post_data['post_status'], $published_statuses, true ) … … 1444 1446 } 1445 1447 1446 // If the user wants to set a new name -- override the current one. 1447 // Note: if empty name is supplied -- use the title instead, see #6072. 1448 /* 1449 * If the user wants to set a new name -- override the current one. 1450 * Note: if empty name is supplied -- use the title instead, see #6072. 1451 */ 1448 1452 if ( ! is_null( $name ) ) { 1449 1453 $post->post_name = sanitize_title( $name ? $name : $title, $post->ID ); … … 2074 2078 return edit_post( wp_slash( $post_data ) ); 2075 2079 } else { 2076 // Non-drafts or other users' drafts are not overwritten. 2077 // The autosave is stored in a special post revision for each user. 2080 /* 2081 * Non-drafts or other users' drafts are not overwritten. 2082 * The autosave is stored in a special post revision for each user. 2083 */ 2078 2084 return wp_create_post_autosave( wp_slash( $post_data ) ); 2079 2085 }
Note: See TracChangeset
for help on using the changeset viewer.