Skip to content

Commit

Permalink
use time() instead of current_datetime() for WP 4.x compatibility (#6)
Browse files Browse the repository at this point in the history
The function current_datetime() has been introduced in WP 5.3, but
the Plugin should maintain compatibility with 4.x for now.
  • Loading branch information
stklcode committed Apr 28, 2020
1 parent 8d0e033 commit cb8cbbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/class-scliveticker.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public static function shortcode_ticker_show( $atts ) {
$output .= ' sclt-ajax" '
. 'data-sclt-ticker="' . $ticker . '" '
. 'data-sclt-limit="' . $limit . '" '
. 'data-sclt-last="' . current_datetime()->getTimestamp();
. 'data-sclt-last="' . time();
}
$output .= '"><ul>';

Expand Down Expand Up @@ -362,13 +362,13 @@ public static function ajax_update() {
$res[] = array(
'w' => $slug,
'h' => $out,
't' => current_datetime()->getTimestamp(),
't' => time(),
);
} else {
$res[] = array(
's' => $slug,
'h' => $out,
't' => current_datetime()->getTimestamp(),
't' => time(),
);
}
}
Expand Down

0 comments on commit cb8cbbf

Please sign in to comment.