diff --git a/includes/class-comment-walker.php b/includes/class-comment-walker.php index 1c23dae..b16d541 100644 --- a/includes/class-comment-walker.php +++ b/includes/class-comment-walker.php @@ -4,6 +4,7 @@ use WP_Comment; use Walker_Comment; +use WP_Comment_Query; class Comment_Walker extends Walker_Comment { /** @@ -283,6 +284,10 @@ protected function html5_comment( $comment, $depth, $args ) { * @param WP_Comment_Query $query Comment count. */ public static function comment_query( $query ) { + if ( ! $query instanceof WP_Comment_Query ) { + return; + } + if ( is_admin() ) { return; } @@ -292,9 +297,9 @@ public static function comment_query( $query ) { } if ( ! empty( $query->query_vars['meta_query'] ) ) { - $query = current( $query->query_vars['meta_query'] ); + $query_vars = current( $query->query_vars['meta_query'] ); - if ( ! empty( $query['key'] ) && 'protocol' === $query['key'] ) { + if ( ! empty( $query_vars['key'] ) && 'protocol' === $query_vars['key'] ) { return; } } diff --git a/languages/webmention.pot b/languages/webmention.pot index 5fc3963..4bd602e 100644 --- a/languages/webmention.pot +++ b/languages/webmention.pot @@ -2,10 +2,10 @@ # This file is distributed under the MIT. msgid "" msgstr "" -"Project-Id-Version: Webmention 5.3.0\n" +"Project-Id-Version: Webmention 5.3.1\n" "Report-Msgid-Bugs-To: " "https://wordpress.org/support/plugin/wordpress-webmention\n" -"POT-Creation-Date: 2024-05-13 07:52:14+00:00\n" +"POT-Creation-Date: 2024-05-13 15:00:42+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -313,28 +313,28 @@ msgstr "" msgid "DB Migration finished" msgstr "" -#: includes/class-comment-walker.php:207 +#: includes/class-comment-walker.php:195 msgid "Your comment is awaiting moderation." msgstr "" -#: includes/class-comment-walker.php:209 +#: includes/class-comment-walker.php:197 msgid "" "Your comment is awaiting moderation. This is a preview; your comment will " "be visible after it has been approved." msgstr "" -#: includes/class-comment-walker.php:230 +#: includes/class-comment-walker.php:218 #. translators: %s: Comment author link. msgid "%s says:" msgstr "" -#: includes/class-comment-walker.php:250 templates/webmention-comment.php:67 +#: includes/class-comment-walker.php:238 templates/webmention-comment.php:67 #. translators: 1: Comment date, 2: Comment time. #. translators: 1: date, 2: time msgid "%1$s at %2$s" msgstr "" -#: includes/class-comment-walker.php:256 +#: includes/class-comment-walker.php:244 msgid "Edit" msgstr "" diff --git a/readme.md b/readme.md index b189425..a3a2293 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ **Tags:** webmention, pingback, trackback, linkback, indieweb **Requires at least:** 4.9 **Tested up to:** 6.5 -**Stable tag:** 5.3.0 +**Stable tag:** 5.3.1 **Requires PHP:** 5.6 **License:** MIT **License URI:** https://opensource.org/licenses/MIT @@ -100,6 +100,10 @@ While not all display options can be settings, we are looking to provide some si Project and support maintained on github at [pfefferle/wordpress-webmention](https://github.com/pfefferle/wordpress-webmention). +### 5.3.1### + +* Fix fatal error + ### 5.3.0 ### * Fix facepiles for FSE themes diff --git a/readme.txt b/readme.txt index 32614b7..34a9cfb 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://notiz.blog/donate/ Tags: webmention, pingback, trackback, linkback, indieweb Requires at least: 4.9 Tested up to: 6.5 -Stable tag: 5.3.0 +Stable tag: 5.3.1 Requires PHP: 5.6 License: MIT License URI: https://opensource.org/licenses/MIT @@ -100,6 +100,10 @@ While not all display options can be settings, we are looking to provide some si Project and support maintained on github at [pfefferle/wordpress-webmention](https://github.com/pfefferle/wordpress-webmention). += 5.3.1= + +* Fix fatal error + = 5.3.0 = * Fix facepiles for FSE themes diff --git a/webmention.php b/webmention.php index 43e8d91..5608d2a 100755 --- a/webmention.php +++ b/webmention.php @@ -5,7 +5,7 @@ * Description: Webmention support for WordPress posts * Author: Matthias Pfefferle * Author URI: https://notiz.blog/ - * Version: 5.3.0 + * Version: 5.3.1 * License: MIT * License URI: https://opensource.org/licenses/MIT * Text Domain: webmention