Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 1d065dd

Browse files
committed
fixed #68
1 parent f3f097b commit 1d065dd

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ The Webmention and Pingback logos are made by [Aaron Parecki](http://aaronpareck
5151

5252
Project actively developed on Github at [pfefferle/wordpress-semantic-linkbacks](https://github.com/pfefferle/wordpress-semantic-linkbacks). Please file support issues there.
5353

54+
### 3.3.1 ###
55+
56+
* fixed https://github.com/pfefferle/wordpress-semantic-linkbacks/issues/68
57+
5458
### 3.3.0 ###
5559

5660
* Due to changes in WordPress 4.4 through 4.7 and version 3.0.0 of the Webmentions plugin this plugin can act on the retrieved remote source

includes/class-linkbacks-handler.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ public static function get_post_format_strings() {
239239
* Return correct URL
240240
*
241241
* @param WP_Comment $comment the comment object
242+
*
242243
* @return string the URL
243244
*/
244245
public static function get_url( $comment = null ) {
@@ -264,6 +265,7 @@ public static function get_url( $comment = null ) {
264265
* @param string $text the comment text
265266
* @param WP_Comment $comment the comment object
266267
* @param array $args a list of arguments
268+
*
267269
* @return string the filtered comment text
268270
*/
269271
public static function comment_text_add_cite( $text, $comment = null, $args = array() ) {
@@ -299,6 +301,7 @@ public static function comment_text_add_cite( $text, $comment = null, $args = ar
299301
* @param string $text the comment text
300302
* @param WP_Comment $comment the comment object
301303
* @param array $args a list of arguments
304+
*
302305
* @return string the filtered comment text
303306
*/
304307
public static function comment_text_excerpt( $text, $comment = null, $args = array() ) {
@@ -361,8 +364,9 @@ public static function comment_text_excerpt( $text, $comment = null, $args = arr
361364
/**
362365
* Replaces the default avatar with the WebMention uf2 photo
363366
*
364-
* @param array $args Arguments passed to get_avatar_data(), after processing.
367+
* @param array $args Arguments passed to get_avatar_data(), after processing.
365368
* @param int|string|object $id_or_email A user ID, email address, or comment object
369+
*
366370
* @return array $args
367371
*/
368372
public static function pre_get_avatar_data( $args, $id_or_email ) {
@@ -392,9 +396,10 @@ public static function pre_get_avatar_data( $args, $id_or_email ) {
392396
/**
393397
* Replace comment url with canonical url
394398
*
395-
* @param string $link the link url
396-
* @param obj $comment the comment object
397-
* @param array $args a list of arguments to generate the final link tag
399+
* @param string $link the link url
400+
* @param WP_Comment $comment the comment object
401+
* @param array $args a list of arguments to generate the final link tag
402+
*
398403
* @return string the linkback source or the original comment link
399404
*/
400405
public static function get_comment_link( $link, $comment, $args ) {
@@ -410,17 +415,18 @@ public static function get_comment_link( $link, $comment, $args ) {
410415
/**
411416
* Replace comment url with author url
412417
*
413-
* @param string $link the author url
418+
* @param string $url The comment author's URL.
419+
* @param int $comment_ID The comment ID.
420+
* @param WP_Comment $comment The comment object.
421+
*
414422
* @return string the replaced/parsed author url or the original comment link
415423
*/
416-
public static function get_comment_author_url( $link ) {
417-
global $comment;
418-
419-
if ( is_object( $comment ) && $author_url = get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_author_url', true ) ) {
424+
public static function get_comment_author_url( $url, $id, $comment ) {
425+
if ( $author_url = get_comment_meta( $id, 'semantic_linkbacks_author_url', true ) ) {
420426
return $author_url;
421427
}
422428

423-
return $link;
429+
return $url;
424430
}
425431

426432
/**

readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ The Webmention and Pingback logos are made by [Aaron Parecki](http://aaronpareck
5151

5252
Project actively developed on Github at [pfefferle/wordpress-semantic-linkbacks](https://github.com/pfefferle/wordpress-semantic-linkbacks). Please file support issues there.
5353

54+
= 3.3.1 =
55+
56+
* fixed https://github.com/pfefferle/wordpress-semantic-linkbacks/issues/68
57+
5458
= 3.3.0 =
5559

5660
* Due to changes in WordPress 4.4 through 4.7 and version 3.0.0 of the Webmentions plugin this plugin can act on the retrieved remote source

0 commit comments

Comments
 (0)