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

Commit 0ce5e3b

Browse files
committed
Add follow type
1 parent 1e79d9e commit 0ce5e3b

File tree

6 files changed

+35
-3
lines changed

6 files changed

+35
-3
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The IndieWeb community defines several types of feedback:
4646
* Listen: <http://indieweb.org/listen>
4747
* Watch: <http://indieweb.org/watch>
4848
* Read: <http://indieweb.org/read>
49+
* Follow: <http://indieweb.org/follow>
4950
* Classic "Mentions": <http://indieweb.org/mentions>
5051

5152
### How do I extend this plugin? ###
@@ -85,6 +86,9 @@ The plugin uses a locally cached version of the mystery icon normally provided b
8586

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

89+
### 3.8.1 ###
90+
* All follow post as type
91+
8892
### 3.8.0 ###
8993

9094
* Add locally hosted copy of the mystery man icon and serve it if there is no gravatar

includes/class-linkbacks-handler.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ public static function get_comment_type_excerpts() {
299299
'watch' => __( '%1$s <strong>watched</strong> %2$s (via <a href="%3$s">%4$s</a>).', 'semantic-linkbacks' ),
300300
// translators: Name verb on domain
301301
'read' => __( '%1$s <strong>read</strong> %2$s (via <a href="%3$s">%4$s</a>).', 'semantic-linkbacks' ),
302+
// translators: Name verb on domain
303+
'follow' => __( '%1$s <strong>followed</strong> %2$s (via <a href="%3$s">%4$s</a>).', 'semantic-linkbacks' ),
304+
302305
);
303306

304307
return $strings;
@@ -329,6 +332,7 @@ public static function get_comment_type_strings( $type = null ) {
329332
'listen' => __( 'Listen', 'semantic-linkbacks' ),
330333
'watch' => __( 'Watch', 'semantic-linkbacks' ),
331334
'read' => __( 'Read', 'semantic-linkbacks' ),
335+
'follow' => __( 'Follow', 'semantic-linkbacks' ),
332336
'reacji' => __( 'Reacji', 'semantic-linkbacks' )
333337
);
334338
if ( ! $type ) {
@@ -653,6 +657,7 @@ public static function comment_class( $classes, $class, $comment_id, $post_id )
653657
'listen' => array( 'u-listen' ),
654658
'read' => array( 'u-read' ),
655659
'watch' => array( 'u-watch' ),
660+
'follow' => array( 'u-follow' ),
656661
);
657662

658663
$semantic_linkbacks_type = self::get_type( $comment );

includes/class-linkbacks-mf2-handler.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ public static function get_class_mapper() {
9898
$class_mapper['watch-of'] = 'watch';
9999
$class_mapper['watch'] = 'watch';
100100

101+
/*
102+
* follow
103+
* @link http://indieweb.org/follow
104+
*/
105+
$class_mapper['follow-of'] = 'follow';
106+
107+
101108
return apply_filters( 'semantic_linkbacks_microformats_class_mapper', $class_mapper );
102109
}
103110

readme.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The IndieWeb community defines several types of feedback:
4646
* Listen: <http://indieweb.org/listen>
4747
* Watch: <http://indieweb.org/watch>
4848
* Read: <http://indieweb.org/read>
49+
* Follow: <http://indieweb.org/follow>
4950
* Classic "Mentions": <http://indieweb.org/mentions>
5051

5152
= How do I extend this plugin? =
@@ -85,6 +86,9 @@ The plugin uses a locally cached version of the mystery icon normally provided b
8586

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

89+
= 3.8.1 =
90+
* All follow post as type
91+
8892
= 3.8.0 =
8993

9094
* Add locally hosted copy of the mystery man icon and serve it if there is no gravatar

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.8.0
8+
* Version: 3.8.1
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.8.0';
26+
public static $version = '3.8.1';
2727
/**
2828
* Initialize the plugin, registering WordPress hooks.
2929
*/

templates/linkbacks.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,19 @@
116116
</div>
117117
<?php endif; ?>
118118

119-
119+
<?php if ( in_array( 'follow', $facepiles, true ) && has_linkbacks( 'follow' ) ) : ?>
120+
<div class="follows">
121+
<h3><?php echo __( 'Following', 'semantic-linkbacks' ); ?></h3>
122+
<?php
123+
list_linkbacks(
124+
array(
125+
'type' => 'follow',
126+
),
127+
get_linkbacks( 'follow' )
128+
);
129+
?>
130+
</div>
131+
<?php endif; ?>
120132

121133
<?php if ( in_array( 'watch', $facepiles, true ) && has_linkbacks( 'watch' ) ) : ?>
122134
<div class="watches">

0 commit comments

Comments
 (0)