136 Commits

Author SHA1 Message Date
6ed625dab2
prepend new elements instead of replacing HTML on AJAX update (#9) (#12)
Replacing the body by prepending HTML results in the full content
being re-rendered. This can be a performance issue, but is definitely
annoying when embedding media in ticks.
2020-05-01 14:52:25 +02:00
ee60444932
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-04-28 18:21:16 +02:00
cb8cbbf761
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-04-28 17:36:57 +02:00
cf65d6d7c3 Merge branch 'develop' 2020-04-10 17:25:54 +02:00
8d0e033ae9 set PHPUnit to 8.x to use same version across all builds
Actually there are no unit tets implemented, however CI builds fail...
2020-04-10 17:17:57 +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
0cc35e9dd5 update devenv and readme 2020-04-09 12:26:59 +02:00
5c4b1eaf60 select first available ticker for new blocks 2020-01-13 17:28:19 +01:00
dba37eb64b remove undefined className attribute from block rendering 2020-01-13 17:18:52 +01:00
42dce1eb65 update stylelint 2020-01-13 17:18:30 +01:00
e41027d246 update Drone CI configuration 2020-01-13 17:16:22 +01:00
3df29ff76f add PHP 7.4 to build roster and remove unsupported 7.x versions 2020-01-07 19:33:37 +01:00
7f35444642 fix Robo file and pass node option through all targets [skip ci] 2019-11-25 20:10:33 +01:00
e1ba63fd8e gutenberg block screenshot, updated WP 5.3 screenshots, readme++ 2019-11-24 18:09:21 +01:00
61a3e4a104 adjustments to block output when no tickers are available
Always show the first label and display spinner or message below.
2019-11-24 18:09:21 +01:00
dd074293a7 make block script ES5 compatible
There are polyfills for methods like apiFetch, so migrate the syntax to
ES5 (no generators, method shorthands, arrow functions, ...) and we are
done here without adding transpilers to the project.
2019-11-24 18:09:21 +01: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
acf3b010f1 wrap frontend JS into IIFE to
Exposing the liveticker functionality to a public namespace is not
necessary, so it is now wrapped into an anonymous function.
2019-11-24 18:09:21 +01:00
b88e1c2903 update ticker immediately, if not prefilled by backend
When a ticker is added by a Gutenberg block, it is initially empty. This
can be detected by checking the "last" flag for 0 value. If found, the
ticker is now updated immediately by the AJAX function and not waiting
for the poll interval to trigger.
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
8103e78652 Declare compatibility with WP 5.3 [skip ci] 2019-11-24 17:47:42 +01:00
c195388d64 Declare compatibility with WP 5.3 [skip ci] 2019-11-13 17:39:27 +01:00
0cab1a3580 update JS code style to currently recommended conventions
ES5 support is still present to not introduce breaking changes (dropped
IE10 support) in minor updates.
2019-08-28 11:15:02 +02:00
2906d435d9 fix .eslintrc 2019-08-27 20:19:28 +02:00
8acd840fc5 update Drone CI configuration 2019-08-27 20:13:22 +02:00
b923d3494b remove PHP 5.5 from CI matrix
Dev dependencies start dropping support for PHP 5.5 now. Because the
5.2 to 5.4 are already missing in the CI matrix, we drop explicit 5.5
builds for now and rely on static compatibility checks.
2019-08-27 20:09:56 +02:00
7ca687a85c include ESLint and stylelint checks in build scripts using Node 2019-08-27 20:09:44 +02:00
d4edbb6423 update dev-dependencies 2019-08-27 19:12:39 +02:00
18c55f6c4c remove underscore prefix from $_options field 2019-08-27 19:12:00 +02:00
1a0b763290 rename local variable $cat to not mess up with WP global 2019-08-27 19:11:34 +02:00
29232a05eb Update Packagist link [skip ci] 2019-05-08 16:48:53 +02:00
2d33465181 Declare compatibility with WP 5.2 [skip ci] 2019-05-08 16:38:25 +02:00
053f1dda52 Declare compatibility with WP 5.1 [skip CI] 2019-03-02 17:19:15 +01:00
faf5f0fc5a Change package name to actual plugin name
Installing the plugin via Composer leads to inconsistent directory
layout and potentially overwrites a different plugin.
2019-03-02 17:17:34 +01:00
faebd1f705 Add .gitattributes
Set development files and assets to export ignore list in order to clean
up the package distributed via Composer/Packagist.
2019-02-19 20:53:58 +01:00
89f33429a2 Update Drone CI config 2018-11-11 20:33:03 +01:00
de5a043a39 Add Slack notification to Travis 2018-11-02 16:07:23 +01:00
4fb675336d Add badges to ReadMe and corrected CI links in Contributing [skip ci] 2018-11-02 10:49:47 +01:00
405325c08a Corrected plugin name in ReadMe [skip ci] v1.0.0 2018-11-02 10:17:58 +01:00
7d873763c3 Set release date 1.0.0 [skip ci] 2018-11-02 10:13:01 +01: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
c927200834 ReadMe++ [skip ci] 2018-11-01 15:07:09 +01:00
485051c8da Add CONTRIBUTING.md 2018-11-01 14:57:13 +01:00