Plugin Directory

Changeset 3014138


Ignore:
Timestamp:
12/25/2023 06:57:52 PM (2 years ago)
Author:
dshanske
Message:

Update to version 3.7.2 from GitHub

Location:
indieweb-post-kinds
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • indieweb-post-kinds/tags/3.7.2/includes/kind-functions.php

    r2973430 r3014138  
    137137 *
    138138 * @param WP_Post|null Post to Display.
     139 * @param string|array Classes to add to link
     140 * @param string|array Classes to add to the date
    139141 * @return string Marked up link to a post.
    140142 **/
    141143
    142 function kind_get_the_link( $post = null, $cls = null ) {
     144function kind_get_the_link( $post = null, $cls = null, $date_cls = null ) {
    143145    $post = get_post( $post );
    144146    $kind = get_post_kind_slug( $post );
     
    147149        $cls = implode( ' ', $cls );
    148150    }
    149     $cls         = 'class=' . $cls;
    150     $time_string = '<time %1$s datetime="%2$s">%3$s</time>';
     151
     152    if ( is_array( $date_cls ) ) {
     153        $date_cls = implode( ' ', $date_cls );
     154    }
     155
     156    $time_string = '<time class="%3$s" datetime="%1$s">%2$s</time>';
    151157    $time_string = sprintf(
    152158        $time_string,
    153         esc_attr( $cls ),
    154159        esc_attr( get_the_date( DATE_W3C, $post ) ),
    155         get_the_date( '', $post )
     160        get_the_date( '', $post ),
     161        $date_cls
    156162    );
    157     return sprintf( '<a href="%2$s">%1$s</a> - %3$s', kind_get_the_title( $post, $kind ), get_the_permalink( $post ), $time_string );
     163    return sprintf( '<a class="%4$s" href="%2$s">%1$s</a> - %3$s', kind_get_the_title( $post, $kind ), get_the_permalink( $post ), $time_string, esc_attr( $cls ) );
    158164}
    159165
  • indieweb-post-kinds/tags/3.7.2/readme.txt

    r3011061 r3014138  
    22Contributors: dshanske
    33Tags: indieweb, interaction, posts, webmention, share, like, scrobble
    4 Stable tag: 3.7.1
     4Stable tag: 3.7.2
    55Requires at least: 4.9.9
    66Requires PHP: 7.0
     
    281281
    282282== Changelog ==
     283
     284= 3.7.2 ( 2023-12-25 ) =
     285* Fix markup on kind_get_the_link function to allow for classes for date for overall link
    283286
    284287= 3.7.1 ( 2023-12-17 ) =
  • indieweb-post-kinds/trunk/includes/kind-functions.php

    r2973430 r3014138  
    137137 *
    138138 * @param WP_Post|null Post to Display.
     139 * @param string|array Classes to add to link
     140 * @param string|array Classes to add to the date
    139141 * @return string Marked up link to a post.
    140142 **/
    141143
    142 function kind_get_the_link( $post = null, $cls = null ) {
     144function kind_get_the_link( $post = null, $cls = null, $date_cls = null ) {
    143145    $post = get_post( $post );
    144146    $kind = get_post_kind_slug( $post );
     
    147149        $cls = implode( ' ', $cls );
    148150    }
    149     $cls         = 'class=' . $cls;
    150     $time_string = '<time %1$s datetime="%2$s">%3$s</time>';
     151
     152    if ( is_array( $date_cls ) ) {
     153        $date_cls = implode( ' ', $date_cls );
     154    }
     155
     156    $time_string = '<time class="%3$s" datetime="%1$s">%2$s</time>';
    151157    $time_string = sprintf(
    152158        $time_string,
    153         esc_attr( $cls ),
    154159        esc_attr( get_the_date( DATE_W3C, $post ) ),
    155         get_the_date( '', $post )
     160        get_the_date( '', $post ),
     161        $date_cls
    156162    );
    157     return sprintf( '<a href="%2$s">%1$s</a> - %3$s', kind_get_the_title( $post, $kind ), get_the_permalink( $post ), $time_string );
     163    return sprintf( '<a class="%4$s" href="%2$s">%1$s</a> - %3$s', kind_get_the_title( $post, $kind ), get_the_permalink( $post ), $time_string, esc_attr( $cls ) );
    158164}
    159165
  • indieweb-post-kinds/trunk/readme.txt

    r3011061 r3014138  
    22Contributors: dshanske
    33Tags: indieweb, interaction, posts, webmention, share, like, scrobble
    4 Stable tag: 3.7.1
     4Stable tag: 3.7.2
    55Requires at least: 4.9.9
    66Requires PHP: 7.0
     
    281281
    282282== Changelog ==
     283
     284= 3.7.2 ( 2023-12-25 ) =
     285* Fix markup on kind_get_the_link function to allow for classes for date for overall link
    283286
    284287= 3.7.1 ( 2023-12-17 ) =
Note: See TracChangeset for help on using the changeset viewer.