|
@@ 144-148 (lines=5) @@
|
| 141 |
|
if ( $this->has_sync_item( $post_ID ) ) { |
| 142 |
|
return; |
| 143 |
|
} |
| 144 |
|
if ( $this->has_sync_item( 'new' ) && 'new' !== $post_ID ) { |
| 145 |
|
$this->sync_items[ $post_ID ] = $this->sync_items['new']; |
| 146 |
|
unset( $this->sync_items['new'] ); |
| 147 |
|
return; |
| 148 |
|
} |
| 149 |
|
$this->sync_items[ $post_ID ] = new Jetpack_Sync_Item( 'save_post' ); |
| 150 |
|
} |
| 151 |
|
|
|
@@ 325-328 (lines=4) @@
|
| 322 |
|
} |
| 323 |
|
|
| 324 |
|
public function add_sync_item( $post_id, $sync_item ) { |
| 325 |
|
if ( $this->has_sync_item( 'new' ) && ! $this->has_sync_item( $post_id ) ) { |
| 326 |
|
$this->sync_items[ $post_id ] = $this->sync_items['new']; |
| 327 |
|
unset( $this->sync_items['new'] ); |
| 328 |
|
} |
| 329 |
|
$this->sync_items[ $post_id ]->add_sync_item( $sync_item ); |
| 330 |
|
} |
| 331 |
|
|