From c195388d64c76bddeaa9fb0bdd2caae2321e63ec Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Wed, 13 Nov 2019 17:39:27 +0100 Subject: [PATCH 1/8] Declare compatibility with WP 5.3 [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9321a45..0e5d07b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ * Contributors: Stefan Kalscheuer * Tags: liveticker, feed, rss * Requires at least: 4.0 -* Tested up to: 5.2 +* Tested up to: 5.3 * Requires PHP: 5.2 * Stable tag: 1.0.0 * License: GPLv2 or later From 4a1197af2808ccf6aea43f8663a87a7b59124475 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Tue, 28 Apr 2020 17:36:57 +0200 Subject: [PATCH 2/8] 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. --- includes/class-scliveticker.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-scliveticker.php b/includes/class-scliveticker.php index b398c12..6337bff 100644 --- a/includes/class-scliveticker.php +++ b/includes/class-scliveticker.php @@ -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 .= '">'; @@ -353,9 +353,9 @@ class SCLiveticker { while ( $query->have_posts() ) { $query->the_post(); if ( $is_widget ) { - $out .= self::tick_html_widget( get_the_time( 'd.m.Y H.i' ), get_the_title(), false ); + $out .= self::tick_html_widget( get_the_time( 'd.m.Y H:i' ), get_the_title(), false ); } else { - $out .= self::tick_html( get_the_time( 'd.m.Y H.i' ), get_the_title(), get_the_content(), $is_widget ); + $out .= self::tick_html( get_the_time( 'd.m.Y H:i' ), get_the_title(), get_the_content(), $is_widget ); } } diff --git a/includes/class-widget.php b/includes/class-widget.php index 727388e..b0f2e5c 100644 --- a/includes/class-widget.php +++ b/includes/class-widget.php @@ -99,7 +99,7 @@ class Widget extends WP_Widget { $wp_query->the_post(); // @codingStandardsIgnoreLine echo SCLiveticker::tick_html_widget( - esc_html( get_the_time( 'd.m.Y - H.i' ) ), + esc_html( get_the_time( 'd.m.Y - H:i' ) ), get_the_title(), ( '1' === $highlight && get_the_time( 'U' ) > ( time() - $highlight_time ) ) ); From 0515debed0e6f3f7bc17f159fba11c7fdad08117 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 2 May 2020 18:03:53 +0200 Subject: [PATCH 6/8] prepare release 1.1.0 --- README.md | 4 ++-- composer.json | 2 +- includes/class-scliveticker.php | 2 +- package.json | 4 ++-- stklcode-liveticker.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 111e596..2a482e6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * Requires at least: 4.0 * Tested up to: 5.4 * Requires PHP: 5.6 -* Stable tag: 1.0.0 +* Stable tag: 1.1.0 * License: GPLv2 or later * License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -79,7 +79,7 @@ caching time of 12 hours obviously makes no sense. ## Changelog -### 1.1.0 - unreleased +### 1.1.0 - 2020-05-02 * Requires PHP 5.6 or above * Use GMT for automatic updates diff --git a/composer.json b/composer.json index 03e6b8a..4e0ee76 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "stklcode/stklcode-liveticker", - "version": "1.1.0-alpha", + "version": "1.1.0", "description": "A simple Liveticker for Wordpress.", "keywords": [ "wordpress", diff --git a/includes/class-scliveticker.php b/includes/class-scliveticker.php index f30cb4e..cfd2b90 100644 --- a/includes/class-scliveticker.php +++ b/includes/class-scliveticker.php @@ -26,7 +26,7 @@ class SCLiveticker { * * @var string OPTIONS */ - const VERSION = '1.1.0-alpha'; + const VERSION = '1.1.0'; /** * Options tag. diff --git a/package.json b/package.json index 91ee954..414065b 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "stklcode-liveticker", - "version": "1.1.0-alpha", + "version": "1.1.0", "description": "A simple Liveticker for Wordpress.", "author": "Stefan Kalscheuer", "license": "GPL-2.0+", "devDependencies": { - "@wordpress/eslint-plugin": "^3.4.1", + "@wordpress/eslint-plugin": "^3", "eslint": "^6", "stylelint": "^13", "stylelint-config-wordpress": "^16" diff --git a/stklcode-liveticker.php b/stklcode-liveticker.php index 07ba943..8e1a95b 100644 --- a/stklcode-liveticker.php +++ b/stklcode-liveticker.php @@ -9,7 +9,7 @@ * @wordpress-plugin * Plugin Name: Liveticker (by stklcode) * Description: A simple Liveticker for WordPress. - * Version: 1.0.0 + * Version: 1.1.0 * Author: Stefan Kalscheuer * Author URI: https://www.stklcode.de * Text Domain: stklcode-liveticker From 10830babcc9c499179a2989f37c777016184e2bc Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 2 May 2020 18:22:47 +0200 Subject: [PATCH 7/8] restore UL element for widget output --- includes/class-widget.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-widget.php b/includes/class-widget.php index b0f2e5c..0fca864 100644 --- a/includes/class-widget.php +++ b/includes/class-widget.php @@ -80,7 +80,7 @@ class Widget extends WP_Widget { . 'data-sclt-limit="' . esc_attr( $count ) . '" ' . 'data-sclt-last="' . esc_attr( current_datetime()->getTimestamp() ); } - echo '">'; + echo '">
    '; $args = array( 'post_type' => 'scliveticker_tick', From ac8062b262f81161f6e6423bbded076a5a33c77e Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 2 May 2020 18:29:35 +0200 Subject: [PATCH 8/8] README++ --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2a482e6..b237c94 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,14 @@ Easily add multiple livetickers, add them to posts with shortcode or use them as ## Installation -1. Upload `stklcode-liveticker` to the `/wp-content/plugins/` directory. -2. Activate the plugin through the 'Plugins' menu in WordPress. -3. Go to Liveticker menu to start. +If you don’t know how to install a plugin for WordPress, [here’s how](https://wordpress.org/support/article/managing-plugins/). + +You can obtain the plugin through fhe official WordPress plugin repository. +Alternatively you can also use _Copmposer_. ### Requirements ### -* PHP 5.2 or above +* PHP 5.6 or above * WordPress 4.0 or above ## Frequently asked questions