use time() instead of current_datetime() for WP 4.x compatibility (#6)
The function current_datetime() has been introduced in WP 5.3, but the Plugin should maintain compatibility with 4.x for now.
This commit is contained in:
parent
8d0e033ae9
commit
cb8cbbf761
@ -206,7 +206,7 @@ class SCLiveticker {
|
||||
$output .= ' sclt-ajax" '
|
||||
. 'data-sclt-ticker="' . $ticker . '" '
|
||||
. 'data-sclt-limit="' . $limit . '" '
|
||||
. 'data-sclt-last="' . current_datetime()->getTimestamp();
|
||||
. 'data-sclt-last="' . time();
|
||||
}
|
||||
$output .= '"><ul>';
|
||||
|
||||
@ -362,13 +362,13 @@ class SCLiveticker {
|
||||
$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(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user