My October in Review – Courtesy of Google

I have Location History with Google enabled. In October, as you may have noticed, especially if you visit my site, you may notice I was traveling around Ireland fro pleasure and business. Google sent me this email. I’ve taken some screenshots of it.

It shocks me how good Google has gotten with this over time, even going back to old dates, it has enhanced the information and cross-referenced the photos I’ve backed up to Google Photos. It has created a timeline and trip report I’d love to have a copy of. I can extract the data…but not the presentation so easily.

But this is the level of presentation I’d like to achieve someday on this website for my own trips. Not sure how I’ll get there, but being as Google has teams of engineers and I play with my website as a hobby…might be a while.

IndiewebPress: Users

This is the one of a series of brainstorming posts I am putting out about how major functional Core changes to WordPress could result in an improved experience for those interested in pursuing Indieweb philosophies in WordPress.

In the Indieweb world, your domain is your identity. This would suggest that most WordPress sites should only have one user…representing the identity of the site. Users, however, represent roles and responsibilities within the system, not necessarily content creators.

In an update to the ‘official’ Indieweb plugin, I, with some encouragement, added the idea of designating a specific user as the ‘identity’ of the site…assuming there was one.  But let’s expand that idea a bit. We have user metadata, we have the ability to define new roles and capabilities. So, what can we do with this but create new possibilities? We can better work what a role is, and add additional properties and behavior to improve the system.

There is a setting for an admin email, for which the suggestion to expand outward has been proposed for 8 years in this vein. This should be a property of any administrative account.

I have an idea I’ve long wanted to implement. It is based on a feature used by Postmatic. People who subscribed to the email service they provided would end up as users on your site. I’d like to see enhancements to the user profile. When trying to add other site profiles to user metadata, I discovered that this being left to the plugins has resulted in a complete lack of consistency.

There needs to be a consistent structure to add data to support URLs on specific other types of sites( for example, Twitter), or every plugin is going to have to retread this. This is the trouble we have with all metadata unfortunately.

That idea of using the user table for outside visitors has a lot of good potential. Commenters could create a profile on your site that could be imported from elsewhere…namely your own website. There is a certain level of trust there, because you would be displaying images and text about a person from another site…however, that is what gravatar does. Why not allow people to do it from their own site?

Gravatar itself is something that WordPress wouldn’t have put in today….a reliance on an outside service. The local avatar trac ticket is also a rather old request. It is time to look at avatars in general…to build a robust local system that is enhanced by gravatar…gravatar should not be that system. We can add in modern themeable profiles for users, as opposed to just archive pages. We can make a much better system for users.

The whole point of the ‘subscriber’ role in WordPress is for people not part of the blog to have an account they can do something with…follow the site, get updates, participate in comments…but this part of WordPress is woefully underused.

IndiewebPress: Connecting Your Site and Mine

This is the one of a series of brainstorming posts I am putting out about how major functional Core changes to WordPress could result in an improved experience for those interested in pursuing Indieweb philosophies in WordPress. This builds on a previous article about improving comments.

In the previous article, I discussed my thoughts on the subject of comments as a structure and what comments could be capable of if that structure was improved. But, when I showed that to several people, the comment was, quite legitimately, that I didn’t explain what could be built on top of that. I had another topic in mind before covering this, but that made me want to document this as well.

Let’s start with webmentions. Webmentions builds on the idea of the two protocols that are built into WordPress: Pingbacks and Trackbacks. Trackbacks have to be discarded from WordPress. There is no verification of them…it is basically letting anyone post something on your site…moderated or not. The other site tells you they’ve linked to you(even if they haven’t) and what to make it look like on your site. And because of this…while I’ve tried to think of ways to save it, I think it needs to, over time, go on the chopping block.

