Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/AmazonAI-PollyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public function save_post( $post_id, $post, $updated ) {
}
}

if( ! ( wp_is_post_revision( $post_id) || wp_is_post_autosave( $post_id ) ) ) {
if( ! ( wp_is_post_revision( $post_id) || wp_is_post_autosave( $post_id ) ) && apply_filters( 'amazon_polly_trigger_post_audio_task', true, $post_id ) ) {
$logger->log(sprintf('%s Starting background task process ( id=%s )', __METHOD__, $post_id));
$background_task = new AmazonAI_BackgroundTask();
$background_task->trigger(self::GENERATE_POST_AUDIO_TASK, [ $post_id ]);
$background_task = new AmazonAI_BackgroundTask();
$background_task->trigger(self::GENERATE_POST_AUDIO_TASK, [ $post_id ]);
}
}

Expand Down