1 Commits

Author SHA1 Message Date
24d9bfd74f use wp_doing_ajax() instead of checking for global constant (#36)
The function is available since WP 4.7, so we could have been using it
since v1.2. It defaults to the same logic but applies an additional
filter internally.
2025-08-28 17:01:50 +02:00

View File

@@ -76,7 +76,7 @@ class SCLiveticker {
add_filter( 'rest_scliveticker_tick_query', array( 'SCLiveticker\\Api', 'tick_query_filter' ), 10, 2 );
// Skip on AJAX if not enabled.
if ( ( ! isset( self::$options['enable_ajax'] ) || 1 !== self::$options['enable_ajax'] ) && ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
if ( ( ! isset( self::$options['enable_ajax'] ) || 1 !== self::$options['enable_ajax'] ) && wp_doing_ajax() ) {
return;
}