Plugin Directory

Changeset 3311131


Ignore:
Timestamp:
06/13/2025 02:26:37 PM (10 months ago)
Author:
happyprime
Message:

Update to version 1.2.2 from GitHub

Location:
shadow-terms
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shadow-terms/tags/1.2.2/LICENSE

    r2966107 r3311131  
    11Shadow Terms plugin for WordPress
    22
    3 Copyright 2022-2023 by Happy Prime and contributors
     3Copyright 2022-2025 by Happy Prime and contributors
    44
    55This program is free software; you can redistribute it and/or modify
  • shadow-terms/tags/1.2.2/includes/api.php

    r3043795 r3311131  
    7373    $term = get_term( $term_id );
    7474
    75     if ( ! $term ) {
     75    if ( ! $term || is_wp_error( $term ) ) {
    7676        return 0;
    7777    }
     
    9696    );
    9797
    98     return (int) array_pop( $query->posts );
     98    $post_id = array_pop( $query->posts );
     99    return is_numeric( $post_id ) ? (int) $post_id : 0;
    99100}
    100101
  • shadow-terms/tags/1.2.2/includes/sync.php

    r3043795 r3311131  
    6161        $new_term = wp_insert_term( $title_after, $taxonomy );
    6262
     63        if ( is_wp_error( $new_term ) ) {
     64            return;
     65        }
     66
    6367        foreach ( $existing_associations as $association ) {
    6468            wp_set_object_terms( $association, $new_term['term_id'], $taxonomy );
  • shadow-terms/tags/1.2.2/includes/taxonomy.php

    r3043795 r3311131  
    119119 * @since 1.0.0
    120120 *
    121  * @param \WP_REST_Request $request The request to associate posts.
     121 * @param \WP_REST_Request<array<string, mixed>> $request The request to associate posts.
    122122 * @return \WP_REST_Response The response data.
    123123 */
  • shadow-terms/tags/1.2.2/plugin.php

    r3124318 r3311131  
    33 * Plugin Name:  Shadow Terms
    44 * Description:  Use terms from generated taxonomies to associate related content.
    5  * Version:      1.2.1
     5 * Version:      1.2.2
    66 * Plugin URI:   https://github.com/happyprime/shadow-terms/
    77 * Author:       Happy Prime
    88 * Author URI:   https://happyprime.co
     9 * License:      GPLv2 or later
     10 * License URI:  https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    911 * Text Domain:  shadow-terms
    1012 * Requires PHP: 7.4
  • shadow-terms/tags/1.2.2/readme.txt

    r3182841 r3311131  
    33Tags: terms, related, content
    44Requires at least: 5.9
    5 Tested up to: 6.7
    6 Stable tag: 1.2.1
     5Tested up to: 6.8
     6Stable tag: 1.2.2
    77License: GPLv2 or later
    88Requires PHP: 7.4
     
    4141## Changelog
    4242
     43### 1.2.2
     44
     45* No functional changes.
     46* Bump phpstan to level 7.
     47* Update development dependencies.
     48* Confirm WordPress 6.8 support.
     49
    4350### 1.2.1
    4451
  • shadow-terms/trunk/LICENSE

    r2966107 r3311131  
    11Shadow Terms plugin for WordPress
    22
    3 Copyright 2022-2023 by Happy Prime and contributors
     3Copyright 2022-2025 by Happy Prime and contributors
    44
    55This program is free software; you can redistribute it and/or modify
  • shadow-terms/trunk/includes/api.php

    r3043795 r3311131  
    7373    $term = get_term( $term_id );
    7474
    75     if ( ! $term ) {
     75    if ( ! $term || is_wp_error( $term ) ) {
    7676        return 0;
    7777    }
     
    9696    );
    9797
    98     return (int) array_pop( $query->posts );
     98    $post_id = array_pop( $query->posts );
     99    return is_numeric( $post_id ) ? (int) $post_id : 0;
    99100}
    100101
  • shadow-terms/trunk/includes/sync.php

    r3043795 r3311131  
    6161        $new_term = wp_insert_term( $title_after, $taxonomy );
    6262
     63        if ( is_wp_error( $new_term ) ) {
     64            return;
     65        }
     66
    6367        foreach ( $existing_associations as $association ) {
    6468            wp_set_object_terms( $association, $new_term['term_id'], $taxonomy );
  • shadow-terms/trunk/includes/taxonomy.php

    r3043795 r3311131  
    119119 * @since 1.0.0
    120120 *
    121  * @param \WP_REST_Request $request The request to associate posts.
     121 * @param \WP_REST_Request<array<string, mixed>> $request The request to associate posts.
    122122 * @return \WP_REST_Response The response data.
    123123 */
  • shadow-terms/trunk/plugin.php

    r3124318 r3311131  
    33 * Plugin Name:  Shadow Terms
    44 * Description:  Use terms from generated taxonomies to associate related content.
    5  * Version:      1.2.1
     5 * Version:      1.2.2
    66 * Plugin URI:   https://github.com/happyprime/shadow-terms/
    77 * Author:       Happy Prime
    88 * Author URI:   https://happyprime.co
     9 * License:      GPLv2 or later
     10 * License URI:  https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    911 * Text Domain:  shadow-terms
    1012 * Requires PHP: 7.4
  • shadow-terms/trunk/readme.txt

    r3182841 r3311131  
    33Tags: terms, related, content
    44Requires at least: 5.9
    5 Tested up to: 6.7
    6 Stable tag: 1.2.1
     5Tested up to: 6.8
     6Stable tag: 1.2.2
    77License: GPLv2 or later
    88Requires PHP: 7.4
     
    4141## Changelog
    4242
     43### 1.2.2
     44
     45* No functional changes.
     46* Bump phpstan to level 7.
     47* Update development dependencies.
     48* Confirm WordPress 6.8 support.
     49
    4350### 1.2.1
    4451
Note: See TracChangeset for help on using the changeset viewer.