Skip to content

Commit

Permalink
Remove dates from REST pushes and pulls.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Nov 21, 2023
1 parent 4d4f4f5 commit 400639c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions includes/classes/DistributorPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,15 @@ protected function to_pull_list( $args = array() ) {
protected function to_rest( $rest_args = array() ) {
$post_data = $this->post_data();

/*
* Unset dates.
*
* External connections do not allow for the pulling or pushing of
* scheduled posts so these can be ignored.
*/
unset( $post_data['date'] );
unset( $post_data['date_gmt'] );

if ( ! empty( $post_data['parent'] ) ) {
$post_data['distributor_original_post_parent'] = (int) $post_data['parent'];
}
Expand Down

0 comments on commit 400639c

Please sign in to comment.