• Resolved schumatt

    (@schumatt)


    Mastodon makes it possible for users to “verify” ownership of a site linked from their profile if the site includes a link back to the Mastodon profile with the rel="me" attribute in the link tag.

    It would be nice to have a way to add this to the link generated using the Social Icons block for Mastodon. Currently the only customizations are adding an anchor name or CSS class.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I don’t think it will be added the way you want but I had a similar problem and fixed it with a child theme.

    My social menu was, well a menu named “social” and used wp_nav_menu_items to filter it (badly).

    // Add rel="me" to my Mastodon profile link in the social menu.
    function mh_mung_mastodon_me($items, $args) {
            if( $args->theme_location == 'social' ){
                    // $items .= '<-- '.$items.'-->';
                    $items = str_replace('<a href="https://mastodon', '<a rel="me" href="https://mastodon', $items);
            }
            return $items;
    }
    add_filter('wp_nav_menu_items', 'mh_mung_mastodon_me', 10, 2);
    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    This functionality has already been added to Gutenberg 14.5. You can test it now by installing the plugin, or it will most likely be included in the next version of WordPress.

    Thread Starter schumatt

    (@schumatt)

    Awesome! My site is hosted on wordpress.com so I was already able to take advantage of the change. Thanks @otto42!

    I was having a similar problem here:

    https://rikiwiki.electronicartifacts.com/about-me

    and got the gutenberg v14.6.1 as a plugin to make sure it was up to date.

    that (and changing to block edits) allowed me to put the rel attribute in the link.

    but my Mastodon instance at opalstack.social/@rik still doesn’t generate the “verified” check?

    any guesses?

    update: the issue turned out to be needing a certificate supporting HTTPS (vs http).

    Somewhat related, dunno if it’s exactly tied to this, but I noticed the “Find me on:” links on the WP.org profile pages are missing rel="me" as well.

    For example, I added my Mastodon profile URL to my profile (by adding it to my connected Gravatar account per the WP.org profile setup for some items like this) while you can see at https://profiles.www.ads-software.com/kzeni/ that the link is missing rel="me" so Mastodon doesn’t show it as verified.

    Meanwhile, GitHub & others have added rel="me" support for linking to Mastodon profile URLs. Seems like this is just an odd omission that hopefully has a quick remedy.

    *Edit: Also, it seems some icons the WP.org profile page tries to display for some of these don’t display properly (TikTok, StackOverflow, and possibly others.) Again, this might just be something specific to WP.org & how this is set up.

    • This reply was modified 1 year, 9 months ago by KZeni.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Social Icons Block – Add rel attribute for Mastodon’ is closed to new replies.