Coding Standards: Remove some extra whitespace in `_wp_translate_postdata()`.

See #52627.
Built from https://develop.svn.wordpress.org/trunk@50618


git-svn-id: http://core.svn.wordpress.org/trunk@50231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-03-30 15:19:03 +00:00
parent 85c90c4e01
commit f701ad4999
2 changed files with 21 additions and 17 deletions

View File

@ -182,11 +182,14 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
$hh = ( $hh > 23 ) ? $hh - 24 : $hh; $hh = ( $hh > 23 ) ? $hh - 24 : $hh;
$mn = ( $mn > 59 ) ? $mn - 60 : $mn; $mn = ( $mn > 59 ) ? $mn - 60 : $mn;
$ss = ( $ss > 59 ) ? $ss - 60 : $ss; $ss = ( $ss > 59 ) ? $ss - 60 : $ss;
$post_data['post_date'] = sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $aa, $mm, $jj, $hh, $mn, $ss ); $post_data['post_date'] = sprintf( '%04d-%02d-%02d %02d:%02d:%02d', $aa, $mm, $jj, $hh, $mn, $ss );
$valid_date = wp_checkdate( $mm, $jj, $aa, $post_data['post_date'] ); $valid_date = wp_checkdate( $mm, $jj, $aa, $post_data['post_date'] );
if ( ! $valid_date ) { if ( ! $valid_date ) {
return new WP_Error( 'invalid_date', __( 'Invalid date.' ) ); return new WP_Error( 'invalid_date', __( 'Invalid date.' ) );
} }
$post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] ); $post_data['post_date_gmt'] = get_gmt_from_date( $post_data['post_date'] );
} }
@ -248,6 +251,7 @@ function edit_post( $post_data = null ) {
$post_ID = (int) $post_data['post_ID']; $post_ID = (int) $post_data['post_ID'];
$post = get_post( $post_ID ); $post = get_post( $post_ID );
$post_data['post_type'] = $post->post_type; $post_data['post_type'] = $post->post_type;
$post_data['post_mime_type'] = $post->post_mime_type; $post_data['post_mime_type'] = $post->post_mime_type;

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.8-alpha-50617'; $wp_version = '5.8-alpha-50618';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.