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

Commit bb13b0e

Browse files
committed
Change Hook for Linkback Fix
1 parent 5c14689 commit bb13b0e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

semantic-linkbacks.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ public static function init() {
4343
}
4444

4545
// hook into linkback functions to add more semantics
46-
add_action('pingback_post', array('SemanticLinkbacksPlugin', 'linkback_fix'));
47-
add_action('trackback_post', array('SemanticLinkbacksPlugin', 'linkback_fix'));
48-
add_action('webmention_post', array('SemanticLinkbacksPlugin', 'linkback_fix'));
46+
add_action('comment_post', array('SemanticLinkbacksPlugin', 'linkback_fix'));
4947
add_filter('pre_get_avatar_data', array('SemanticLinkbacksPlugin', 'pre_get_avatar_data'), 11, 5);
5048
// To extend or to override the default behavior, just use the `comment_text` filter with a lower
5149
// priority (so that it's called after this one) or remove the filters completely in
@@ -86,7 +84,9 @@ public static function linkback_fix($comment_ID) {
8684
if (!$commentdata) {
8785
return $comment_ID;
8886
}
89-
87+
if ($commentdata['comment_type']=="") {
88+
return $comment_ID;
89+
}
9090
// source
9191
$source = esc_url_raw($commentdata['comment_author_url']);
9292

0 commit comments

Comments
 (0)