Plugin Directory

Changeset 3193548


Ignore:
Timestamp:
11/21/2024 12:17:39 AM (16 months ago)
Author:
nvwd
Message:

Update to version 2.1.1 from GitHub

Location:
a2z-alphabetical-archive-links
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • a2z-alphabetical-archive-links/tags/2.1.1/a2z-alphabetical-archive-links.php

    r3193532 r3193548  
    55    Description: Get a list of characters, A to Z, from the initial character of a post or CPT title.
    66                The Initials will link to an archive page of posts/CPTs that begin with that character.
    7     Version: 2.1.0
     7    Version: 2.1.1
    88    Requires at least: 5.8
    99    Requires PHP: 7.4
     
    2424define( 'A2ZAAL_PLUGIN', __FILE__ );
    2525define( 'A2ZAAL_BASENAME', plugin_basename( A2ZAAL_PLUGIN ) );
    26 define( 'A2ZAAL_VERSION', '2.1.0' );
     26define( 'A2ZAAL_VERSION', '2.1.1' );
    2727define( 'A2ZAAL_PLUGIN_ROOT_DIR', trailingslashit( __DIR__ ) );
    2828
  • a2z-alphabetical-archive-links/tags/2.1.1/build/blocks/a2z-links/block.json

    r3193532 r3193548  
    2121  "attributes": {
    2222    "title": {
    23       "type": "string"
     23      "type": "string",
     24      "default": ""
    2425    },
    2526    "showCounts": {
    26       "type": "boolean"
     27      "type": "boolean",
     28      "default": false
    2729    },
    2830    "selectedPostType": {
    29       "type": "string"
     31      "type": "string",
     32      "default": ""
    3033    }
    3134  },
  • a2z-alphabetical-archive-links/tags/2.1.1/build/blocks/a2z-links/render.php

    r3193532 r3193548  
    1616}
    1717
     18if ( empty( $attributes['selectedPostType'] ) ) {
     19    $attributes['selectedPostType'] = '';
     20   
     21    $active_post_types = get_a2zaal_active_post_types();
     22
     23    if ( 1 <= count( $active_post_types ) ) {
     24        $attributes['selectedPostType'] = $active_post_types[0];
     25    }
     26}
     27
    1828if ( ! empty( $attributes['title'] ) ) {
    1929    printf( '<h2>%s</h2>', \esc_html( $attributes['title'] ) );
  • a2z-alphabetical-archive-links/tags/2.1.1/readme.txt

    r3193532 r3193548  
    66Tested up to: 6.7
    77Requires PHP: 7.4
    8 Stable tag: 2.1.0
     8Stable tag: 2.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151
    5252== Changelog ==
     53
     54= 2.1.1 =
     55
     56Added default values for block attributes and added checks to ensure they have values before render
    5357
    5458= 2.1.0 =
  • a2z-alphabetical-archive-links/tags/2.1.1/src/blocks/a2z-links/block.json

    r3193532 r3193548  
    2121    "attributes": {
    2222        "title": {
    23             "type": "string"
     23            "type": "string",
     24            "default": ""
    2425        },
    2526        "showCounts": {
    26             "type": "boolean"
     27            "type": "boolean",
     28            "default": false
    2729        },
    2830        "selectedPostType": {
    29             "type": "string"
     31            "type": "string",
     32            "default": ""
    3033        }
    3134    },
  • a2z-alphabetical-archive-links/tags/2.1.1/src/blocks/a2z-links/render.php

    r3193532 r3193548  
    1616}
    1717
     18if ( empty( $attributes['selectedPostType'] ) ) {
     19    $attributes['selectedPostType'] = '';
     20   
     21    $active_post_types = get_a2zaal_active_post_types();
     22
     23    if ( 1 <= count( $active_post_types ) ) {
     24        $attributes['selectedPostType'] = $active_post_types[0];
     25    }
     26}
     27
    1828if ( ! empty( $attributes['title'] ) ) {
    1929    printf( '<h2>%s</h2>', \esc_html( $attributes['title'] ) );
  • a2z-alphabetical-archive-links/tags/2.1.1/src/helpers.php

    r3193532 r3193548  
    163163 */
    164164function get_a2zaal_display_links( string $selected_post_type, bool $show_counts ) {
     165    if ( empty( $selected_post_type ) ) {
     166        return [ '<p>' . \__( 'Post type not selected.', 'nvwd-a2zaal' ) . '</p>' ];
     167    }
     168
    165169    $post_type_titles_struct = \get_option( $selected_post_type . A2ZAAL_POSTS_SUFFIX, [] );
    166170
  • a2z-alphabetical-archive-links/trunk/a2z-alphabetical-archive-links.php

    r3193532 r3193548  
    55    Description: Get a list of characters, A to Z, from the initial character of a post or CPT title.
    66                The Initials will link to an archive page of posts/CPTs that begin with that character.
    7     Version: 2.1.0
     7    Version: 2.1.1
    88    Requires at least: 5.8
    99    Requires PHP: 7.4
     
    2424define( 'A2ZAAL_PLUGIN', __FILE__ );
    2525define( 'A2ZAAL_BASENAME', plugin_basename( A2ZAAL_PLUGIN ) );
    26 define( 'A2ZAAL_VERSION', '2.1.0' );
     26define( 'A2ZAAL_VERSION', '2.1.1' );
    2727define( 'A2ZAAL_PLUGIN_ROOT_DIR', trailingslashit( __DIR__ ) );
    2828
  • a2z-alphabetical-archive-links/trunk/build/blocks/a2z-links/block.json

    r3193532 r3193548  
    2121  "attributes": {
    2222    "title": {
    23       "type": "string"
     23      "type": "string",
     24      "default": ""
    2425    },
    2526    "showCounts": {
    26       "type": "boolean"
     27      "type": "boolean",
     28      "default": false
    2729    },
    2830    "selectedPostType": {
    29       "type": "string"
     31      "type": "string",
     32      "default": ""
    3033    }
    3134  },
  • a2z-alphabetical-archive-links/trunk/build/blocks/a2z-links/render.php

    r3193532 r3193548  
    1616}
    1717
     18if ( empty( $attributes['selectedPostType'] ) ) {
     19    $attributes['selectedPostType'] = '';
     20   
     21    $active_post_types = get_a2zaal_active_post_types();
     22
     23    if ( 1 <= count( $active_post_types ) ) {
     24        $attributes['selectedPostType'] = $active_post_types[0];
     25    }
     26}
     27
    1828if ( ! empty( $attributes['title'] ) ) {
    1929    printf( '<h2>%s</h2>', \esc_html( $attributes['title'] ) );
  • a2z-alphabetical-archive-links/trunk/readme.txt

    r3193532 r3193548  
    66Tested up to: 6.7
    77Requires PHP: 7.4
    8 Stable tag: 2.1.0
     8Stable tag: 2.1.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151
    5252== Changelog ==
     53
     54= 2.1.1 =
     55
     56Added default values for block attributes and added checks to ensure they have values before render
    5357
    5458= 2.1.0 =
  • a2z-alphabetical-archive-links/trunk/src/blocks/a2z-links/block.json

    r3193532 r3193548  
    2121    "attributes": {
    2222        "title": {
    23             "type": "string"
     23            "type": "string",
     24            "default": ""
    2425        },
    2526        "showCounts": {
    26             "type": "boolean"
     27            "type": "boolean",
     28            "default": false
    2729        },
    2830        "selectedPostType": {
    29             "type": "string"
     31            "type": "string",
     32            "default": ""
    3033        }
    3134    },
  • a2z-alphabetical-archive-links/trunk/src/blocks/a2z-links/render.php

    r3193532 r3193548  
    1616}
    1717
     18if ( empty( $attributes['selectedPostType'] ) ) {
     19    $attributes['selectedPostType'] = '';
     20   
     21    $active_post_types = get_a2zaal_active_post_types();
     22
     23    if ( 1 <= count( $active_post_types ) ) {
     24        $attributes['selectedPostType'] = $active_post_types[0];
     25    }
     26}
     27
    1828if ( ! empty( $attributes['title'] ) ) {
    1929    printf( '<h2>%s</h2>', \esc_html( $attributes['title'] ) );
  • a2z-alphabetical-archive-links/trunk/src/helpers.php

    r3193532 r3193548  
    163163 */
    164164function get_a2zaal_display_links( string $selected_post_type, bool $show_counts ) {
     165    if ( empty( $selected_post_type ) ) {
     166        return [ '<p>' . \__( 'Post type not selected.', 'nvwd-a2zaal' ) . '</p>' ];
     167    }
     168
    165169    $post_type_titles_struct = \get_option( $selected_post_type . A2ZAAL_POSTS_SUFFIX, [] );
    166170
Note: See TracChangeset for help on using the changeset viewer.