Skip to content

Commit 698bede

Browse files
Merge pull request #1050 from Codeinwp/bugfix/pro/815
Fixed action scheduler time issue with old method
2 parents d6f868e + 770b335 commit 698bede

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

includes/admin/feedzy-rss-feeds-import.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,10 @@ public function manage_feedzy_import_columns( $column, $post_id ) {
834834
if ( ! $next ) {
835835
$next = Feedzy_Rss_Feeds_Util_Scheduler::is_scheduled( 'feedzy_cron' );
836836
}
837-
if ( $next ) {
837+
if ( is_numeric( $next ) ) {
838838
echo wp_kses_post( human_time_diff( $next, time() ) );
839+
} elseif ( $next ) {
840+
echo esc_html__( 'in-progress', 'feedzy-rss-feeds' );
839841
}
840842
break;
841843
default:

includes/util/feedzy-rss-feeds-util-scheduler.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ class Feedzy_Rss_Feeds_Util_Scheduler {
2828
* @return bool|int
2929
*/
3030
public static function is_scheduled( string $hook, array $args = array() ) {
31-
if ( function_exists( 'as_has_scheduled_action' ) ) {
32-
return as_has_scheduled_action( $hook, $args );
33-
}
34-
3531
if ( function_exists( 'as_next_scheduled_action' ) ) {
3632
// For older versions of AS.
3733
return as_next_scheduled_action( $hook, $args );
3834
}
35+
if ( function_exists( 'as_has_scheduled_action' ) ) {
36+
return as_has_scheduled_action( $hook, $args );
37+
}
3938

4039
return wp_next_scheduled( $hook, $args );
4140
}

includes/views/import-metabox-edit.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,9 @@ class="fz-switch-toggle" type="checkbox" value="yes"
674674
<?php echo esc_attr( $import_feed_delete_media ); ?>>
675675
<label class="feedzy-inline form-label" for="delete-attached-media"><?php esc_html_e( 'Delete attached featured image', 'feedzy-rss-feeds' ); ?></label>
676676
</div>
677-
</div>
678-
<div class="help-text">
679-
<?php echo wp_sprintf( esc_html__( 'Helpful if you want to delete attached featured image when posts are automatically deleted.', 'feedzy-rss-feeds' ) ); ?>
677+
<div class="help-text">
678+
<?php echo wp_sprintf( esc_html__( 'Helpful if you want to delete attached featured image when posts are automatically deleted.', 'feedzy-rss-feeds' ) ); ?>
679+
</div>
680680
</div>
681681
</div>
682682
</div>

0 commit comments

Comments
 (0)