Pingbacks, despite actually verifying that a URL links to where it says it does, currently don’t do anything else interesting in WordPress. The appearance and usage has stagnated. It could be improved on the display side, and I’ve tried to get interest in that…but I’m wondering as we move forward…considering the legacy design issues, the bad feelings, what I would like to see happen with comments, etc…if we should just let Pingbacks stay where they are with only some performance and other minor refinements, and develop Webmentions.

Webmentions have advantages. They support update and delete functionality if the source changes in the future. They have a standard recommended by the W3C(which the previously implemented protocols do not), as well as a dedicated community who has implemented them on their sites.

What was never realized in potential by previous protocols, but Indieweb community members are implementing is the magic. Someone links to your site with a post on their site. They use webmention to tell you that they linked to you. But what your site does at that point is controlled by you. You can parse their post and display it as a comment, or based on how their page is marked up, derive other meaning and relationships from it. You can just use it in a simple counter or stat display to note how many people linked to you. There have been some fun discussions of using it to share bibliographic data.

If you had to pick one thing, webmention is the key building block on which the Indieweb is built. By itself, it requires no trust on the part of the receiver. There is a developing extension called Vouch which allows the sender to provide proof that someone the receiver knows trusts them. And, moderation aside, presentation of this is wholly left to the receiving site. Back to the comment point in the previous article on this, one of the functional WordPress problems is that there is no way for a plugin to declare a custom comment type and tell the theme how to display it or whether to display it at all. You effectively have to hijack the comment template to do this, instead of working with it.

To the point of something like annotations, the idea of fragmentions which allow a specific part of a post to be referenced more effectively…WordPress doesn’t support inline comments of any type or marginalia. There is a trac ticket to implement the W3C’s work on annotations, but WordPress has nothing to allow for displaying this sort of work.

There is a current Webmentions plugin for WordPress that is under continual development. It was created by Matthias Pfefferle, and I have been a regular contributor to it. It handles the functional plumbing of webmentions, but not the improved display aspect. That has been delegated by its creator to a second plugin, Semantic Linkbacks, which attempts to offer the parsing of external sites and deriving information like author(name and photo), etc.

It is worth trying the combination of these. But there is more that can be done here as well. Cover more types, improve the ability to store commenter’s data, etc.

 

IndiewebPress: Improving Comments

This is the one of a series of brainstorming posts I am putting out about how major functional Core changes to WordPress could result in an improved experience for those interested in pursuing Indieweb philosophies in WordPress.

Comments in WordPress were originally thought of as a way for visitors to a site to have discussions on the site. I’m going to refer to the traditional comment idea as ‘local comments‘. This is where someone fills out a comment form on a post, which adds a comment to the page, either with or without moderation.

Also built-in to WordPress are pingbacks and trackbacks. These are where another site notifies of a link to the page and this is displayed as a comment on the page. Pingbacks and trackbacks have their issues, and admittedly, WordPress, except for some minor tweaks, has left the presentation and features of these mostly unchanged, save for some security efforts. Therefore, it has become common to disable them. Webmentions are a replacement for the older pingback and trackback protocols.

There are also custom comment types used for things like logs, receipts(See mention in Trac Ticket which notes that popular plugin Easy Digital Downloads does this), etc. which are not part of the general vision of what a comment is. Of course, custom post types aren’t all traditional posts either.

Meanwhile, other areas of WordPress are getting functions to register functionality. 1n December of 2015, a ticket was opened for Custom Comment Types. This would, in theory, mirror the functionality of Custom Post Types, where a registration function would declare the functionality and behavior of a comment type.

But there are issues here beyond what is identified in the ticket. How will a theme know how to display the new comment type? There needs to be a way for this to be specified by the registration and overridden by themes that know what that comment type is. There is a possibility there may be some breaking changes in that design.

Meanwhile, comments cannot be referenced uniquely and distinctly. There is another ticket equally old, proposing comment permalinks. Whether this is just to find the comment on whatever page it is on, or allowing a comment template that emphasizes the comment by itself, it is an aspect of the comment system that needs replacing.

