Skip to content

Commit

Permalink
fix fatal error
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed May 13, 2024
1 parent a9129f4 commit a290d68
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
9 changes: 7 additions & 2 deletions includes/class-comment-walker.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use WP_Comment;
use Walker_Comment;
use WP_Comment_Query;

class Comment_Walker extends Walker_Comment {
/**
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
}
Expand Down
14 changes: 7 additions & 7 deletions languages/webmention.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 <span class=\"says\">says:</span>"
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 ""

Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion webmention.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a290d68

Please sign in to comment.