Code Duplication    Length = 4-5 lines in 2 locations

src/wp-includes/class-wp-xmlrpc-server.php 2 locations

@@ 1291-1295 (lines=5) @@
1288
		// ignore the existing GMT date if it is empty or a non-GMT date was supplied in $content_struct,
1289
		// since _insert_post will ignore the non-GMT date if the GMT date is set
1290
		if ( isset( $content_struct['post_date_gmt'] ) && ! ( $content_struct['post_date_gmt'] instanceof IXR_Date ) ) {
1291
			if ( $content_struct['post_date_gmt'] == '0000-00-00 00:00:00' || isset( $content_struct['post_date'] ) ) {
1292
				unset( $content_struct['post_date_gmt'] );
1293
			} else {
1294
				$content_struct['post_date_gmt'] = $this->_convert_date( $content_struct['post_date_gmt'] );
1295
			}
1296
		}
1297
1298
		/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
@@ 1674-1677 (lines=4) @@
1671
		 * Ignore the existing GMT date if it is empty or a non-GMT date was supplied in $content_struct,
1672
		 * since _insert_post() will ignore the non-GMT date if the GMT date is set.
1673
		 */
1674
		if ( $post['post_date_gmt'] == '0000-00-00 00:00:00' || isset( $content_struct['post_date'] ) )
1675
			unset( $post['post_date_gmt'] );
1676
		else
1677
			$post['post_date_gmt'] = $this->_convert_date( $post['post_date_gmt'] );
1678
1679
		$this->escape( $post );
1680
		$merged_content_struct = array_merge( $post, $content_struct );