That addresses the structure, but not what could be done with it. Not only would this allow for webmentions as a medium to create comments(webmentions being the successor to pingbacks), but support for responses that are popularly used today such as like, emoji, annotation, etc. The Semantic Linkbacks plugin tries to create these relationships in comment meta, but it is not as robust as a supported implementation would be.

Annotations and marginalia recently have been of interest in allowing people not to just comment on a post as a whole, but on specific areas of it. This could also be a promising piece of a comment overhaul…supporting this. In my contributions to the Webmentions plugin, I started this by supporting URL fragments(see fragmentions), which would allow for a specific part of the post to be highlighted.

 

Thinking about Mary Tyler Moore

https://www.youtube.com/watch?v=Hmpmcen4eEs

I’ve been a fan of Mary Tyler Moore for a long while. The Dick Van Dyke show, where she was a supporting character, and the Mary Tyler Moore show where she starred. I even remember her appearance on Shalom Sesame, which I found this Youtube clip of.

The laughs aside, the thing that stays with me out of her body of work the most is the end of the Mary Tyler Moore show. In the show, a new manager has arrived and wants to do something about the low ratings of the news program the characters produce. He fires the production staff, but keeps the on-air talent…a well meaning type known for flubbing his lines. The same individual tries to write his own goodbye to his friends, deciding that the right words are, for reasons unknown,  “It’s a Long Way to Tipperary, it’s a long way to go.

The scene is one of the most memorable in TV history, with Mary’s character expressing that a group of people who work together, who spend time together…become like your family. Despite all of the sadness in the scene, the characters leave their office…their home away from home…for the last time, heads held high, singing. There is a lesson in that scene that resonated with me.

It’s a long way to Tipperary. It’s a long way to go.

My 2017-01-01 Commitment – Location Support Returns

I decided as part of my annual end-of-year Indieweb commitment, to complete an update to the location services on my site. I originally announced location support on this site in April of 2015(See Link). I’ve been working on a rewrite on and off for nearly a year now, and wanted to finally release it.

This post, for example, is set as if it was made at the Empire State Building.

Coming in the future is venue support. A venue is sort of the location equivalent of a bookmark. There are other names for it. It would allow more information about the location, and you would be able to view all posts associated with that location. This leads to what has become common on social media sites…the check-in. I used to store more information about the location in the post, and won’t be doing this anymore.

More to come on location and more, but I’m glad I got a version of this out. Thanks to Chris Aldrich for testing this out.

 

 

Winter Doo Wop Explosion

On Sunday, I went to Queens College to attend the Winter Doo Wop Explosion.

  • The Jarmels
  • Kid Kyle
  • Barbara Harris and The Toys
  • Vito Picone and The Elegants
  • Jay Siegel’s Tokens
  • Cancelled: Lenny Dell and The Demensions

I’ve been a fan of 50s music since I became fond of the classic movie, Back to the Future, as a child, and came to listen to a lot of music from that era.

The Jarmels

The audience was also from that era. The majority of people there were of an older bent. The Jarmels were only 33% original, and 66% replacement. But I am always struck by the performances by doo wop groups, and what they do with their hands and feet while performing…something you can’t hear in the recording. The Jarmels only had one hit, A Little Bit of Soap.

Kid Kyle was one of the youngest people there, except me. Of course, he got paid. He’s just under 22 and has been singing doo-wop since he was 8. It is nice to see that these songs will not die with their originators and original fans.

The Toys were formed in 1961 in Jamaica, Queens. Barbara Harris, the lead singer of the Toys, is still actively touring with two younger musicians. While it was my least favorite act, mostly because I found the pitch painful because I was too close to the right speaker( 5 rows from the front), Harris was impressive in the energy she is still able to convey. She had several Senior Citizens dancing in the aisles.

 

The Elegants also only had a single hit…Little Star, which Vito Picone recorded when he was 17. Now 75, he and the remaining Elegants performed not only that song, but a doo-wop cover of Ray Charles’ Georgia(Picone oddly put on dark sunglasses for that), as well as several other songs.

Kid Kyle and Co

Finally, the Tokens appeared. Out of these groups, I had seen the Tokens perform before. Their version of The Lion Sleeps Tonight, with Jay Siegel still able to hit the high notes he hit in 1961 is still impressive, and despite other recordings predating it, is generally the best known version of the song.

The group started in Brooklyn, and Neil Sedaka was one of its early members. The Tokens also produced other musical acts, such as the Chiffons, Randy and the Rainbows, the Happenings, etc.

For anyone interested in their next concert, the same production group is bringing Vito Picone back, along with the Happenings, the Marcels, The Tymes, and The Excellents on Saturday, March 25th, 2017 at 7:30PM, also at the Colden Auditorium at Queens College. Call 718-423-8394 for more information.

The event was also the first I brought my new 360 degree camera to. It is interesting to take a video where you can see not only the audience, the performers…but me reacting to them. That’s a bit too much me in the shot. I like a bit more subtlety.

But there is some part of me that wishes random people still formed doo-wop groups. Part of me would enjoy the experience of singing with one at least once.

 

CBS’s Elementary Gets Kosher Wrong

So, I decided to watch Elementary. Which made me a bit annoyed. Please forgive me if I spoiled it. If you care about watching it yourself, stop reading now.

The episode that aired last night, entitled, How the Sausage is Made…has Sherlock Holmes coming up with a conspiracy where there is a enough profit in the FDA classifying artificially grown meat as a ‘meat substitute’ instead of as meat to allow Jews to eat cheeseburgers and Muslims to eat pork that someone would kill to ensure it.

During the course of the episode, Holmes tries to explain kosher law, among other things….that food is broken out into meat and dairy, and a third category that is neither…one he calls Parevah. I usually say Pareve, but even par-veh is correct. I’ve never heard anyone call it pareva, to be honest and I asked around this evening. There isn’t one person who could look up the common pronunciation. One would assume the character might be wrong, but in the scene he had just met with some rabbis discussing the issue, so he should have just heard it. On the other hand, if you google pareve, and click the pronounciation, it pronounces it paravah also, I embedded Google’s pronunciation below. Either someone tell me they’ve heard it pronounced as three syllables or someone at Google please correct it.

 

Perhaps in a universe where the Convocation of Orthodox Rabbis(I’m assuming as a stand-in for the OU, the Orthodox Union) exists, the issues are different. I confess to not be as familiar with the Halal certification bodies in the U.S. but I am fairly familiar with the kosher ones.

So in the end, Holmes and Watson lead the murderers to believe that the bodies that certify kosher and halal food will, because of the suspicious murder, never certify the artificial meat as ‘pareva'(sorry, it just annoys me) and that the whole murder would therefore be pointless as the product would be relegated to the vegan aisle. And if someone confeeses to the murder, the rabbis and the imams will change their mind because ‘murder is not kosher.’ I would hope that the two characters are lying through their teeth, but I would hope that two individuals who are counting on a big payday from kosher and halal sales would know better the issue if they are going to kill for it.

The truth of the matter is that the issue of whether meat grown in a lab would be considered not to be meat, and thus not subject to the prohibitions of keeping meat and dairy separate is not an issue so clear cut for many reasons, so it would not be something that they would hold over the heads of would-be murderers like a business transaction. If you just search for kosher artificially grown meat, the first few entries lay out how much debate would be necessary to settle the issue. And in my personal opinion, it is much more likely to be classified as meat.

That said, the suggestion that all Jews are sitting around, clamoring for the opportunity to find a loophole to eat cheeseburgers and other food which is not kosher(the same for Muslims) suggests an extreme level of cynicism.

I have to say, while television is often lacking in realism, and often poorly written, this seems to be a case of a writer trying to come up with a clever story, but failing to do five seconds of research to put the issue into a realistic perspective. And, while poor characterizations of Jews on television has always annoyed me, sloppy storytelling annoys me even more.

Fyvush Finkel Remembered

I found out that Fyvush Finkel died early this morning at his apartment in Manhattan at the age of 93. I had been a fan of his since I had seen him on Picket Fences when I was a kid. The more I learned about him, the more I became a fan of his. On Picket Fences, in this show set in a small Wisconsin community…there is a larger than life Jewish character. I can’t say that he was acting per se…as all of Fyvush’s performances were him. He brought his presence to everything I saw him in.

There is very little I can say about him that hasn’t been said already. Even as recently as last month, he was making the news with his declaration of support for Hillary Clinton. And every few months, since the picture below as taken, I would try to attend the Yiddish Artists and Friends Actors Club events, where he would act as the Master of Ceremonies.

He was active till the end and always full of enthusiasm, which is why, despite his age, I am surprised at the news.

The best we can do at a time like this is remember, so below is a excerpt I found of one of the YAFAC events I attended, telling one of his classic jokes.

Attended an event this evening and got to meet Fyvush Finkel. I've been a fan of his for years.
Attended an event this evening and got to meet Fyvush Finkel. I’ve been a fan of his for years.

Lessons Learned from IndiewebCamp and WordCamp

For a little over two years, I have been involved in Indiewebcamp. This past weekend, for the first time in five years, I was able to attend WordCamp.

WordCamp NYC was a massive undertaking, to which I must give credit to the organizers. WordCamp was moved to coincide with OpenCamps week at the United Nations, which added security headaches to the fold as well. There were 500 attendees just for WordCamp alone. I have to congratulate them for their hard work.

By comparison, an Indiewebcamp is a smaller, more intimate affair that is happy to get 20 people. In a discussion with Shane Becker, who is organizing Indiewebcamp LA in November, he has a personal goal of getting a hundred people there. But more people makes for a very different conference than 20.

For me, the scale of WCNYC created problems. Contributor’s Day, the smaller pre-event for people interested in contributing to WordPress, found me in a room full of people interested in being involved in Core not interacting, sharing ideas, or picking each other’s brains…but mostly working independently. There were isolated pockets of people helping each other, but I felt that should have been what was encouraged. The equivalent at an IndiewebCamp is the Hack Day, where people announce at the beginning what they are thinking of working on, which encourages people who have similar interests to interact as they build something. And at the end, you present to all a demo of what you created.

For the panels at WordCamp, I found the speakers very engaged, but two tracks, one for users and one for developers led to a wide range in each room. WordCamp Orange County, the previous weekend, had four tracks. WordCamp Boston, next week, has three. On the first day, Designers, Developers, and Intro to WP/WP in Higher Education. The second day has Users/Writers, Business/Entrepreneurs, and a Contributor’s Day track.  That seems like an organization that appeals to me a bit more.

The appeal to me of IndiewebCamp sessions is that they are more interactive. You get to discuss an idea in more detail. I look forward to seeing how that might scale.

I enjoyed WordCamp, and it had a lot to offer. I suppose I am just looking for more opportunities to share interests inside the conference activities, instead of outside them.

1776

In rewatching 1776, which I do around Independence Day every year, I am reminded of the writer, Peter Stone’s great bit for Lewis Morris, the delegate from New York…who spends the entire play remarking, “New York abstains…courteously.”

Finally, it is the character of John Hancock who finally loses his temper and asks him about it. Portrayed by Howard Caine in the movie, Morris admits that the New York Legislature has never given him specific instructions on anything. “Have you ever been present at a meeting of the New York legislature? They speak very fast and very loud and nobody listens to anybody else with the result that nothing ever gets done.

Nothing much has changed in New York politics since 1776…or at least when Stone wrote the play in the late 60s. Stone also wrote the screenplay for The Taking of Pelham One Two Three(the original, not the horrible John Travolta remake), which also pokes a lot of fun at New York, as well as the 1997 musical(not to be confused with the movie) Titanic.

I actually repurchased 1776 this year on Blu-Ray. The new version includes an all-new commentary, an extended version, and some deleted scenes. I found this lengthy explanation of the various cuts over the years in the Amazon commentary. To summarize:

  • The movie premiered in 1972, approximately forty minutes shorter than the director’s original cut.
  • “Cool Cool Considerate Men” was cut after a negative reaction from the White House regarding the scene’s anti-conservative tone, studio executives agreed to remove eight solid minutes. So great was the pressure that the original negative and all known parts of the scene were destroyed. A search began for any version of the missing footage.
  • The restored film on the laserdisc was presented in the widescreen format and remixed for true stereo sound using the original multi-track units (in some cases as many as twenty-four tracks). It contained a total of 40 minutes of footage not seen since the two premiere screenings in 1972. Other highlights of the Laser Disc version were the full opening credits, newly incorporated character closeups and additional music for several songs. The running time was once again 180 minutes. The 1992 Pioneer Laser Disc Special Edition of 1776 was one of the most ambitious video restorations ever performed.
  • For the 2002 DVD release, the replaced footage was been repaired, giving the DVD a much cleaner look visually than the laserdisc, but the film was been shortened to 166 minutes.
  • Finally, in 2015, the director’s cut of 1776 has made its way to Blu Ray and it includes a “branching version of the movie” with both an extended and the director’s cut, which incorporate many of these missing moments mentioned from the Laser Disc,scrubbed up and restored to as pristine a quality as possible.
  • The Extended cut has everything that was on the Laser Disc except: Overture and Entr’acte created for the LD; Scene of Jefferson (sitting on a window sill in Congress) watching some children playing (rather patriotically) as a young girl looks back up at him and smiles; An extended scene (just after the conclusion of Yours, Yours, Yours): Instead of the blackout (that now occurs between scenes) there was one continuous scene showing the breaking dawn as Franklin arrives, after taking a piece of fruit in the marketplace, and finds Adams asleep on the stairs below Jefferson’s room while a lamplighter blows out a nearby streetlight; The underscoring to John and Abigail’s final scene [leading into “Compliments”] — though the underscoring to Franklin’s entrance has been restored.

On a related note, anyone want the DVD copy? I can give you a good price? And I just noticed the 42nd anniversary edition of Taking of Pelham 123 is out…with interviews with surviving production individuals, and the single surviving lead actor….think I should click? The one saving grace of Blu-Rays lately vs streaming are the extras they bring to the table, especially for classics. They keep rereleasing things with more material and trying to get me to buy it. They may succeed in this case.

Why Microformats

I’ve spent some time on this site commenting on the use of various Indieweb concepts, but I haven’t really touched on Microformats. Microformats just turned 11 years old.

Microformats are human-readable markup that are easily human readable as well as machine readable. They appear as classes attached to HTML elements in webpages. The most popular alternatives to Microformat markup are things like schema.org, RDFa, etc.

The mistake people make is that it is overly technical. The vocabulary of the current iteration of the standard is simple. The below is a simple example. For example, h-card is the vocabulary for marking up people, organizations, and places. The below is a minimal h-card identifying name and associated URL.

<div class="h-card">
<h3 class="p-name">David Shanske</h3>
<a class="u-url" href="https://david.shanske.com">Website></a>
</div>

Then there is h-entry, which is used for individual posts on this site, or any episodic content. It is a equally easy, though like h-card, you can add more elements.

<div class="h-entry">
<time class="dt-published" datetime="2016-06-22T02:34:16-0400">June 22, 2016</time> <p class="e-content">This is my content</p> </div>

And so on. Not only does it identify…what is the content, what is the publish date, etc. in a way a human could realistically read enough to mark it up, it can be parsed and read by a computer. It is easy, if you understand HTML enough to read it, how to mark up the elements.

And then come the advantages. If parsers can read the elements of your site, they can interpret your intent. The community has developed vocabulary to indicate many relevant things, and put out programs, sites, and in my case, WordPress plugins that take this data and turns it into things like: ‘likes’, meaningful comments, event RSVPs, etc.

I’ve been posting articles on adding Microformats to a WordPress site. Once added, the site can be properly parsed, and can be used to do these things. How do I know? My site already does them.

 

 

Converting WordPress Themes for Microformats 2 – Part 1

I won’t claim to be a Microformats expert…but the below are some simple steps that can be taken to adjust a theme structurally for Microformat posts.

The below filters can be added to a theme’s functions.php, but you have to make sure that your theme uses the post, body, and comment class functions, and that it doesn’t style hfeed or hentry. Also, hfeed is often added to the theme, and should be removed to avoid duplication.

 

/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function body_classes( $classes ) {
	// Adds a class of hfeed to non-singular pages.
	if ( ! is_singular() ) {
		$classes[] = 'hfeed';
		$classes[] = 'h-feed';
	} else {
		if ( 'page' !== get_post_type() ) {
				$classes[] = 'hentry';
				$classes[] = 'h-entry';
		}
	}
	return $classes;
}
add_filter( 'body_class', 'body_classes' );
/**
 * Adds custom classes to the array of post classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function post_classes( $classes ) {
	$classes = array_diff( $classes, array( 'hentry' ) );
	if ( ! is_singular() ) {
		if ( 'page' !== get_post_type() ) {
			// Adds a class for microformats v2
			$classes[] = 'h-entry';
			// add hentry to the same tag as h-entry
			$classes[] = 'hentry';
		}
	}
	return $classes;
}

add_filter( 'post_class', 'post_classes' );

 

Now the below adds microformats 2 classes to the avatar photo and to comments.

/**
 * Adds mf2 to avatar
 *
 * @param array             $args Arguments passed to get_avatar_data(), after processing.
 * @param int|string|object $id_or_email A user ID, email address, or comment object
 * @return array $args
 */
	function get_avatar_data($args, $id_or_email) {
	if ( ! isset( $args['class'] ) ) {
		$args['class'] = array( 'u-photo' );
	 } else {
		$args['class'][] = 'u-photo';
	 }
	return $args;
	}

add_filter( 'get_avatar_data', 'get_avatar_data', 11, 2 );

/**
 * Adds custom classes to the array of comment classes.
 */
function comment_classes( $classes ) {
	$classes[] = 'u-comment';
	$classes[] = 'h-cite';
	return array_unique( $classes );
}

add_filter( 'comment_class', 'comment_classes', 11 );

This allows for the simplest conversion of themes to the basic Microformats 2 structure. In the second part, we start moving into other more invasive modifications of the theme.

Timezone Offsets in WordPress Themes

There is an odd implementation detail of many themes that has created a parsing problem with timestamps. It is actually a WordPress/PHP issue. The below is an excerpt from _s(Underscores) that appears in a large amount of themes.

$time_string = sprintf( $time_string,
   esc_attr( get_the_date( 'c' ) ),
   get_the_date(),
   esc_attr( get_the_modified_date( 'c' ) ),
   get_the_modified_date()
);

The string in question is used in a generated line of HTML, which usually looks like something below.

<time datetime="2016-06-21T22:48:40+00:00">June 21, 2016</time>

A parser reading the above will read it as 10:48PM UTC/GMT. Assuming it converted that into local time, it would actually be 6:48PM EDT. However, in reality, I posted at 10:48PM Eastern Time. It just omitted the timezone offset, putting in +00:00.

The timezone offset is properly shown if you replace ‘c’ with DATE_W3C or DATE_ATOM. The alternative is to add the date in as GMT.  Without proper timezone offsets, posts will be parsed as being at the wrong time.

Related:

https://core.trac.wordpress.org/ticket/25768

https://core.trac.wordpress.org/ticket/20973

 

 

Why Webmentions in WordPress

