70 Commits

Author SHA1 Message Date
a6a48dad58
add a note on cross-site-scripting to JS feature description (#30)
All checks were successful
continuous-integration/drone/push Build is passing
2025-03-04 17:49:22 +01:00
b29a2b169c
Merge branch 'stable' into develop
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-04 18:33:17 +01:00
80946232ca
prepare release of v1.2.3 (#29)
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-02-04 18:23:28 +01:00
313159c74a
fix: escape ticker ID in shortcode output (#28)
Ticker ID is user input and may contain literally anything. While this
is properly escaped in the internal query, we should also escape it in
the generated HTML output.
2025-02-04 18:16:30 +01:00
fceea65dfb
fix: escape ticker ID in shortcode output (#28)
All checks were successful
continuous-integration/drone/push Build is passing
Ticker ID is user input and may contain literally anything. While this
is properly escaped in the internal query, we should also escape it in
the generated HTML output.
2025-02-04 17:58:19 +01:00
ad8293fa3a
add screen reader text and label to checkboxes in settings
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-24 14:43:12 +01:00
a827536da7
extract settings handling into separate class 2024-03-24 14:17:01 +01:00
d650ae08ee
remove unused parameter from update_options() 2024-03-24 14:17:27 +01:00
14ec07e423
remove some default arguments 2024-03-24 13:50:46 +01:00
e738da4f8f
remove unused method Admin::settings_uninstall_section() 2024-03-24 13:50:24 +01:00
20401382b7
use null coalescing operator where applicable
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-24 13:28:47 +01:00
b1d42dadd8
remove redundante test for has_block as we require WP 5.0 now 2024-03-24 13:27:51 +01:00
5f1e1a7879
add type hints to PHP methods 2024-03-24 11:17:17 +01:00
9d1934a6d7
prepare release of v1.2.2
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-02 11:14:15 +01:00
deedcf4a87
update deprecated get_terms() syntax
Some checks reported errors
continuous-integration/drone/push Build was killed
The old-style syntax was deprecated in WP 4.5. We already require 4.7,
so there is no need to keep the deprecated parameter style.
2023-11-09 18:24:33 +01:00
61ba951f0b
update code style to WPCS v3.0 2023-11-09 18:19:42 +01:00
aa1a49c575
bump version to 1.2.1
All checks were successful
continuous-integration/drone/push Build is passing
2022-02-01 18:29:29 +01:00
e007f53e8c
make script evaluation optional
Some checks failed
continuous-integration/drone/push Build is failing
2022-01-23 17:07:37 +01:00
f50dfe92c7 add optional shortcode support for tick content (#18) (#19)
Some checks failed
continuous-integration/drone/push Build is failing
If the new option is enabled, tick content will be piped through
do_shortcode() to parse nested shortcode content. Disabled by default
as it is not necessary in most cases.
2022-01-23 12:41:29 +01:00
fa936d3f54 fix date rendering in API callback
Some checks failed
continuous-integration/drone/push Build is failing
THe callback function gets a prepared data array as input while
get_the_modified_date expects an ID or WP_Post object. We now use
DateTime::parse directly instead of taking another round loading the
post data.
2022-01-22 19:53:16 +01:00
2cc277638f re-enable default pagination in API if "limit" is not specified
All checks were successful
continuous-integration/drone/push Build is passing
2021-05-22 19:17:17 +02:00
2cb4b62df3 start unit test implementation 2021-05-22 18:15:07 +02:00
b2058dfe96 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.
2021-04-12 18:09:03 +02:00
68efc83273 refactor frontend to use WP REST API instead of WP AJAX
Query new ticks using GET request to the REST API.
Also we now trigger one request per ticker, if more than one is
available on the same page.

HTML markup (list element, content container) is generated client side,
s.t. we can work on the generic response data model
2021-04-12 18:09:03 +02:00
547fc521d0 add formatted date to REST response and use RFC3339 for the query 2021-04-12 18:09:01 +02:00
ca0311622e introduce query filter for REST API
Enabled WP REST API to query for ticker slug, GMT timestamp and limit
parameter as used by AJAX calls. This is done in preparation for
migration to WP REST instead of WP AJAX.
2021-04-12 18:08:32 +02:00
5ebd3c55d3 prepare release of v1.1.1 2021-03-20 11:23:41 +01:00
c7d7d27f1c add missing textdomain to taxonomy name 2020-05-22 11:28:54 +02:00
10830babcc restore UL element for widget output 2020-05-02 19:16:31 +02:00
0515debed0 prepare release 1.1.0 2020-05-02 19:16:31 +02:00
6700d76528 use colon instead of dot for hour/minute separation 2020-05-02 19:16:31 +02:00
04131a1d99 expose ticks through REST API (#7)
Tickers are already exposed for JS integration in Gutenberg. Now ticks
themselves are also available for use with external systems.
2020-05-02 19:16:31 +02:00
4a1197af28 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.
2020-05-02 19:16:31 +02:00
4463fa7f1f raise required PHP version to 5.6 2020-04-09 16:38:44 +02:00
ca5c81356b respect "enable_css" option and do not enqueue stylesheet if disabled 2020-04-09 12:27:02 +02:00
f0bf1c3542 enqueue styles and scripts if only Gutenberg block is present
Resources have only been added if shortcode or widget hooks have been
triggered before. If we switch to native Gutenberg block, none of the
checks is true and no scripts are available.
2020-04-09 12:27:02 +02:00
df1de841e8 expose ticker taxonomy to API and add select element to Gutenberg block
This is more handy than entering the ticker slug manually.
2019-11-24 18:09:21 +01:00
fc4783d07a bump version to 1.1.0-alpha and update dev-dependencies 2019-11-24 18:09:21 +01:00
9ddcc41c6b implement Gutenberg block to add liveticker without legacy shortcode
* implement react-based JS block
* refactor shortcode and widget to use the same syntax and classes
2019-11-24 18:09:21 +01:00
e201d7c02f use GMT timestamp for dynamic update
Use real unix timestamps and do not rely on the system timezone. We now
query the "post_date_gmt" field and use timestamps without zone bias.
2019-11-24 17:53:08 +01:00
18c55f6c4c remove underscore prefix from $_options field 2019-08-27 19:12:00 +02:00
0d23a27acc Fixed settings validation for boolean flags 2018-11-02 10:07:06 +01:00
3eecaaf8fe Changed time() to current_time( ) all to fix timezone issues
The UTC offset was omitted by the WP date query, so the UTC timestamp
returned by time() was compared to a local timestamp.
2018-11-02 09:48:11 +01:00
65eafd2524 Renamed Plugin and changed slug to stklcode-liveticker
Due to naming conflicts with the original wp-liveticker plugin this one
is now renamed to a unique identifier.
2018-11-02 09:01:29 +01:00
9d64f9f415 Add uninstall hook to remove ticks and tickers 2018-11-01 15:39:58 +01:00
811bd94fa5 Removed last TODO flag and bumped version to 1.0.0 2018-11-01 14:51:02 +01:00
176e6897df Cleaned up settigs and added label attributes 2018-11-01 14:36:55 +01:00
d49336dee5 Minor code style adjustments 2018-11-01 14:26:16 +01:00
bd92338d85 Removed no longer required jQuery dependency 2018-10-17 20:55:21 +02:00
6f1cac5404 Renamed AJAX variable, JS code style, added ESLint config 2018-10-17 20:42:10 +02:00