diff --git a/includes/class-kind-config.php b/includes/class-kind-config.php
index 62a341a..bcfb88f 100644
--- a/includes/class-kind-config.php
+++ b/includes/class-kind-config.php
@@ -36,80 +36,80 @@ public static function admin_init() {
'type' => 'array',
'description' => 'Kinds Enabled on This Site',
'show_in_rest' => true,
- 'default' => array( 'article', 'reply', 'bookmark' )
+ 'default' => array( 'article', 'reply', 'bookmark' ),
);
register_setting( 'iwt_options', 'kind_termslist', $args );
$args = array(
'type' => 'string',
'description' => 'Default Kind',
'show_in_rest' => true,
- 'default' => 'note'
+ 'default' => 'note',
);
register_setting( 'iwt_options', 'kind_default', $args );
$args = array(
'type' => 'boolean',
'description' => 'Rich Embed Support for Whitelisted Sites',
'show_in_rest' => true,
- 'default' => 1
+ 'default' => 1,
);
register_setting( 'iwt_options', 'kind_embeds', $args );
$args = array(
'type' => 'boolean',
'description' => 'Disable Content Protection on Responses',
'show_in_rest' => true,
- 'default' => 0
+ 'default' => 0,
);
register_setting( 'iwt_options', 'kind_protection', $args );
$args = array(
'type' => 'string',
'description' => 'KSES Content Protection on Responses',
'show_in_rest' => true,
- 'default' => str_replace( '},"',"},\r\n\"", wp_json_encode( wp_kses_allowed_html( 'post' ), JSON_PRETTY_PRINT ) )
+ 'default' => str_replace( '},"',"},\r\n\"", wp_json_encode( wp_kses_allowed_html( 'post' ), JSON_PRETTY_PRINT ) ),
);
register_setting( 'iwt_options', 'kind_kses', $args );
- add_settings_section(
- 'iwt-content',
- __( 'Content Options',
- 'indieweb-post-kinds' ),
- array( 'Kind_Config', 'options_callback' ),
- 'iwt_options'
+ add_settings_section(
+ 'iwt-content',
+ __( 'Content Options',
+ 'indieweb-post-kinds' ),
+ array( 'Kind_Config', 'options_callback' ),
+ 'iwt_options'
);
- add_settings_field(
- 'termslist',
+ add_settings_field(
+ 'termslist',
__( 'Select All Kinds You Wish to Use', 'indieweb-post-kinds' ),
array( 'Kind_Config', 'termcheck_callback' ),
'iwt_options',
- 'iwt-content'
+ 'iwt-content'
);
- add_settings_field(
- 'defaultkind',
+ add_settings_field(
+ 'defaultkind',
__( 'Default Kind', 'indieweb-post-kinds' ),
array( 'Kind_Config', 'defaultkind_callback' ),
'iwt_options',
'iwt-content'
);
- add_settings_field(
- 'embeds',
- __( 'Add Rich Embed Support for Whitelisted Sites', 'indieweb-post-kinds' ),
- array( 'Kind_Config', 'checkbox_callback' ),
- 'iwt_options', 'iwt-content' , array( 'name' => 'kind_embeds' )
+ add_settings_field(
+ 'embeds',
+ __( 'Use Rich Embed Support for Responses to Whitelisted Sites', 'indieweb-post-kinds' ),
+ array( 'Kind_Config', 'checkbox_callback' ),
+ 'iwt_options', 'iwt-content' , array( 'name' => 'kind_embeds' )
);
- add_settings_field(
- 'protection',
- __( 'Disable Content Protection on Responses', 'indieweb-post-kinds' ),
+ add_settings_field(
+ 'protection',
+ __( 'Disable KSES Content Protection on Responses(Advanced Feature)', 'indieweb-post-kinds' ),
array( 'Kind_Config', 'checkbox_callback' ),
'iwt_options',
'iwt-content',
array( 'name' => 'kind_protection' )
);
if ( 1 == get_option( 'kind_protection' ) ) {
- add_settings_field(
- 'contentelements',
- __( 'Response Content Allowed Html Elements', 'indieweb-post-kinds' ) . ' *',
+ add_settings_field(
+ 'contentelements',
+ __( 'Response Content Allowed Html Elements', 'indieweb-post-kinds' ) . ' *',
array( 'Kind_Config', 'textbox_callback' ),
- 'iwt_options',
+ 'iwt_options',
'iwt-content',
array( 'name' => 'kind_kses' )
);
@@ -194,15 +194,15 @@ public static function textbox_callback( array $args ) {
* @access public
*/
public static function termcheck_callback() {
- $terms = Kind_Taxonomy::get_strings();
+ $terms = Kind_Taxonomy::get_kind_info( 'all', 'all' );
// Hide these terms until ready for use for now.
$hide = array( 'note', 'weather', 'exercise', 'travel', 'itinerary', 'tag', 'follow', 'drink', 'eat', 'trip', 'checkin', 'recipe', 'mood' );
foreach ( $hide as $hid ) {
unset( $terms[ $hid ] );
}
- $termslist = get_option('kind_termslist');
+ $termslist = get_option( 'kind_termslist' );
foreach ( $terms as $key => $value ) {
- echo "' . $value . '
';
+ echo "' . $value['singular_name'] . ' - ' . $value['description'] . '
';
}
}
@@ -213,14 +213,13 @@ public static function termcheck_callback() {
* @access public
*/
public static function defaultkind_callback() {
- $terms = get_option('kind_termslist');
+ $terms = get_option( 'kind_termslist' );
$terms[] = 'note';
- $strings = Kind_Taxonomy::get_strings();
- $defaultkind = get_option('kind_default');
+ $defaultkind = get_option( 'kind_default' );
foreach ( $terms as $term ) {
- echo '' . $strings[$term] . '
';
+ echo '' . Kind_Taxonomy::get_kind_info( $term, 'singular_name' ) . '
';
}
}
diff --git a/includes/class-kind-meta.php b/includes/class-kind-meta.php
index fee8476..c077bb2 100644
--- a/includes/class-kind-meta.php
+++ b/includes/class-kind-meta.php
@@ -144,7 +144,7 @@ public static function sanitize_content( $value ) {
if ( 1 == get_option( 'kind_protection' ) ) {
$allowed = json_decode( get_option( 'kind_kses' ), true );
}
- return wp_kses( ( string ) $value , $allowed );
+ return wp_kses( $value , $allowed );
}
public static function sanitize_text( $value ) {
@@ -168,17 +168,17 @@ public static function sanitize_text( $value ) {
public function build_meta( $raw ) {
$raw = apply_filters( 'kind_build_meta', $raw );
$kind = get_post_kind_slug( $this->post );
+ $property = Kind_Taxonomy::get_kind_info( $kind, 'property' );
if ( isset( $raw['url'] ) ) {
/**
* Allows additional changes to the kind data after parsing.
*
* @param array $raw An array of properties.
*/
- $map = array_filter( Kind_Taxonomy::get_kind_properties() );
if ( isset( $kind ) ) {
- if ( array_key_exists( $kind, $map ) ) {
- $this->meta[ $map[ $kind ] ] = $raw['url'];
- unset( $raw['url'] );
+ if ( ! empty( $property ) ) {
+ $this->meta[ $property ] = $raw['url'];
+ unset( $raw['url'] );
}
}
}
@@ -195,7 +195,7 @@ public function get_url( ) {
return false;
}
$kind = get_post_kind_slug( $this->post );
- $map = Kind_Taxonomy::get_kind_properties();
+ $property = Kind_Taxonomy::get_kind_info( $kind, 'property' );
if ( array_key_exists( 'cite', $this->meta ) ) {
if ( array_key_exists( 'url', $this->meta['cite'] ) ) {
return $this->meta['cite']['url'];
@@ -204,14 +204,14 @@ public function get_url( ) {
if ( ! $kind ) {
return false;
}
- if ( array_key_exists( $kind, $map ) ) {
- if ( array_key_exists( $map[ $kind ], $this->meta ) ) {
- if ( is_string( $this->meta[ $map[ $kind ] ] ) ) {
- return $this->meta[ $map[ $kind ] ];
+ if ( ! empty( $property ) ) {
+ if ( array_key_exists( $property, $this->meta ) ) {
+ if ( is_string( $this->meta[ $property ] ) ) {
+ return $this->meta[ $property ];
+ }
+ if ( is_array( $this->meta[ $property ] ) ) {
+ return $this->meta[ $property ][0];
}
- if ( is_array( $this->meta[ $map[ $kind ] ] ) ) {
- return $this->meta[ $map [ $kind ] ][0];
- }
}
}
return false;
@@ -228,11 +228,9 @@ public function set_url( $url ) {
}
$url = self::sanitize_text( $url );
$kind = get_post_kind_slug( $this->post );
- $map = array_diff( Kind_Taxonomy::get_kind_properties(), array( '' ) );
- if ( $kind ) {
- if ( array_key_exists( $kind, $map ) ) {
- $this->meta[ $map[ $kind ] ] = array( $url );
- }
+ $property = Kind_Taxonomy::get_kind_info( $kind, 'property' );
+ if ( ! empty ( $property ) ) {
+ $this->meta[ $property ] = array( $url );
}
if ( ! array_key_exists( 'cite', $this->meta ) ) {
$this->meta['url'] = $url;
@@ -436,7 +434,7 @@ public function get( $key ) {
}
public function set( $key, $value) {
- $this->meta[$key] = self::sanitize_text( $value );
+ $this->meta[ $key ] = self::sanitize_text( $value );
}
public function del( $key ) {
diff --git a/includes/class-kind-plugins.php b/includes/class-kind-plugins.php
new file mode 100755
index 0000000..c470cfa
--- /dev/null
+++ b/includes/class-kind-plugins.php
@@ -0,0 +1,141 @@
+comment_type || ! get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_canonical', true ) ) {
+ return $text;
+ }
+ // check comment type
+ $comment_type = get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_type', true );
+ if ( ! $comment_type || ! in_array( $comment_type, array_keys( SemanticLinkbacksPlugin::get_comment_type_strings() ) ) ) {
+ $comment_type = 'mention';
+ }
+ $_kind = get_the_terms( $comment->comment_post_ID, 'kind' );
+ if ( ! empty( $_kind ) ) {
+ $kind = array_shift( $_kind );
+ $kindstrings = self::get_strings();
+ $post_format = $kindstrings[ $kind->slug ];
+ } else {
+ $post_format = get_post_format( $comment->comment_post_ID );
+ // replace "standard" with "Article"
+ if ( ! $post_format || 'standard' === $post_format ) {
+ $post_format = 'Article';
+ } else {
+ $post_formatstrings = get_post_format_strings();
+ // get the "nice" name
+ $post_format = $post_formatstrings[ $post_format ];
+ }
+ }
+ // generate the verb, for example "mentioned" or "liked"
+ $comment_type_excerpts = SemanticLinkbacksPlugin::get_comment_type_excerpts();
+ // get URL canonical url...
+ $url = get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_canonical', true );
+ // ...or fall back to source
+ if ( ! $url ) {
+ $url = get_comment_meta( $comment->comment_ID, 'semantic_linkbacks_source', true );
+ }
+ // parse host
+ $host = parse_url( $url, PHP_URL_HOST );
+ // strip leading www, if any
+ $host = preg_replace( '/^www\./', '', $host );
+ // generate output
+ $text = sprintf( $comment_type_excerpts[ $comment_type ], get_comment_author_link( $comment->comment_ID ), 'this ' . $post_format, $url, $host );
+ return apply_filters( 'semantic_linkbacks_excerpt', $text );
+ }
+
+ /**
+ * Take mf2 properties and set a post kind
+ *
+ * @param array $input Micropub Request in JSON
+ * @param array $wp_args Arguments passed to insert or update posts
+ */
+
+ public static function micropub_set_kind( $input, $wp_args ) {
+ // Only continue if create or update
+ if ( ! $wp_args ) {
+ return;
+ }
+ if ( isset( $input['properties']['rsvp'] ) ) {
+ set_post_kind( $wp_args['ID'], 'rsvp' );
+ return;
+ }
+ if ( isset( $input['properties']['in-reply-to'] ) ) {
+ set_post_kind( $wp_args['ID'], 'reply' );
+ return;
+ }
+
+ if ( isset( $input['properties']['repost-of'] ) ) {
+ set_post_kind( $wp_args['ID'], 'repost' );
+ return;
+ }
+
+ if ( isset( $input['properties']['like-of'] ) ) {
+ set_post_kind( $wp_args['ID'], 'like' );
+ return;
+ }
+ if ( isset( $input['properties']['photo'] ) ) {
+ set_post_kind( $wp_args['ID'], 'photo' );
+ return;
+ }
+
+ if ( isset( $input['properties']['bookmark-of'] ) || isset( $input['properties']['bookmark'] ) ) {
+ set_post_kind( $wp_args['ID'], 'bookmark' );
+ return;
+ }
+
+ // This basically adds Teacup support
+ if ( isset( $input['properties']['p3k-food'] ) ) {
+ if ( isset( $input['properties']['p3k-type'] ) ) {
+ if ( 'drink' === $input['properties']['p3k-type'] ) {
+ set_post_kind( $wp_args['ID'], 'drink' );
+ return;
+ }
+ set_post_kind( $wp_args['ID'], 'eat' );
+ return;
+ }
+ }
+ if ( ! empty( $input['properties']['name'] ) ) {
+ $name = trim( $input['properties']['name'] );
+ $content = trim( $input['properties']['content']);
+ if ( 0 !== strpos( $content, $name ) ) {
+ set_post_kind( $wp_args['ID'], 'article' );
+ return;
+ }
+ }
+ set_post_kind( $wp_args['ID'], 'note' );
+ }
+
+ public static function post_formats( $input, $wp_args ) {
+ $kind = get_post_kind_slug( $wp_args['ID'] );
+ set_post_format( $wp_args['ID'], Kind_Taxonomy::get_kind_info( $kind, 'property' ) );
+ }
+
+} // End Class Kind_Plugins
+
+?>
diff --git a/includes/class-kind-tabmeta.php b/includes/class-kind-tabmeta.php
index 25ac400..9998ae8 100755
--- a/includes/class-kind-tabmeta.php
+++ b/includes/class-kind-tabmeta.php
@@ -61,7 +61,7 @@ public static function enqueue_admin_scripts() {
wp_localize_script( 'kindmeta-response', 'rest_object',
array(
'api_nonce' => wp_create_nonce( 'wp_rest' ),
- 'api_url' => site_url('/wp-json/link-preview/1.0/'),
+ 'api_url' => rest_url('/link-preview/1.0/'),
'link_preview_success_message' => __( 'Your URL has been successfully retrieved and parsed', 'indieweb-post-kinds' )
)
);
diff --git a/includes/class-kind-taxonomy.php b/includes/class-kind-taxonomy.php
index 6d02843..faae76d 100755
--- a/includes/class-kind-taxonomy.php
+++ b/includes/class-kind-taxonomy.php
@@ -10,82 +10,31 @@
class Kind_Taxonomy {
public static function init() {
+ // Add the Correct Archive Title to Kind Archives.
+ add_filter( 'get_the_archive_title', array( 'Kind_Taxonomy', 'kind_archive_title' ), 10 );
+ add_filter( 'get_the_archive_description', array( 'Kind_Taxonomy', 'kind_archive_description' ), 10 );
+
// Add Kind Permalinks.
add_filter( 'post_link', array( 'Kind_Taxonomy', 'kind_permalink' ) , 10, 3 );
add_filter( 'post_type_link', array( 'Kind_Taxonomy', 'kind_permalink' ) , 10 , 3 );
+ // Add Dropdown
+ add_action( 'restrict_manage_posts', array( 'Kind_Taxonomy', 'kind_dropdown' ), 10, 2 );
+
+ // Add Links to Ping to the Webmention Sender.
+ add_filter( 'webmention_links', array( 'Kind_Taxonomy', 'webmention_links' ), 11, 2 );
+
// Add Classes to Post and Body.
add_filter( 'post_class', array( 'Kind_Taxonomy', 'post_class' ) );
add_filter( 'body_class', array( 'Kind_Taxonomy', 'body_class' ) );
// Trigger Webmention on Change in Post Status.
add_filter( 'transition_post_status', array( 'Kind_Taxonomy', 'transition' ), 10, 3 );
- // On Post Publish Invalidate any Stored Response.
+ // On Post Save Set Post Format
add_action( 'save_post', array( 'Kind_Taxonomy', 'post_formats' ), 99, 3 );
-
- // Add the Correct Archive Title to Kind Archives.
- add_filter( 'get_the_archive_title', array( 'Kind_Taxonomy', 'kind_archive_title' ) , 10 , 3 );
-
- // Set Post Kind for Micropub Inputs.
- add_action( 'after_micropub', array( 'Kind_Taxonomy', 'micropub_set_kind' ), 10, 2 );
-
- // Override Post Type in Semantic Linkbacks.
- add_filter( 'semantic_linkbacks_post_type', array( 'Kind_Taxonomy', 'semantic_post_type' ), 11, 2 );
-
- // Add Links to Ping to the Webmention Sender.
- add_filter( 'webmention_links', array( 'Kind_Taxonomy', 'webmention_links' ), 11, 2 );
-
- // Remove the Automatic Post Generation that the Micropub Plugin Offers
- remove_filter( 'before_micropub', array( 'Micropub', 'generate_post_content' ) );
-
- // Add Dropdown
- add_action( 'restrict_manage_posts', array( 'Kind_Taxonomy', 'kind_dropdown' ), 10, 2 );
}
- /**
- * Sets Post Format for Post Kind.
- *
- * @param int $post_ID Post ID
- * @param WP_Post $post Post Object
- * @param boolean $update,
- */
- public static function post_formats( $post_ID, $post, $update ) {
- $kind = get_post_kind_slug( $post_ID );
- switch ( $kind ) {
- case 'note':
- set_post_format( $post_ID, 'aside' );
- break;
- case 'article':
- set_post_format( $post_ID, '' );
- break;
- case 'favorite':
- case 'bookmark':
- case 'like':
- case 'reply':
- set_post_format( $post_ID, 'link' );
- break;
- case 'quote':
- set_post_format( $post_ID, 'quote' );
- break;
- case 'listen':
- case 'jam':
- set_post_format( $post_ID, 'audio');
- break;
- case 'watch':
- set_post_format( $post_ID, 'video');
- break;
- case 'photo':
- set_post_format( $post_ID, 'image' );
- break;
- case 'play':
- case 'read':
- case 'rsvp':
- set_post_format( $post_ID, 'status');
- break;
- }
- }
-
/**
* To Be Run on Plugin Activation.
*/
@@ -145,12 +94,12 @@ public static function register() {
* Sets up Default Terms for Kind Taxonomy.
*/
public static function kind_defaultterms () {
- $terms = self::get_strings();
+ $terms = self::get_kind_info( 'all', 'all' );
foreach ( $terms as $key => $value ) {
if ( ! term_exists( $key, 'kind' ) ) {
wp_insert_term( $key, 'kind',
array(
- 'description' => $value,
+ 'description' => $value['description'],
'slug' => $key,
) );
}
@@ -169,21 +118,38 @@ public static function kind_permalink($permalink, $post_id, $leavename) {
} else { $taxonomy_slug = 'note'; }
return str_replace( '%kind%', $taxonomy_slug, $permalink );
}
- public static function kind_archive_title($title) {
- $strings = self::get_strings_plural();
+
+ public static function kind_archive_title( $title ) {
if ( is_tax( 'kind' ) ) {
- foreach ( $strings as $key => $string ) {
- if ( is_tax( 'kind', $key ) ) {
- $title = $string;
- return $title;
- }
- }
+ $term = get_queried_object();
+ return self::get_kind_info( $term->slug, 'name' );
}
return $title;
}
+ public static function kind_archive_description( $title ) {
+ if ( is_tax( 'kind' ) ) {
+ $term = get_queried_object();
+ return self::get_kind_info( $term->slug, 'description' );
+ }
+ return $title;
+ }
+
+ /**
+ * Sets Post Format for Post Kind.
+ *
+ * @param int $post_ID Post ID
+ * @param WP_Post $post Post Object
+ * @param boolean $update,
+ */
+ public static function post_formats( $post_ID, $post, $update ) {
+ $kind = get_post_kind_slug( $post_ID );
+ if ( ! $update ) {
+ set_post_format( $post_ID, self::get_kind_info( $kind, 'property' ) );
+ }
+ }
+
public static function select_metabox( $post ) {
- $strings = self::get_strings();
$include = get_option( 'kind_termslist' );
$include = array_merge( $include, array( 'note', 'reply', 'article' ) );
// If Simple Location is Enabled, include the check-in type
@@ -196,7 +162,7 @@ public static function select_metabox( $post ) {
if ( isset( $_GET['kind'] ) ) {
$default = get_term_by( 'slug', $_GET['kind'], 'kind' );
} else {
- $default = get_term_by( 'slug', get_option('kind_default'), 'kind' );
+ $default = get_term_by( 'slug', get_option( 'kind_default' ), 'kind' );
}
$terms = get_terms( 'kind', array( 'hide_empty' => 0 ) );
$postterms = get_the_terms( $post->ID, 'kind' );
@@ -211,7 +177,8 @@ public static function select_metabox( $post ) {
echo "
The Post Properties tab represents the Microformats properties " @@ -121,11 +121,135 @@ msgstr "" msgid "RSVP" msgstr "" -#: includes/class-kind-taxonomy.php:594 +#: includes/class-kind-taxonomy.php:207 +msgid "traditional long form content: a post with an explicit title and body" +msgstr "" + +#: includes/class-kind-taxonomy.php:216 +msgid "" +"short content: a post or status update with just plain content and " +"typically without a title" +msgstr "" + +#: includes/class-kind-taxonomy.php:225 +msgid "a reply to content typically on another site" +msgstr "" + +#: includes/class-kind-taxonomy.php:234 +msgid "a complete reposting of content from another site" +msgstr "" + +#: includes/class-kind-taxonomy.php:243 +msgid "a way to pay compliments to the original post/poster of external content" +msgstr "" + +#: includes/class-kind-taxonomy.php:252 +msgid "special to the author" +msgstr "" + +#: includes/class-kind-taxonomy.php:261 +msgid "storing a link/bookmark for personal use or sharing with others" +msgstr "" + +#: includes/class-kind-taxonomy.php:270 +msgid "a post with an embedded image/photo as its primary focus" +msgstr "" + +#: includes/class-kind-taxonomy.php:279 +msgid "" +"allows you to tag a post as being of a specific category or tag, or for " +"person tagging" +msgstr "" + +#: includes/class-kind-taxonomy.php:288 +msgid "a specific type of reply regarding attendance of an event" +msgstr "" + +#: includes/class-kind-taxonomy.php:297 +msgid "listening to audio; sometimes called a scrobble" +msgstr "" + +#: includes/class-kind-taxonomy.php:306 +msgid "" +"watching a movie, television show, online video, play or other visual-based " +"event" +msgstr "" + +#: includes/class-kind-taxonomy.php:315 +msgid "identifying you are at a particular geographic location" +msgstr "" + +#: includes/class-kind-taxonomy.php:324 +msgid "" +"a post indicating a desire/wish. The archive of which would be a wishlist, " +"such as a gift registry or similar" +msgstr "" + +#: includes/class-kind-taxonomy.php:333 +msgid "playing a game" +msgstr "" + +#: includes/class-kind-taxonomy.php:342 +msgid "current weather conditions" +msgstr "" + +#: includes/class-kind-taxonomy.php:351 +msgid "" +"some form of physical activity or workout (examples: walk, run, cycle, " +"hike, yoga, etc.)" +msgstr "" + +#: includes/class-kind-taxonomy.php:360 +msgid "represents a geographic journey" +msgstr "" + +#: includes/class-kind-taxonomy.php:369 +msgid "parts of a scheduled trip including transit by car, plane, train, etc." +msgstr "" + +#: includes/class-kind-taxonomy.php:378 +msgid "what you are eating, perhaps for a food dairy" +msgstr "" + +#: includes/class-kind-taxonomy.php:387 +msgid "what you are drinking, perhaps for a food dairy" +msgstr "" + +#: includes/class-kind-taxonomy.php:396 +msgid "" +"indicating you are now following or subscribing to another person`s " +"activities online" +msgstr "" + +#: includes/class-kind-taxonomy.php:405 +msgid "a particularly personally meaningful song (a listen with added emphasis)" +msgstr "" + +#: includes/class-kind-taxonomy.php:414 +msgid "reading a book, magazine, newspaper, other physical document, or online post" +msgstr "" + +#: includes/class-kind-taxonomy.php:423 +msgid "quoted content" +msgstr "" + +#: includes/class-kind-taxonomy.php:432 +msgid "how you are feeling (example: happy, sad, indifferent, etc.)" +msgstr "" + +#: includes/class-kind-taxonomy.php:441 +msgid "list of ingredients and directions for making food or drink" +msgstr "" + +#: includes/class-kind-taxonomy.php:625 msgid "Invalid post" msgstr "" -#: includes/class-link-preview.php:101 +#: includes/class-kind-taxonomy.php:628 +msgid "Invalid Kind" +msgstr "" + +#: includes/class-link-preview.php:101 includes/class-link-preview.php:106 msgid "Missing or Invalid URL" msgstr "" @@ -233,488 +357,478 @@ msgstr "" msgid "https://david.shanske.com" msgstr "" -#: includes/class-kind-taxonomy.php:106 +#: includes/class-kind-plugins.php:25 +msgctxt "indieweb-post-kinds" +msgid "this" +msgstr "" + +#: includes/class-kind-taxonomy.php:55 msgctxt "indieweb-post-kinds" msgid "Kinds" msgstr "" -#: includes/class-kind-taxonomy.php:107 +#: includes/class-kind-taxonomy.php:56 msgctxt "indieweb-post-kinds" msgid "Kind" msgstr "" -#: includes/class-kind-taxonomy.php:108 +#: includes/class-kind-taxonomy.php:57 msgctxt "indieweb-post-kinds" msgid "Search Kinds" msgstr "" -#: includes/class-kind-taxonomy.php:109 +#: includes/class-kind-taxonomy.php:58 msgctxt "indieweb-post-kinds" msgid "Popular Kinds" msgstr "" -#: includes/class-kind-taxonomy.php:110 +#: includes/class-kind-taxonomy.php:59 msgctxt "indieweb-post-kinds" msgid "All Kinds" msgstr "" -#: includes/class-kind-taxonomy.php:111 +#: includes/class-kind-taxonomy.php:60 msgctxt "indieweb-post-kinds" msgid "Parent Kind" msgstr "" -#: includes/class-kind-taxonomy.php:112 +#: includes/class-kind-taxonomy.php:61 msgctxt "indieweb-post-kinds" msgid "Parent Kind:" msgstr "" -#: includes/class-kind-taxonomy.php:113 +#: includes/class-kind-taxonomy.php:62 msgctxt "indieweb-post-kinds" msgid "Edit Kind" msgstr "" -#: includes/class-kind-taxonomy.php:114 +#: includes/class-kind-taxonomy.php:63 msgctxt "indieweb-post-kinds" msgid "View Kind" msgstr "" -#: includes/class-kind-taxonomy.php:115 +#: includes/class-kind-taxonomy.php:64 msgctxt "indieweb-post-kinds" msgid "Update Kind" msgstr "" -#: includes/class-kind-taxonomy.php:116 +#: includes/class-kind-taxonomy.php:65 msgctxt "indieweb-post-kinds" msgid "Add New Kind" msgstr "" -#: includes/class-kind-taxonomy.php:117 +#: includes/class-kind-taxonomy.php:66 msgctxt "indieweb-post-kinds" msgid "New Kind" msgstr "" -#: includes/class-kind-taxonomy.php:118 +#: includes/class-kind-taxonomy.php:67 msgctxt "indieweb-post-kinds" msgid "Separate kinds with commas" msgstr "" -#: includes/class-kind-taxonomy.php:119 +#: includes/class-kind-taxonomy.php:68 msgctxt "indieweb-post-kinds" msgid "Add or remove kinds" msgstr "" -#: includes/class-kind-taxonomy.php:120 +#: includes/class-kind-taxonomy.php:69 msgctxt "indieweb-post-kinds" msgid "Choose from the most used kinds" msgstr "" -#: includes/class-kind-taxonomy.php:121 +#: includes/class-kind-taxonomy.php:70 msgctxt "indieweb-post-kinds" msgid "No kinds found" msgstr "" -#: includes/class-kind-taxonomy.php:122 +#: includes/class-kind-taxonomy.php:71 msgctxt "indieweb-post-kinds" msgid "No kinds" msgstr "" -#: includes/class-kind-taxonomy.php:229 +#: includes/class-kind-taxonomy.php:202 msgctxt "indieweb-post-kinds" msgid "Article" msgstr "" -#: includes/class-kind-taxonomy.php:230 +#: includes/class-kind-taxonomy.php:203 msgctxt "indieweb-post-kinds" -msgid "Note" -msgstr "" - -#: includes/class-kind-taxonomy.php:231 -msgctxt "indieweb-post-kinds" -msgid "Reply" -msgstr "" - -#: includes/class-kind-taxonomy.php:232 -msgctxt "indieweb-post-kinds" -msgid "Repost" -msgstr "" - -#: includes/class-kind-taxonomy.php:233 -msgctxt "indieweb-post-kinds" -msgid "Like" -msgstr "" - -#: includes/class-kind-taxonomy.php:234 -msgctxt "indieweb-post-kinds" -msgid "Favorite" +msgid "Articles" msgstr "" -#: includes/class-kind-taxonomy.php:235 +#: includes/class-kind-taxonomy.php:204 includes/class-kind-taxonomy.php:213 +#: includes/class-kind-taxonomy.php:267 includes/class-kind-taxonomy.php:339 msgctxt "indieweb-post-kinds" -msgid "Bookmark" +msgid " " msgstr "" -#: includes/class-kind-taxonomy.php:236 +#: includes/class-kind-taxonomy.php:211 msgctxt "indieweb-post-kinds" -msgid "Photo" +msgid "Note" msgstr "" -#: includes/class-kind-taxonomy.php:237 +#: includes/class-kind-taxonomy.php:212 msgctxt "indieweb-post-kinds" -msgid "Tag" +msgid "Notes" msgstr "" -#: includes/class-kind-taxonomy.php:238 +#: includes/class-kind-taxonomy.php:220 msgctxt "indieweb-post-kinds" -msgid "RSVP" +msgid "Reply" msgstr "" -#: includes/class-kind-taxonomy.php:239 +#: includes/class-kind-taxonomy.php:221 msgctxt "indieweb-post-kinds" -msgid "Listen" +msgid "Replies" msgstr "" -#: includes/class-kind-taxonomy.php:240 +#: includes/class-kind-taxonomy.php:222 msgctxt "indieweb-post-kinds" -msgid "Watch" +msgid "Replied" msgstr "" -#: includes/class-kind-taxonomy.php:241 +#: includes/class-kind-taxonomy.php:229 msgctxt "indieweb-post-kinds" -msgid "Checkin" +msgid "Repost" msgstr "" -#: includes/class-kind-taxonomy.php:242 +#: includes/class-kind-taxonomy.php:230 msgctxt "indieweb-post-kinds" -msgid "Wish" +msgid "Reposts" msgstr "" -#: includes/class-kind-taxonomy.php:243 +#: includes/class-kind-taxonomy.php:231 msgctxt "indieweb-post-kinds" -msgid "Play" +msgid "Reposted" msgstr "" -#: includes/class-kind-taxonomy.php:244 includes/class-kind-taxonomy.php:282 +#: includes/class-kind-taxonomy.php:238 msgctxt "indieweb-post-kinds" -msgid "Weather" +msgid "Like" msgstr "" -#: includes/class-kind-taxonomy.php:245 +#: includes/class-kind-taxonomy.php:239 msgctxt "indieweb-post-kinds" -msgid "Exercise" +msgid "Likes" msgstr "" -#: includes/class-kind-taxonomy.php:246 +#: includes/class-kind-taxonomy.php:240 msgctxt "indieweb-post-kinds" -msgid "Travel" +msgid "Liked" msgstr "" #: includes/class-kind-taxonomy.php:247 msgctxt "indieweb-post-kinds" -msgid "Itinerary" +msgid "Favorite" msgstr "" -#: includes/class-kind-taxonomy.php:248 includes/class-kind-taxonomy.php:286 +#: includes/class-kind-taxonomy.php:248 msgctxt "indieweb-post-kinds" -msgid "Eat" +msgid "Favorites" msgstr "" #: includes/class-kind-taxonomy.php:249 msgctxt "indieweb-post-kinds" -msgid "Drink" +msgid "Favorited" msgstr "" -#: includes/class-kind-taxonomy.php:250 +#: includes/class-kind-taxonomy.php:256 msgctxt "indieweb-post-kinds" -msgid "Follow" +msgid "Bookmark" msgstr "" -#: includes/class-kind-taxonomy.php:251 +#: includes/class-kind-taxonomy.php:257 msgctxt "indieweb-post-kinds" -msgid "Jam" +msgid "Bookmarks" msgstr "" -#: includes/class-kind-taxonomy.php:252 includes/class-kind-taxonomy.php:290 +#: includes/class-kind-taxonomy.php:258 msgctxt "indieweb-post-kinds" -msgid "Read" +msgid "Bookmarked" msgstr "" -#: includes/class-kind-taxonomy.php:253 +#: includes/class-kind-taxonomy.php:265 msgctxt "indieweb-post-kinds" -msgid "Quote" +msgid "Photo" msgstr "" -#: includes/class-kind-taxonomy.php:254 +#: includes/class-kind-taxonomy.php:266 msgctxt "indieweb-post-kinds" -msgid "Mood" +msgid "Photos" msgstr "" -#: includes/class-kind-taxonomy.php:255 +#: includes/class-kind-taxonomy.php:274 msgctxt "indieweb-post-kinds" -msgid "Recipe" +msgid "Tag" msgstr "" -#: includes/class-kind-taxonomy.php:267 +#: includes/class-kind-taxonomy.php:275 msgctxt "indieweb-post-kinds" -msgid "Articles" +msgid "Tags" msgstr "" -#: includes/class-kind-taxonomy.php:268 +#: includes/class-kind-taxonomy.php:276 msgctxt "indieweb-post-kinds" -msgid "Notes" +msgid "Tagged" msgstr "" -#: includes/class-kind-taxonomy.php:269 +#: includes/class-kind-taxonomy.php:283 msgctxt "indieweb-post-kinds" -msgid "Replies" +msgid "RSVP" msgstr "" -#: includes/class-kind-taxonomy.php:270 +#: includes/class-kind-taxonomy.php:284 msgctxt "indieweb-post-kinds" -msgid "Reposts" +msgid "RSVPs" msgstr "" -#: includes/class-kind-taxonomy.php:271 +#: includes/class-kind-taxonomy.php:285 msgctxt "indieweb-post-kinds" -msgid "Likes" +msgid "RSVPed" msgstr "" -#: includes/class-kind-taxonomy.php:272 +#: includes/class-kind-taxonomy.php:292 msgctxt "indieweb-post-kinds" -msgid "Favorites" +msgid "Listen" msgstr "" -#: includes/class-kind-taxonomy.php:273 +#: includes/class-kind-taxonomy.php:293 msgctxt "indieweb-post-kinds" -msgid "Bookmarks" +msgid "Listens" msgstr "" -#: includes/class-kind-taxonomy.php:274 +#: includes/class-kind-taxonomy.php:294 msgctxt "indieweb-post-kinds" -msgid "Photos" +msgid "Listened" msgstr "" -#: includes/class-kind-taxonomy.php:275 +#: includes/class-kind-taxonomy.php:301 msgctxt "indieweb-post-kinds" -msgid "Tags" +msgid "Watch" msgstr "" -#: includes/class-kind-taxonomy.php:276 +#: includes/class-kind-taxonomy.php:302 msgctxt "indieweb-post-kinds" -msgid "RSVPs" +msgid "Watches" msgstr "" -#: includes/class-kind-taxonomy.php:277 +#: includes/class-kind-taxonomy.php:303 msgctxt "indieweb-post-kinds" -msgid "Listens" +msgid "Watched" msgstr "" -#: includes/class-kind-taxonomy.php:278 +#: includes/class-kind-taxonomy.php:310 msgctxt "indieweb-post-kinds" -msgid "Watches" +msgid "Checkin" msgstr "" -#: includes/class-kind-taxonomy.php:279 +#: includes/class-kind-taxonomy.php:311 msgctxt "indieweb-post-kinds" msgid "Checkins" msgstr "" -#: includes/class-kind-taxonomy.php:280 +#: includes/class-kind-taxonomy.php:312 msgctxt "indieweb-post-kinds" -msgid "Wishlist" +msgid "Checked into" msgstr "" -#: includes/class-kind-taxonomy.php:281 +#: includes/class-kind-taxonomy.php:319 msgctxt "indieweb-post-kinds" -msgid "Plays" +msgid "Wish" msgstr "" -#: includes/class-kind-taxonomy.php:283 +#: includes/class-kind-taxonomy.php:320 msgctxt "indieweb-post-kinds" -msgid "Exercises" +msgid "Wishes" msgstr "" -#: includes/class-kind-taxonomy.php:284 +#: includes/class-kind-taxonomy.php:321 msgctxt "indieweb-post-kinds" -msgid "Travels" +msgid "Wished" msgstr "" -#: includes/class-kind-taxonomy.php:285 +#: includes/class-kind-taxonomy.php:328 msgctxt "indieweb-post-kinds" -msgid "Itineraries" +msgid "Play" msgstr "" -#: includes/class-kind-taxonomy.php:287 +#: includes/class-kind-taxonomy.php:329 msgctxt "indieweb-post-kinds" -msgid "Drinks" +msgid "Playing" msgstr "" -#: includes/class-kind-taxonomy.php:288 +#: includes/class-kind-taxonomy.php:330 msgctxt "indieweb-post-kinds" -msgid "Follows" +msgid "Played" msgstr "" -#: includes/class-kind-taxonomy.php:289 +#: includes/class-kind-taxonomy.php:337 includes/class-kind-taxonomy.php:338 msgctxt "indieweb-post-kinds" -msgid "Jams" +msgid "Weather" msgstr "" -#: includes/class-kind-taxonomy.php:291 +#: includes/class-kind-taxonomy.php:346 includes/class-kind-taxonomy.php:347 msgctxt "indieweb-post-kinds" -msgid "Quotes" +msgid "Exercise" msgstr "" -#: includes/class-kind-taxonomy.php:292 +#: includes/class-kind-taxonomy.php:348 msgctxt "indieweb-post-kinds" -msgid "Moods" +msgid "Exercised" msgstr "" -#: includes/class-kind-taxonomy.php:293 +#: includes/class-kind-taxonomy.php:355 msgctxt "indieweb-post-kinds" -msgid "Recipes" +msgid "Trip" msgstr "" -#: includes/class-kind-taxonomy.php:305 includes/class-kind-taxonomy.php:306 -#: includes/class-kind-taxonomy.php:312 +#: includes/class-kind-taxonomy.php:356 msgctxt "indieweb-post-kinds" -msgid " " +msgid "Trips" msgstr "" -#: includes/class-kind-taxonomy.php:307 +#: includes/class-kind-taxonomy.php:357 includes/class-kind-taxonomy.php:366 msgctxt "indieweb-post-kinds" -msgid "In Reply To" +msgid "Travelled" msgstr "" -#: includes/class-kind-taxonomy.php:308 +#: includes/class-kind-taxonomy.php:364 msgctxt "indieweb-post-kinds" -msgid "Reposted" +msgid "Itinerary" msgstr "" -#: includes/class-kind-taxonomy.php:309 +#: includes/class-kind-taxonomy.php:365 msgctxt "indieweb-post-kinds" -msgid "Liked" +msgid "Itineraries" msgstr "" -#: includes/class-kind-taxonomy.php:310 +#: includes/class-kind-taxonomy.php:373 includes/class-kind-taxonomy.php:374 msgctxt "indieweb-post-kinds" -msgid "Favorited" +msgid "Eat" msgstr "" -#: includes/class-kind-taxonomy.php:311 +#: includes/class-kind-taxonomy.php:375 msgctxt "indieweb-post-kinds" -msgid "Bookmarked" +msgid "Ate" msgstr "" -#: includes/class-kind-taxonomy.php:313 +#: includes/class-kind-taxonomy.php:382 msgctxt "indieweb-post-kinds" -msgid "Tagged" +msgid "Drink" msgstr "" -#: includes/class-kind-taxonomy.php:314 +#: includes/class-kind-taxonomy.php:383 msgctxt "indieweb-post-kinds" -msgid "RSVPed" +msgid "Drinks" msgstr "" -#: includes/class-kind-taxonomy.php:315 +#: includes/class-kind-taxonomy.php:384 msgctxt "indieweb-post-kinds" -msgid "Listened to " +msgid "Drank" msgstr "" -#: includes/class-kind-taxonomy.php:316 +#: includes/class-kind-taxonomy.php:391 msgctxt "indieweb-post-kinds" -msgid "Watched" +msgid "Follow" msgstr "" -#: includes/class-kind-taxonomy.php:317 +#: includes/class-kind-taxonomy.php:392 msgctxt "indieweb-post-kinds" -msgid "Checked In At" +msgid "Follows" msgstr "" -#: includes/class-kind-taxonomy.php:318 +#: includes/class-kind-taxonomy.php:393 msgctxt "indieweb-post-kinds" -msgid "Desires" +msgid "Followed" msgstr "" -#: includes/class-kind-taxonomy.php:319 +#: includes/class-kind-taxonomy.php:400 msgctxt "indieweb-post-kinds" -msgid "Played" +msgid "Jam" msgstr "" -#: includes/class-kind-taxonomy.php:320 +#: includes/class-kind-taxonomy.php:401 msgctxt "indieweb-post-kinds" -msgid "Weathered" +msgid "Jams" msgstr "" -#: includes/class-kind-taxonomy.php:321 +#: includes/class-kind-taxonomy.php:402 msgctxt "indieweb-post-kinds" -msgid "Exercised" +msgid "Listened to" msgstr "" -#: includes/class-kind-taxonomy.php:322 includes/class-kind-taxonomy.php:323 +#: includes/class-kind-taxonomy.php:409 includes/class-kind-taxonomy.php:411 msgctxt "indieweb-post-kinds" -msgid "Traveled" +msgid "Read" msgstr "" -#: includes/class-kind-taxonomy.php:324 +#: includes/class-kind-taxonomy.php:410 msgctxt "indieweb-post-kinds" -msgid "Ate" +msgid "Reads" msgstr "" -#: includes/class-kind-taxonomy.php:325 +#: includes/class-kind-taxonomy.php:418 msgctxt "indieweb-post-kinds" -msgid "Drank" +msgid "Quote" msgstr "" -#: includes/class-kind-taxonomy.php:326 +#: includes/class-kind-taxonomy.php:419 msgctxt "indieweb-post-kinds" -msgid "Followed" +msgid "Quotes" msgstr "" -#: includes/class-kind-taxonomy.php:327 +#: includes/class-kind-taxonomy.php:420 msgctxt "indieweb-post-kinds" -msgid "Listened to" +msgid "Quoted" msgstr "" -#: includes/class-kind-taxonomy.php:328 +#: includes/class-kind-taxonomy.php:427 msgctxt "indieweb-post-kinds" -msgid "Is Reading" +msgid "Mood" msgstr "" -#: includes/class-kind-taxonomy.php:329 +#: includes/class-kind-taxonomy.php:428 msgctxt "indieweb-post-kinds" -msgid "Quoted" +msgid "Moods" msgstr "" -#: includes/class-kind-taxonomy.php:330 +#: includes/class-kind-taxonomy.php:429 msgctxt "indieweb-post-kinds" msgid "Felt" msgstr "" -#: includes/class-kind-taxonomy.php:331 +#: includes/class-kind-taxonomy.php:436 msgctxt "indieweb-post-kinds" -msgid "Cooked" +msgid "Recipe" msgstr "" -#: includes/class-kind-taxonomy.php:377 +#: includes/class-kind-taxonomy.php:437 msgctxt "indieweb-post-kinds" -msgid "this" +msgid "Recipes" +msgstr "" + +#: includes/class-kind-taxonomy.php:438 +msgctxt "indieweb-post-kinds" +msgid "Cooked" msgstr "" -#: includes/class-kind-view.php:144 +#: includes/class-kind-view.php:147 msgctxt "indieweb-post-kinds" msgid "a tweet" msgstr "" -#: includes/class-kind-view.php:145 includes/class-kind-view.php:146 +#: includes/class-kind-view.php:148 includes/class-kind-view.php:149 msgctxt "indieweb-post-kinds" msgid "a video" msgstr "" -#: includes/class-kind-view.php:147 +#: includes/class-kind-view.php:150 msgctxt "indieweb-post-kinds" msgid "an image" msgstr "" -#: includes/class-kind-view.php:153 +#: includes/class-kind-view.php:156 msgctxt "indieweb-post-kinds" msgid "a post" msgstr "" \ No newline at end of file diff --git a/readme.md b/readme.md index f1a28a4..3208431 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ # Post Kinds # **Contributors:** dshanske **Tags:** indieweb, interaction, posts, webmention, share, like -**Stable tag:** 2.5.1 +**Stable tag:** 2.5.2 **Requires at least:** 4.7 **Tested up to:** 4.7.2 **License:** GPLv2 or later @@ -158,6 +158,13 @@ Indieweb Post Kinds had support for replying to Twitter posts using the Social N developer of this plugin. ## Changelog ## + = Version 2.5.2 = + * Generation of strings being moved from individual functions to one unified function to make management easier + * Description now appears on Archives + * Description now appears on settings page + * Adding of `kind-type` css class only to posts + * Enhance setting of kind based on micropub properties + * Only set post format on initial save not subsequent ones = Version 2.5.1 = * Fix bug hiding metabox * Add drop down filter for Kinds to View Posts diff --git a/readme.txt b/readme.txt index f91ba3f..4628d9d 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ === Post Kinds === Contributors: dshanske Tags: indieweb, interaction, posts, webmention, share, like -Stable tag: 2.5.1 +Stable tag: 2.5.2 Requires at least: 4.7 Tested up to: 4.7.2 License: GPLv2 or later @@ -154,6 +154,13 @@ Indieweb Post Kinds had support for replying to Twitter posts using the Social N developer of this plugin. == Changelog == + = Version 2.5.2 = + * Generation of strings being moved from individual functions to one unified function to make management easier + * Description now appears on Archives + * Description now appears on settings page + * Adding of `kind-type` css class only to posts + * Enhance setting of kind based on micropub properties + * Only set post format on initial save not subsequent ones = Version 2.5.1 = * Fix bug hiding metabox * Add drop down filter for Kinds to View Posts