add unique IDs to ticker containers and ticks in HTML markup

Ticker containers get a consecutive number unique within a markup.
Ticks will get an ID based on this number and the post ID.
This commit is contained in:
2020-11-11 11:38:58 +01:00
parent 8e22b37b46
commit b2058dfe96
3 changed files with 41 additions and 19 deletions

View File

@ -101,7 +101,8 @@ class Widget extends WP_Widget {
echo SCLiveticker::tick_html_widget(
esc_html( get_the_time( 'd.m.Y - H:i' ) ),
get_the_title(),
( '1' === $highlight && get_the_time( 'U' ) > ( time() - $highlight_time ) )
( '1' === $highlight && get_the_time( 'U' ) > ( time() - $highlight_time ) ),
get_the_ID()
);
}