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

Commit 0126711

Browse files
committed
Refbacks will be handled by their own plugin
1 parent e9a676f commit 0126711

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
**Tags:** webmention, pingback, trackback, linkback, microformats, comments, indieweb
55
**Requires at least:** 4.9
66
**Requires PHP:** 5.6
7-
**Tested up to:** 5.5
8-
**Stable tag:** 3.10.3
7+
**Tested up to:** 5.6
8+
**Stable tag:** 3.10.4
99
**License:** MIT
1010
**License URI:** http://opensource.org/licenses/MIT
1111

@@ -86,6 +86,10 @@ The plugin uses a locally cached version of the mystery icon normally provided b
8686

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

89+
### 3.10.4 ###
90+
91+
* Remove refbacks as a default. Add a filter to decide on what comment types would be used.
92+
8993
### 3.10.3 ###
9094

9195
* Use `comment` as default comment-type: https://core.trac.wordpress.org/ticket/49236

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"installer-name": "semantic-linkbacks"
1414
},
1515
"require": {
16-
"php": ">=5.3.0",
16+
"php": ">=5.6.0",
1717
"composer/installers": "~1.0",
1818
"mf2/mf2": "*",
1919
"p3k/emoji-detector": "*"

includes/class-linkbacks-handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public static function register_meta() {
172172
*/
173173
public static function enhance( $commentdata, $comment = array(), $commentarr = array() ) {
174174
// check if comment is a linkback
175-
if ( ! in_array( $commentdata['comment_type'], array( 'webmention', 'pingback', 'trackback', 'refback' ), true ) ) {
175+
if ( ! in_array( $commentdata['comment_type'], apply_filters( 'semantic_linkbacks_enhance_comment_types', array( 'webmention', 'pingback', 'trackback' ) ), true ) ) {
176176
return $commentdata;
177177
}
178178

@@ -205,7 +205,7 @@ public static function enhance( $commentdata, $comment = array(), $commentarr =
205205
if ( isset( $commentdata['comment_meta']['semantic_linkbacks_type'] ) ) {
206206
if ( in_array( $commentdata['comment_meta']['semantic_linkbacks_type'], apply_filters( 'semantic_linkbacks_comment_types', array( 'reply' ) ), true ) ) {
207207
// https://core.trac.wordpress.org/ticket/49236 - As of WP5.5, comment will be the default comment type, not empty.
208-
$commentdata['comment_type'] = version_compare( get_bloginfo( 'version'), '5.5', '>=' ) ? 'comment' : '';
208+
$commentdata['comment_type'] = version_compare( get_bloginfo( 'version' ), '5.5', '>=' ) ? 'comment' : '';
209209
}
210210
}
211211

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Donate link: https://notiz.blog/donate/
44
Tags: webmention, pingback, trackback, linkback, microformats, comments, indieweb
55
Requires at least: 4.9
66
Requires PHP: 5.6
7-
Tested up to: 5.5
8-
Stable tag: 3.10.3
7+
Tested up to: 5.6
8+
Stable tag: 3.10.4
99
License: MIT
1010
License URI: http://opensource.org/licenses/MIT
1111

@@ -86,6 +86,10 @@ The plugin uses a locally cached version of the mystery icon normally provided b
8686

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

89+
= 3.10.4 =
90+
91+
* Remove refbacks as a default. Add a filter to decide on what comment types would be used.
92+
8993
= 3.10.3 =
9094

9195
* Use `comment` as default comment-type: https://core.trac.wordpress.org/ticket/49236

semantic-linkbacks.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Semantic Linkbacks for WebMentions, Trackbacks and Pingbacks
66
* Author: Matthias Pfefferle
77
* Author URI: https://notiz.blog/
8-
* Version: 3.10.3
8+
* Version: 3.10.4
99
* License: MIT
1010
* License URI: http://opensource.org/licenses/MIT
1111
* Text Domain: semantic-linkbacks
@@ -23,7 +23,7 @@
2323
* @author Matthias Pfefferle
2424
*/
2525
class Semantic_Linkbacks_Plugin {
26-
public static $version = '3.10.1';
26+
public static $version = '3.10.4';
2727
/**
2828
* Initialize the plugin, registering WordPress hooks.
2929
*/

0 commit comments

Comments
 (0)