post_parent && 0 !== $attachment_after->post_parent ) { /** * Fires when an existing attachment is added to a post for the first time * * @since 1.6.3 * @since-jetpack 6.6.0 * * @param int $attachment_id Attachment ID. * @param \WP_Post $attachment_after Attachment post object after the update. */ do_action( 'jetpack_sync_save_attach_attachment', $attachment_id, $attachment_after ); } else { /** * Fires when the client needs to sync an updated attachment * * @since 1.6.3 * @since-jetpack 4.9.0 * * @param int $attachment_id Attachment ID. * @param \WP_Post $attachment_after Attachment post object after the update. * * Previously this action was synced using jetpack_sync_save_add_attachment action. */ do_action( 'jetpack_sync_save_update_attachment', $attachment_id, $attachment_after ); } } }