Skip to content

Instantly share code, notes, and snippets.

@dshanske
dshanske / micropub-syndication.json
Created April 25, 2018 22:55
Example Return from Syndication
{"syndicate-to":[{"uid":"bridgy-publish_twitter","name":"Twitter via Bridgy Publish"},{"uid":"bridgy-publish_facebook","name":"Facebook via Bridgy Publish"},{"uid":"bridgy-publish_github","name":"Github via Bridgy Publish"}]}
@dshanske
dshanske / post-kinds-change-kind.php
Created December 8, 2017 14:06
Simple Plugin to Change Post Formats
/**
* Post Kinds Custom Post Format Change
* Plugin Name: Post Kinds Custom Post Format
* Plugin URI:
* Description: Change Post Kind to Post Format Mapping
* Version: 0.0.1
* Author: David Shanske
* Author URI: https://david.shanske.com
*/
<?php if ( ! empty( $comments_by_type['webmention'] ) ) { ?>
<div id="mentionlist-container" class="comment-tab">
<ol class="mentionlist">
<?php // not calling wp_list_comments twice, as it breaks pagination
$pings = $comments_by_type['webmention'];
foreach ($pings as $comment) { ?>
<li class="ping">
<?php get_avatar($comment); ?>
<div class="ping-meta"><?php comment_date( get_option( 'date_format' ), $comment ); ?></div>
javascript:location.href='https://tiny.n9n.us/?indie-action=like&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)