From 8483178842956bea174fa1fdcbd90909b680ec08 Mon Sep 17 00:00:00 2001
From: Timo Tijhof
Date: Tue, 7 Feb 2023 21:11:27 +0000
Subject: [PATCH] mu-plugins: Add support for `rel="me"` and enable for
jquery.com
---
mu-plugins/jquery-actions.php | 16 ++++++++++++++++
sites.php | 3 +++
2 files changed, 19 insertions(+)
diff --git a/mu-plugins/jquery-actions.php b/mu-plugins/jquery-actions.php
index de1dd2ea..03de347b 100644
--- a/mu-plugins/jquery-actions.php
+++ b/mu-plugins/jquery-actions.php
@@ -42,3 +42,19 @@
$events[ 'past' ] = array_reverse( $events[ 'past' ], true );
});
+
+// https://docs.joinmastodon.org/user/profile/#verification
+// https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/me
+// https://microformats.org/wiki/rel-me
+// https://gmpg.org/xfn/
+function jquery_xfnrelme_wp_head() {
+ $sites = jquery_sites();
+ $links = isset( $sites[ JQUERY_LIVE_SITE ]['xfn-rel-me'] ) ?
+ $sites[ JQUERY_LIVE_SITE ]['xfn-rel-me'] :
+ array();
+ foreach ( $links as $url ) {
+ echo '' . "\n";
+ }
+}
+
+add_action('wp_head', 'jquery_xfnrelme_wp_head');
diff --git a/sites.php b/sites.php
index 527a1060..e90a26c9 100644
--- a/sites.php
+++ b/sites.php
@@ -10,6 +10,9 @@ function jquery_sites() {
'blog_id' => 1,
'cookie_domain' => '.jquery.com',
'body_class' => 'jquery',
+ 'xfn-rel-me' => array(
+ 'https://social.lfx.dev/@jquery',
+ ),
'options' => array(
'blogname' => 'jQuery',
'description' => 'jQuery: The Write Less, Do More, JavaScript Library',