Changeset 3311131
- Timestamp:
- 06/13/2025 02:26:37 PM (10 months ago)
- Location:
- shadow-terms
- Files:
-
- 12 edited
- 1 copied
-
tags/1.2.2 (copied) (copied from shadow-terms/trunk)
-
tags/1.2.2/LICENSE (modified) (1 diff)
-
tags/1.2.2/includes/api.php (modified) (2 diffs)
-
tags/1.2.2/includes/sync.php (modified) (1 diff)
-
tags/1.2.2/includes/taxonomy.php (modified) (1 diff)
-
tags/1.2.2/plugin.php (modified) (1 diff)
-
tags/1.2.2/readme.txt (modified) (2 diffs)
-
trunk/LICENSE (modified) (1 diff)
-
trunk/includes/api.php (modified) (2 diffs)
-
trunk/includes/sync.php (modified) (1 diff)
-
trunk/includes/taxonomy.php (modified) (1 diff)
-
trunk/plugin.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shadow-terms/tags/1.2.2/LICENSE
r2966107 r3311131 1 1 Shadow Terms plugin for WordPress 2 2 3 Copyright 2022-202 3by Happy Prime and contributors3 Copyright 2022-2025 by Happy Prime and contributors 4 4 5 5 This program is free software; you can redistribute it and/or modify -
shadow-terms/tags/1.2.2/includes/api.php
r3043795 r3311131 73 73 $term = get_term( $term_id ); 74 74 75 if ( ! $term ) {75 if ( ! $term || is_wp_error( $term ) ) { 76 76 return 0; 77 77 } … … 96 96 ); 97 97 98 return (int) array_pop( $query->posts ); 98 $post_id = array_pop( $query->posts ); 99 return is_numeric( $post_id ) ? (int) $post_id : 0; 99 100 } 100 101 -
shadow-terms/tags/1.2.2/includes/sync.php
r3043795 r3311131 61 61 $new_term = wp_insert_term( $title_after, $taxonomy ); 62 62 63 if ( is_wp_error( $new_term ) ) { 64 return; 65 } 66 63 67 foreach ( $existing_associations as $association ) { 64 68 wp_set_object_terms( $association, $new_term['term_id'], $taxonomy ); -
shadow-terms/tags/1.2.2/includes/taxonomy.php
r3043795 r3311131 119 119 * @since 1.0.0 120 120 * 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. 122 122 * @return \WP_REST_Response The response data. 123 123 */ -
shadow-terms/tags/1.2.2/plugin.php
r3124318 r3311131 3 3 * Plugin Name: Shadow Terms 4 4 * Description: Use terms from generated taxonomies to associate related content. 5 * Version: 1.2. 15 * Version: 1.2.2 6 6 * Plugin URI: https://github.com/happyprime/shadow-terms/ 7 7 * Author: Happy Prime 8 8 * Author URI: https://happyprime.co 9 * License: GPLv2 or later 10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 9 11 * Text Domain: shadow-terms 10 12 * Requires PHP: 7.4 -
shadow-terms/tags/1.2.2/readme.txt
r3182841 r3311131 3 3 Tags: terms, related, content 4 4 Requires at least: 5.9 5 Tested up to: 6. 76 Stable tag: 1.2. 15 Tested up to: 6.8 6 Stable tag: 1.2.2 7 7 License: GPLv2 or later 8 8 Requires PHP: 7.4 … … 41 41 ## Changelog 42 42 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 43 50 ### 1.2.1 44 51 -
shadow-terms/trunk/LICENSE
r2966107 r3311131 1 1 Shadow Terms plugin for WordPress 2 2 3 Copyright 2022-202 3by Happy Prime and contributors3 Copyright 2022-2025 by Happy Prime and contributors 4 4 5 5 This program is free software; you can redistribute it and/or modify -
shadow-terms/trunk/includes/api.php
r3043795 r3311131 73 73 $term = get_term( $term_id ); 74 74 75 if ( ! $term ) {75 if ( ! $term || is_wp_error( $term ) ) { 76 76 return 0; 77 77 } … … 96 96 ); 97 97 98 return (int) array_pop( $query->posts ); 98 $post_id = array_pop( $query->posts ); 99 return is_numeric( $post_id ) ? (int) $post_id : 0; 99 100 } 100 101 -
shadow-terms/trunk/includes/sync.php
r3043795 r3311131 61 61 $new_term = wp_insert_term( $title_after, $taxonomy ); 62 62 63 if ( is_wp_error( $new_term ) ) { 64 return; 65 } 66 63 67 foreach ( $existing_associations as $association ) { 64 68 wp_set_object_terms( $association, $new_term['term_id'], $taxonomy ); -
shadow-terms/trunk/includes/taxonomy.php
r3043795 r3311131 119 119 * @since 1.0.0 120 120 * 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. 122 122 * @return \WP_REST_Response The response data. 123 123 */ -
shadow-terms/trunk/plugin.php
r3124318 r3311131 3 3 * Plugin Name: Shadow Terms 4 4 * Description: Use terms from generated taxonomies to associate related content. 5 * Version: 1.2. 15 * Version: 1.2.2 6 6 * Plugin URI: https://github.com/happyprime/shadow-terms/ 7 7 * Author: Happy Prime 8 8 * Author URI: https://happyprime.co 9 * License: GPLv2 or later 10 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html 9 11 * Text Domain: shadow-terms 10 12 * Requires PHP: 7.4 -
shadow-terms/trunk/readme.txt
r3182841 r3311131 3 3 Tags: terms, related, content 4 4 Requires at least: 5.9 5 Tested up to: 6. 76 Stable tag: 1.2. 15 Tested up to: 6.8 6 Stable tag: 1.2.2 7 7 License: GPLv2 or later 8 8 Requires PHP: 7.4 … … 41 41 ## Changelog 42 42 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 43 50 ### 1.2.1 44 51
Note: See TracChangeset
for help on using the changeset viewer.