Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
7beb0037f6
|
|||
502abb10af
|
|||
f27d90eb8f
|
|||
9d39d149fb
|
|||
78c17bdbbf
|
|||
d1ba1d0eb4
|
|||
5bd7989070
|
|||
121051b7d0
|
|||
10c37189b7
|
|||
6d034b4ea3
|
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@@ -6,6 +6,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- php: '8.4'
|
||||||
|
wordpress: '6.8'
|
||||||
- php: '8.3'
|
- php: '8.3'
|
||||||
wordpress: '6.6'
|
wordpress: '6.6'
|
||||||
- php: '8.2'
|
- php: '8.2'
|
||||||
@@ -18,7 +20,7 @@ jobs:
|
|||||||
wordpress: '5.9'
|
wordpress: '5.9'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Install SVN
|
- name: Install SVN
|
||||||
run: |
|
run: |
|
||||||
if ! command -v svn > /dev/null; then
|
if ! command -v svn > /dev/null; then
|
||||||
@@ -44,7 +46,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
@@ -68,12 +70,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Analyze with SonarCloud
|
- name: Analyze with SonarCloud
|
||||||
if: env.SONAR_TOKEN != ''
|
if: env.SONAR_TOKEN != ''
|
||||||
uses: sonarsource/sonarcloud-github-action@v3
|
uses: sonarsource/sonarqube-scan-action@v5
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
@@ -9,7 +9,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
|
2
.github/workflows/wordpress-plugin-check.yml
vendored
2
.github/workflows/wordpress-plugin-check.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Package plugin
|
- name: Package plugin
|
||||||
run: |
|
run: |
|
||||||
|
@@ -10,7 +10,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
|
11
README.md
11
README.md
@@ -9,9 +9,9 @@
|
|||||||
* Contributors: stklcode
|
* Contributors: stklcode
|
||||||
* Tags: liveticker, feed, rss
|
* Tags: liveticker, feed, rss
|
||||||
* Requires at least: 5.0
|
* Requires at least: 5.0
|
||||||
* Tested up to: 6.7
|
* Tested up to: 6.8
|
||||||
* Requires PHP: 7.2
|
* Requires PHP: 7.2
|
||||||
* Stable tag: 1.3.0
|
* Stable tag: 1.3.1
|
||||||
* License: GPLv2 or later
|
* License: GPLv2 or later
|
||||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
@@ -80,6 +80,13 @@ caching time of 12 hours obviously makes no sense.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### 1.3.1 - 2025-08-16
|
||||||
|
|
||||||
|
* Textdomain is no longer loaded explicitly
|
||||||
|
* Internal filter and action hooks consolidated
|
||||||
|
* Minor internal code fixes
|
||||||
|
* Tested with WP 6.8
|
||||||
|
|
||||||
### 1.3.0 - 2025-03-10
|
### 1.3.0 - 2025-03-10
|
||||||
|
|
||||||
* Requires at least PHP 7.2 and WordPress 5.0
|
* Requires at least PHP 7.2 and WordPress 5.0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stklcode/stklcode-liveticker",
|
"name": "stklcode/stklcode-liveticker",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "A simple Liveticker for Wordpress.",
|
"description": "A simple Liveticker for Wordpress.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"wordpress",
|
"wordpress",
|
||||||
@@ -21,12 +21,12 @@
|
|||||||
"composer/installers": "~v2.3.0"
|
"composer/installers": "~v2.3.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0",
|
"dealerdirect/phpcodesniffer-composer-installer": "^v1.1",
|
||||||
"matthiasmullie/minify": "^1.3",
|
"matthiasmullie/minify": "^1.3",
|
||||||
"phpcompatibility/phpcompatibility-wp": "^2.1",
|
"phpcompatibility/phpcompatibility-wp": "^2.1",
|
||||||
"slowprog/composer-copy-file": "~0.3",
|
"slowprog/composer-copy-file": "~0.3",
|
||||||
"squizlabs/php_codesniffer": "^3.11",
|
"squizlabs/php_codesniffer": "^3.13",
|
||||||
"wp-coding-standards/wpcs": "^3.1",
|
"wp-coding-standards/wpcs": "^3.2",
|
||||||
"yoast/wp-test-utils": "^1.2"
|
"yoast/wp-test-utils": "^1.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@@ -26,7 +26,7 @@ class SCLiveticker {
|
|||||||
*
|
*
|
||||||
* @var string OPTIONS
|
* @var string OPTIONS
|
||||||
*/
|
*/
|
||||||
const VERSION = '1.3.0';
|
const VERSION = '1.3.1';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Options tag.
|
* Options tag.
|
||||||
@@ -53,7 +53,7 @@ class SCLiveticker {
|
|||||||
/**
|
/**
|
||||||
* Marker if widget is present.
|
* Marker if widget is present.
|
||||||
*
|
*
|
||||||
* @var boolean $shortcode_present
|
* @var boolean $widget_present
|
||||||
*/
|
*/
|
||||||
protected static $widget_present = false;
|
protected static $widget_present = false;
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ class SCLiveticker {
|
|||||||
self::update_options();
|
self::update_options();
|
||||||
|
|
||||||
// Add filter for REST API queries.
|
// Add filter for REST API queries.
|
||||||
add_filter( 'rest_api_init', array( 'SCLiveticker\\Api', 'init' ) );
|
add_action( 'rest_api_init', array( 'SCLiveticker\\Api', 'init' ) );
|
||||||
add_filter( 'rest_scliveticker_tick_query', array( 'SCLiveticker\\Api', 'tick_query_filter' ), 10, 2 );
|
add_filter( 'rest_scliveticker_tick_query', array( 'SCLiveticker\\Api', 'tick_query_filter' ), 10, 2 );
|
||||||
|
|
||||||
// Skip on AJAX if not enabled.
|
// Skip on AJAX if not enabled.
|
||||||
@@ -80,9 +80,6 @@ class SCLiveticker {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Textdomain.
|
|
||||||
load_plugin_textdomain( 'stklcode-liveticker' );
|
|
||||||
|
|
||||||
// Allow shortcodes in widgets.
|
// Allow shortcodes in widgets.
|
||||||
add_filter( 'widget_text', 'do_shortcode' );
|
add_filter( 'widget_text', 'do_shortcode' );
|
||||||
|
|
||||||
@@ -288,7 +285,7 @@ class SCLiveticker {
|
|||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'sclt-css',
|
'sclt-css',
|
||||||
SCLIVETICKER_BASE . 'styles/liveticker.min.css',
|
SCLIVETICKER_BASE . 'styles/liveticker.min.css',
|
||||||
'',
|
array(),
|
||||||
self::VERSION
|
self::VERSION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
namespace SCLiveticker;
|
namespace SCLiveticker;
|
||||||
|
|
||||||
|
use WP_Post;
|
||||||
use WP_Query;
|
use WP_Query;
|
||||||
|
|
||||||
// Exit if accessed directly.
|
// Exit if accessed directly.
|
||||||
@@ -53,7 +54,11 @@ class System extends SCLiveticker {
|
|||||||
// Delete all ticks.
|
// Delete all ticks.
|
||||||
$ticks = new WP_Query( array( 'post_type' => 'scliveticker_tick' ) );
|
$ticks = new WP_Query( array( 'post_type' => 'scliveticker_tick' ) );
|
||||||
foreach ( $ticks->get_posts() as $tick ) {
|
foreach ( $ticks->get_posts() as $tick ) {
|
||||||
|
if ( $tick instanceof WP_Post ) {
|
||||||
wp_delete_post( $tick->ID, true );
|
wp_delete_post( $tick->ID, true );
|
||||||
|
} else {
|
||||||
|
wp_delete_post( $tick, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Temporarily register taxonomy to delete it.
|
// Temporarily register taxonomy to delete it.
|
||||||
@@ -66,9 +71,11 @@ class System extends SCLiveticker {
|
|||||||
'hide_empty' => false,
|
'hide_empty' => false,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
if ( ! is_wp_error( $tickers ) ) {
|
||||||
foreach ( $tickers as $ticker ) {
|
foreach ( $tickers as $ticker ) {
|
||||||
wp_delete_term( $ticker->term_id, 'scliveticker_ticker' );
|
wp_delete_term( $ticker->term_id, 'scliveticker_ticker' );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Unregister taxonomy again.
|
// Unregister taxonomy again.
|
||||||
unregister_taxonomy( 'scliveticker_ticker' );
|
unregister_taxonomy( 'scliveticker_ticker' );
|
||||||
|
@@ -25,7 +25,7 @@ class Widget extends WP_Widget {
|
|||||||
* SCLiveticker_Widget constructor.
|
* SCLiveticker_Widget constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct( false, 'Liveticker' );
|
parent::__construct( 'scliveticker', 'Liveticker' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stklcode-liveticker",
|
"name": "stklcode-liveticker",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "A simple Liveticker for Wordpress.",
|
"description": "A simple Liveticker for Wordpress.",
|
||||||
"author": "Stefan Kalscheuer",
|
"author": "Stefan Kalscheuer",
|
||||||
"license": "GPL-2.0+",
|
"license": "GPL-2.0+",
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
* @wordpress-plugin
|
* @wordpress-plugin
|
||||||
* Plugin Name: Liveticker (by stklcode)
|
* Plugin Name: Liveticker (by stklcode)
|
||||||
* Description: A simple Liveticker for WordPress.
|
* Description: A simple Liveticker for WordPress.
|
||||||
* Version: 1.3.0
|
* Version: 1.3.1
|
||||||
* Author: Stefan Kalscheuer
|
* Author: Stefan Kalscheuer
|
||||||
* Author URI: https://www.stklcode.de
|
* Author URI: https://www.stklcode.de
|
||||||
* Text Domain: stklcode-liveticker
|
* Text Domain: stklcode-liveticker
|
||||||
|
Reference in New Issue
Block a user