Apple News Auto Retry
Auto retry pending Apple News articles
by Metro.co.uk · github.com/mailonline/mdt-apple-news-auto-retry · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/mailonline/mdt-apple-news-auto-retry/archive/refs/heads/master.zipSets up and manages automatic push retries for Apple News articles that were generated using the Publish to Apple News by Alley Interactive
Installation
Download the latest release and include it within your plugins folder and enable as normal. This plugin has a dependency on the Publish to Apple News plugin and will do nothing if it isn't also enabled on the same WordPress install.
This plugin has no settings within the Admin.
Hooks
Actions
mdt_an_auto_retry_push_success
do_action('mdt_an_auto_retry_push_success', int $post_id, string $share_url, int $attempt);
Hook in after a successful push retry to run custom logic
Parameters
$post_id
(int) Post ID
$share_url
(string) Apple News share url for $post_id
$attempt
(int) Number of attempts made
mdt_an_auto_retry_push_failure
Hook in after a successful push retry to run custom logic
do_action('mdt_an_auto_retry_push_failure', int $post_id, string $error_message, int $attempt);
Parameters
$post_id
(int) Post ID
$error_message
(string) Error message
$attempt
(int) Number of attempts made
Filters
mdt_an_auto_retry_should_schedule
Allows for preventing auto retry scheduling
apply_filters('mdt_an_auto_retry_should_schedule', bool $should, int $post_id);
Parameters
$should
(bool) Whether to schedule or not (default: true)
$post_id
(int) Post ID
mdt_an_auto_retry_schedule_interval
Adjust the auto retry interval
apply_filters('mdt_an_auto_retry_schedule_delay', int $interval;
Parameters
$interval
(int) Time in seconds to schedule the future event for (default: 120)