[WordPress][IndieWeb] Customise relme list of the IndieWeb plugin.
<?php | |
/** | |
* Plugin Name: IndieWeb | Customisations | |
* Description: Customises relme list of the IndieWeb plugin. | |
* Version: 2019.01 | |
* Author: Caspar Hübinger | |
* Author URI: http://glueckpress.com/ | |
* License: GNU General Public License v2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
defined( 'ABSPATH' ) or exit; | |
add_filter( 'wp_relme_silos', function( $silos ) { | |
$silos[ 'mastodon' ] = [ | |
'baseurl' => '', | |
'display' => __( 'Mastodon profile URL', 'indieweb' ), | |
]; | |
/* LinkedIn is already set up as a contact method by the IndieWeb plugin, | |
but it’s not included in the h-card relme list, so we’re explicitly | |
include it here. */ | |
$silos[ 'linkedin' ] = [ | |
'baseurl' => '', | |
'display' => __( 'LinkedIn profile URL', 'indieweb' ), | |
]; | |
$silos[ 'wordpress'] = [ | |
'baseurl' => 'https://profiles.wordpress.org/%s/', | |
'display' => __( 'WordPress.org username', 'indieweb' ), | |
]; | |
return $silos; | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment