dshanske / indieweb-post-kinds

adds support for responding to and interacting with other sites using the standards developed by the Indieweb Community
https://wordpress.org/plugins/indieweb-post-kinds/
Other
43 stars 28 forks source link
indieweb mf2 post-types webmention wordpress

Post Kinds

Contributors: dshanske
Tags: indieweb, interaction, posts, webmention, share, like, scrobble
Stable tag: 3.7.3
Requires at least: 4.9.9
Requires PHP: 7.0
Tested up to: 6.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Ever want to reply to someone else's post with a post on your own site? Or to "like" someone else's post, but with your own site?

Description

Post Kinds adds support to the Classic Editor for responding to and interacting with other sites using the standards developed by the IndieWeb by implementing kinds of posts. It is not compatible with Gutenberg.

It can also distinguish certain types of passive posts in a manner similar to post formats. While it can work alongside post formats, it is recommended as a replacement as it is designed as a replacement using IndieWeb Post Types.

Many sites will not need all of the kinds set up. What kinds of posts you wish to publish are specific to your needs.

Screenshots

1. Here is an example of what a like looks like

Here is an example of what a like looks like

2. Here is a reply to a Youtube video

Here is a reply to a Youtube video

Installation

The plugin requires the webmention plugin to support sending/receiving notice of a reply/like to another site which will appear as a comment. The Semantic Linkbacks plugin is available to more richly display received comments.

Privacy and Data Storage Notice

Post Kinds stores extra data in a post indicating what you are responding to. This data is either hand-added or can be parsed from the source URL if provided. This means you have additional responsibilities to responsibly use this data, and to remove information on request.

Credits

  1. Kind Icons are currently provided by Font Awesome and are licensed as CC BY 4.0. A copy of the license notice is bundled.
  2. Chris Aldrich always receives a credit on my plugins due his regular feedback, input, and usage.

Upgrade Notice

3.7.0

This version introduces review posts, but they use an experimental review-of property as a h-entry, not an h-review.

3.6.0

This version introduces the ability to filter kinds from the main feed and introduces a second feed that has all kinds, called the 'firehose' feed, available by default at /firehose. This feature could have unanticipated interactions with other plugins. Please report any issues so they can be addressed.

3.5.0

On This Day and Updated Functionality has been moved into its own plugin, Tempus Fugit, along with various other time based functionality from my plugins. You will have to install that plugin to get these features.

3.3.0

Media metadata storage has been moved into the attachment as opposed to being stored in the post itself. This may have some unexpected effects. Please report if needed. The next version will improve presentation by adding custom media gallery generation functionality.

3.1.4

This version is compatible with 5.0 of WordPress but is not integrated with the Gutenberg editor and requires the Classic Editor to function correctly.

3.1.1

3.1.0

3.0.0

Major refactoring of the plugin. The interface has been completely changed to improve simplicity. Please submit all bugs to our Github page.

2.7.0

Storage locations have now changed as part of the nested properties settings and things should migrate automatically but pleasse backup before upgrade. Kind_Meta function is deprecated and will be removed in 2.8.0, so if you depend on this, please update to use MF2_Post

2.5.0

Settings have been completely changed and you will have to reset.

2.4.2

Due to changes in the Micropub plugin, multiple values for properties are now supported. Until this feature is supported in this plugin it will only look at the first value and ignore the others.

2.4.0

I have changed the icons again, to go back to something closer to the original. If anyone wants to contribute alternate icon sets for the project, willing to consider adding them. Also, coming up is another change to how the plugin stores and works with data to continue to move toward something closer to Microformats. Looking at a JF2 representation.

2.0.0

This version makes some changes to the presentation. Backup your installation first as a precaution. Lots of changes under the hood which will bear fruit in future.

1.2.0

This version migrates data to a new storage formats. Backup your installation first as a precaution.

Frequently Asked Questions

How does it work?

Kinds, like Post Formats built into WordPress, allow you to specify that a post contains a certain type of content. It also, based on you classifying it that way, displays it appropriately and marks it up accordingly so outside sites can identify it. Kinds are either a response to something, such as a URL, or a more passive type of post where you are recording/logging something you did, for example, watched a movie.

How do I interact with other sites?

This is added by webmention support.

  1. Bob wants to reply to Sue on his own website.
  2. Sue enables webmentions(separate plugin) on her site.
  3. Bob creates a post and sets it as a reply to or a like of Sue's post.
  4. A webmention is sent to Sue's site, and Sue's site uses the markup added by this plugin to determine what kind of post it is.
  5. Sue's site stores and displays data from the post as a comment on Sue's post.

How do I learn more?

For more information on the Indieweb and tools for WordPress, visit Getting Started on WordPress.

There are too many Post Kinds

You can enable/disable more based on preference. Some may be enabled by plugins. You do not have to use ones you don't want. Not having a post kind enabled will not disable the functionality on existing posts, it only hides the selection in adding new posts.

What are the kinds of posts I can make?

These kinds have an analog in post formats. Adding context to one of these may make it a Passive Kind.

The Response Kinds

The Passive Kinds

To "Scrobble" a song is when listening to it, you would make it a post on your website. This is the most well-known example of a passive kind of post. They are formed by having content in the context box on one of these types of posts.

What kinds do you plan to add in the future?

The following Kinds are reserved for future use but will not show up in the interface at this time.

Can I add my own kinds?

I would prefer if something is popular enough to merge it into the plugin. Feel free to ask for a term to be reserved by filing an issue. However if you are interested in creating your own there is functionality around it.

register_post_kind( 'reply', array( 'singular_name' => ( 'Reply', 'indieweb-post-kinds' ), // Name for one instance of the kind 'name' => ( 'Replies', 'indieweb-post-kinds' ), // General name for the kind plural 'verb' => ( 'Replied to', 'indieweb-post-kinds' ), // The string for the verb or action (liked this) 'property' => 'in-reply-to', // microformats 2 property 'format' => 'link', // Post Format that maps to this 'description' => ( 'a reply to content typically on another site', 'indieweb-post-kinds' ), 'description-url' => 'http://indieweb.org/reply', 'title' => false, // Should this kind have an explicit title 'show' => true, // Show in Settings ) ) );

Add a function with your kind in the above format, hooking it in the init hook and it will add the Kind to the system.

Can I enable one of the Kinds you plan to offer in future?

set_post_kind_visibility( $slug, $show = true ) - If you add this function in early on, it will change the visibility of a kind.

Can I create archives for each kind?

Post Kinds automatically handles the display of archives of individual types. So to view all the posts marked as "note", for example, one could visit the URL http://www.YOURSITE.COM/kind/note/. Simply replace YOURSITE.COM with your particular site name and the particular post kind name to access the others.

You can also add the date /kind/note/2018/12/24 to see date-based archives.

For archives if you add exclude_kind as a query variable it will exclude specific kinds from the query ?exclude=kind&exclude_terms=note. You can also do this as /exclude/kind/note,checkin as it accepts multiple values

There is also a special photo photo included, using ?kind_photos=1 or /photos or /photos/yyyy or /photos/yyyy/mm or /photos/kind/note or any other taxonomy. This will use the photo enhancements introduced in 3.4.0 to only show photos from all types of posts.

Do you have RSS feeds for each kind?

Post Kinds also automatically handles RSS feeds which can be made available or subscribed to for any of the particular kinds. The RSS feed for all the posts marked as "note", for example could be found at either the URL http://www.example.com/kind/note/feed or http://www.example.com/feed/?kind=note (if one doesn't have pretty permalinks enabled). Others can be obtained by replacing "note" with the other kinds.

Do you support bookmarklets?

At the moment, a fully automatic bookmarklet is not yet part of the plugin but you can send data directly to the Post Editor

So - https://www.example.com/wp-admin/post-new.php?kindurl=URL&kind=like will automatically set a like with the URL

Can I post automatically outside the Post Editor?

Using the Micropub plugin for WordPress is the easiest way to post outside of the Post Editor. This will work with any Micropub client.

I installed JetPack and I am no longer getting context added to my posts

The JetPack sharing module conflicts with this plugin.

When will this plugin support the Block Editor?

I am not sure. It is not a strict priority. At this time, there is no definite time for this support. I have been gradually moving toward abstracting more of the data into the REST API so it could more easily be added to the block editor.

How do I get support?

The Development version of the plugin is hosted at Github. You can file issues there.

Theme Support

Post Kinds automatically adds information to the_content and the_excerpt filter. Being as this is inside the content block, which may or may not be desirable, you may remove these filters as noted below and call kind_display directly. This will allow it to appear outside the content block. To remove the automatic display, add the following to your theme.

The functions has_post_kind, set_post_kind, and set_post_kind will allow you to manipulate the kind settings in a post. get_post_kind_string will return the display name of a kind.

If you want to customize the look of the display, you can create a directory in your theme called kind_views, copy the file from the views directory of the plugin, and modify it. This will persist through future plugin updates.

Changelog

3.7.2 ( 2023-12-25 )

3.7.1 ( 2023-12-17 )

3.7.0 ( 2023-11-24 )

3.6.5 ( 2023-10-01 )

3.6.4 ( 2023-01-02 )

3.6.3 ( 2022-12-26 )

3.6.2 ( 2022-11-21 )

3.6.1 ( 2022-07-16 )

3.6.0 ( 2022-06-19 )

3.5.12 ( 2022-01-09 )

3.5.11 ( 2021-11-03 )

3.5.10 ( 2021-11-02 )

3.5.9 ( 2021-08-25 )

3.5.8 ( 2021-08-08 )

3.5.7 ( 2021-07-27 )

3.5.6 ( 2021-04-01 )

3.5.5 ( 2021-03-19 )

3.5.3 ( 2021-03-16 )

3.5.2 ( 2021-03-12 )

3.5.1 (2021-03-09 )

3.5.0 (2021-03-09 )

3.4.19 ( 2021-02-22 )

3.4.18 ( 2021-02-03 )

3.4.17 ( 2021-01-22 )

3.4.16 ( 2021-01-19 )

3.4.15 ( 2021-01-16 )

3.4.14 ( 2021-01-13 )

3.4.13 ( 2020-12-25 )

3.4.12 ( 2020-12-18 )

3.4.11 ( 2020-11-24 )

3.4.10 ( 2020-10-24 )

3.4.9 ( 2020-10-14 )

3.4.8 ( 2020-10-12 )

3.4.7 ( 2020-10-12 )

3.4.6 ( 2020-10-09 )

3.4.5 ( 2020-10-05 )

3.4.4 ( 2020-10-01 )

3.4.3 ( 2020-09-29 )

3.4.2 ( 2020-09-26 )

3.4.1 ( 2020-09-24 )

3.4.0 ( 2020-09-24 )

3.3.6 ( 2020-08-15 )

3.3.5 ( 2020-08-02 )

3.3.4 ( 2020-06-28 )

3.3.3 ( 2019-09-16 )

3.3.2 ( 2019-08-03 )

3.3.1 ( 2019-06-23 )

3.3.0 ( 2019-06-23 )

3.2.6 ( 2019-05-16 )

3.2.5 ( 2019-05-14 )

3.2.4 ( 2019-05-12 )

3.2.3 ( 2019-04-27 )

3.2.2 ( 2019-03-24 )

3.2.1 ( 2019-03-10 )

3.2.0 ( 2019-03-10 )

3.1.8 ( 2019-01-12 )

3.1.7 ( 2019-01-05 )

3.1.6 ( 2018-12-31)

3.1.5 ( 2018-12-28 )

3.1.4 ( 2018-12-07 )

3.1.3 ( 2018-12-06 )

3.1.2 ( 2018-11-24 )

3.1.1 ( 2018-10-14 )

3.1.0 ( 2018-10-13 )

3.0.9 ( 2018-06-23 )

3.0.8 ( 2018-06-20 )

3.0.7 ( 2018-06-17 )

3.0.6 ( 2018-05-14 )

3.0.5 ( 2018-05-06 )

3.0.4 ( 2018-04-28 )

3.0.3 ( 2018-04-14 )

3.0.1/3.0.2 ( 2018-02-24 )

3.0.0 ( 2018-02-24 )

2.7.6 ( 2017-12-23 )

2.7.5 ( 2017-12-14 )

2.7.4 ( 2017-12-09 )