Skip to content

Filter: apple_news_is_post_in_sync

kevinfodness edited this page Oct 23, 2020 · 1 revision

apply_filters( 'apple_news_is_post_in_sync', bool $in_sync, int $post_id, string $json, array $meta, array $bundles )

Allows for custom logic to determine if a post is in sync or not.

Parameters

$in_sync

(bool) Whether the current post is in sync or not.

$post_id

(int) The ID of the post being checked.

$json

(string) The JSON for the current article.

$meta

(array) Metadata for the current article.

$bundles

(array) Any bundles that will be sent with the current article.

More Information

By default, the plugin simply compares the last modified time to the last time it was pushed to Apple News. If you want to apply custom logic, you can do that by modifying $in_sync. The most common use case is to not update posts based on custom criteria.

Source

admin/apple-actions/index/class-push.php

Clone this wiki locally