Forked from glueckpress/wordpress-indieweb-custom.php
Created
August 11, 2019 23:25
-
-
Save shrysr/8f9453671fc1b5342cfc59bb9d9053ba to your computer and use it in GitHub Desktop.
[WordPress][IndieWeb] Customise relme list of the IndieWeb plugin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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