I had originally wrote this on January 27th, as part aof an email exchange between myself and the WP Tavern. However, after being told by Jeff Chandler, contributing writer for the site, that he was away and would discuss the matter further in March, I received no further word. After the site posted a somewhat inaccurate article on webmentions on March 18th, I commented to them again that I was disappointed that the article was not checked for accuracy. Again, no response. So I am posting my January 27th article and withdrawing from WP Tavern’s request for exclusivity on any such article due lack of response on their part. The dialogue on Webmentions in WordPress continues.

 

Over the last few years, as the smartphone has become more popular, we’ve moved from being excited about notifications to being worried about notification overload. Companies are hoping to get more data on us so they can tailor their interactions with us. We install analytics on our websites to determine how many visitors we get and what they did on our sites. At its simplest level, a linkback is a way of having a site(the sender) notify another site(the receiver) when it links to it. It sounds like something we would want to know and would have many potential uses.

WordPress has two built in linkback protocols: Trackback and Pingback. To many users, they seem like the appendix of WordPress. People don’t care about them until they are exploited by bad actors. There is a newer protocol, the first linkback protocol to be accepted as a draft specification from the W3C, the main standards organization for the Internet, called Webmention.

Webmention improves upon the previous protocols. It uses an HTTP POST request to send two parameters…the source and target URL. By comparison, trackback, which also uses HTTP, only sends the source URL and does nothing in its WordPress form to verify the trackback is legitimate. Pingback, like webmention, sends both source and target, but it uses XML-RPC as opposed to a POST request. XML-RPC has had some controversy around it as well. There are also several practices that are recommended by the Webmention specification that would make an implementation more robust than the implementations of Trackback and Pingback.

WordPress has a longstanding reputation of commitment to backward compatibility and isn’t going to flick the switch and remove pingback and trackback code from WordPress Core so easily, with or without a replacement.  It makes sense to make improvements to the older protocols concurrently with adopting webmentions, although it would also be a good idea to consider gradually deprecate the older protocols in favor of webmentions. Trackbacks have no source validation built into WordPress as it was not part of the original specification. The pingback code could use some love. However, with some refactoring, new webmention code could be used to update the older pingback/trackback code as well. This would create a better linkback system overall.

Even if webmention is a better delivery system for linkbacks than its predecessors, no one but a developer cares about protocols. People care about what it can do for you. All of the protocols converge in one place. Once you know a site has linked to you, what do you do with that information? That is where the exciting parts come in and where WordPress falls flat.

If one person would like to speak up in favor of the presentation of […]Useless Context. […], I’d love to hear it. The burden of presentation and use in a linkback relationship goes to the receiver and can be infinitely extensible. What WordPress lacks is a good base presentation for people to enhance and some innovative examples from the community of usage. If you can parse a page of HTML, you can come up with richer content and relationships by marking up the elements of a post with Microformats. WordPress already has some microformats embedded in most WordPress sites and supporting in many themes, and there are other efforts that can be made to better improve this side of things. But there are limitless possibilities, for example:

  • Want to reply to a post on WP Tavern on your own site? Send a webmention(or more archaic protocol) to WP Tavern with the URL of your reply. WP Tavern could parse your site and generates an actual comment from it.
  • Why only a reply? What about other types of relationships? Liking a post, for example?
  • Even just simple administrator stats can be interesting and useful.

So, why not do all of this with an API? We have a new one coming into WordPress…and that’s a great thing I’m fully in favor of. But reading content from a website using an API creates a burden on both sides of the relationship. I have to write an API and you have to learn how to use it if you want to interface with my site. Why shouldn’t your website be your API?

If you are interested in trying webmention support, there is a basic plugin for WordPress. There is even a second plugin that uses Microformats2 plus linkbacks to generate richer comments. Both of these can be used to develop the more robust implementation that would be required for WordPress Core. For more information on how people have been using webmentions, visit IndieWebCamp.