Better UI for status update cross-posting option

Mastodon WordPress Autopost by L1am0 (GitHub)
A Wordpress Plugin that automatically posts your new articles to Mastodon

Given that I suspect most use Mastodon for short status updates (under their 500 character limit), it would be nice if there were an option for posting the_content from WordPress’ main body editor along with the URL and/or any hashtags. This way people could post short updates from their blog as status updates/asides and have the full post (or an automatically shortened version if too long) sent over with a link back to the original.

Currently the posting of Title/Link/Hashtags or Title/Content/Link/Hashtags is better for cross-posting longer blog articles which tend to have titles whereas status updates often don’t have titles.

From a UI perspective, it would also optionally be nice to have some type of character counter for the primary text box to fit into Mastodon’s guidelines. I recall there having been a plugin that did just this which might be repurposed:

To be able to switch between the various modes Title/Link/Hashtags; Title/Content/Link/Hashtags; and potentially this new Body/Link/Hashtags it would be nice if the Mastodon Autopost meta box had the option to also select between them in addition to the “Post to Mastodon” checkbox.

Syndicated copies to:

Add support for acquisition kind

dshanske/indieweb-post-kinds (GitHub)
Adds support for responding to and interacting with other sites using the standards developed by the IndieWeb Community

Based on prior art and details in the IndieWeb Wiki for acquisitions.

I’m including some potential code below, though it will also require adding the appropriate icon and some meta data in a few places for the “Kinds” meta box as well as to the admin UI locations which are currently missing.

I’ve “cheated” a bit and defaulted to display the “wish” icon and thus some of its metadata, so the acquisition kind would need its own icon (the same shopping cart icon may be best) and some small meta data would need to be changed as well in the final.

For those who need to have this right away, the code below will “work” from a display standpoint.

Taxonomy Code template

Code snippet I’ve added to indieweb-post-kinds/includes/class-kind-taxonomy.php just under the section for the wish kind:

'acquisition'  => array(
    'singular_name'   => __( 'Acquisition', 'indieweb-post-kinds' ), // Name for one instance of the kind
    'name'            => __( 'Acquisitions', 'indieweb-post-kinds' ), // General name for the kind plural
    'verb'            => __( 'Acquired', 'indieweb-post-kinds' ), // The string for the verb or action (liked this)
    'property'        => 'acquired-of', // microformats 2 property
    'format'          => 'status', // Post Format that maps to this
    'description'     => __( 'Purchases, gifts, found things, or objects donated to me', 'indieweb-post-kinds' ),
    'description-url' => '',
    'show'            => true, // Show in Settings

Naturally the “true” flag for ‘show’ should be set to “false” until the code is feature complete.

A simple view for the acquisition post kind

Add the following code to the folder indieweb-post-kinds/views/ in a file named kind-acquisition.php

 * Acquisition Template
$mf2_post = new MF2_Post( get_the_ID() );
$cite     = $mf2_post->fetch();
if ( ! $cite ) {
$author = Kind_View::get_hcard( ifset( $cite['author'] ) );
$url    = ifset( $cite['url'] );
$embed  = self::get_embed( $url );

<section class="response h-product h-cite">


echo Kind_Taxonomy::get_before_kind( 'wish' );
if ( ! $embed ) {
    if ( ! array_key_exists( 'name', $cite ) ) {
        $cite['name'] = self::get_post_type_string( $url );
    if ( isset( $url ) ) {
        echo sprintf( '<a href="%1s" class="p-name u-url">%2s', $url, $cite['name'] );
    } else {
        echo sprintf( '<span class="p-name">%1s</span>', $cite['name'] );
    if ( $author ) {
        echo ' ' . __( 'by', 'indieweb-post-kinds' ) . ' ' . $author;
    if ( array_key_exists( 'publication', $cite ) ) {
        echo sprintf( ' <em>(<span class="p-brand">%1s</span>)</em>', $cite['publication'] );


if ( $cite ) {
    if ( $embed ) {
        echo sprintf( '<blockquote class="e-summary">%1s', $embed );
    } elseif ( array_key_exists( 'summary', $cite ) ) {
        echo sprintf( '<blockquote class="e-summary">%1s</blockquote>', $cite['summary'] );
// Close Response



Future enhancements

Future additions/improvements to this kind could include potentially adding new data fields to indicate the “location purchased” as well as the “purchase price”, the “manufacturer” and maybe the “condition” with a dropdown for selecting options like brand new, like new, very good, good, acceptable, poor, and unspecified. These could be marked up with the h-product related microformats of p-price and p-brand. These would then need to be tucked into the view as appropriate as well.

Syndicated copies to: