Changeset 56802 for trunk/src/wp-admin/includes/post.php
- Timestamp:
- 10/08/2023 08:08:08 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/post.php
r56752 r56802 170 170 break; 171 171 } 172 }173 174 if ( isset( $post_data['edit_date'] ) && 'false' === $post_data['edit_date'] ) {175 $post_data['edit_date'] = false;176 172 } 177 173 … … 198 194 } 199 195 200 $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); 196 /* 197 * Only assign a post date if the user has explicitly set a new value. 198 * See #59125 and #19907. 199 */ 200 $previous_date = $post_id ? get_post_field( 'post_date', $post_id ) : false; 201 if ( $previous_date && $previous_date !== $post_data['post_date'] ) { 202 $post_data['edit_date'] = true; 203 $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); 204 } else { 205 $post_data['edit_date'] = false; 206 unset( $post_data['post_date'] ); 207 unset( $post_data['post_date_gmt'] ); 208 } 201 209 } 202 210
Note: See TracChangeset
for help on using the changeset viewer.