Changeset 3458362
- Timestamp:
- 02/10/2026 07:49:25 PM (6 weeks ago)
- Location:
- shadow-terms
- Files:
-
- 2 added
- 12 edited
- 1 copied
-
tags/1.2.3 (copied) (copied from shadow-terms/trunk)
-
tags/1.2.3/LICENSE (modified) (1 diff)
-
tags/1.2.3/SECURITY.md (added)
-
tags/1.2.3/includes/api.php (modified) (1 diff)
-
tags/1.2.3/includes/sync.php (modified) (2 diffs)
-
tags/1.2.3/includes/taxonomy.php (modified) (1 diff)
-
tags/1.2.3/plugin.php (modified) (2 diffs)
-
tags/1.2.3/readme.txt (modified) (2 diffs)
-
trunk/LICENSE (modified) (1 diff)
-
trunk/SECURITY.md (added)
-
trunk/includes/api.php (modified) (1 diff)
-
trunk/includes/sync.php (modified) (2 diffs)
-
trunk/includes/taxonomy.php (modified) (1 diff)
-
trunk/plugin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shadow-terms/tags/1.2.3/LICENSE
r3311131 r3458362 1 1 Shadow Terms plugin for WordPress 2 2 3 Copyright 2022-202 5by Happy Prime and contributors3 Copyright 2022-2026 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.3/includes/api.php
r3311131 r3458362 7 7 8 8 namespace ShadowTerms\API; 9 10 if ( ! defined( 'ABSPATH' ) ) { 11 exit; 12 } 9 13 10 14 /** -
shadow-terms/tags/1.2.3/includes/sync.php
r3311131 r3458362 7 7 8 8 namespace ShadowTerms\Sync; 9 10 if ( ! defined( 'ABSPATH' ) ) { 11 exit; 12 } 9 13 10 14 add_action( 'wp_after_insert_post', __NAMESPACE__ . '\sync_shadow_taxonomies', 10, 4 ); … … 88 92 } 89 93 94 // If a post is already published and not undergoing a status change, but does not 95 // have an associated term, create one. 96 if ( 'publish' === $status_before && 'publish' === $status_after && false === $term_after ) { 97 // In the very unlikely condition that a term _was_ associated, but now is 98 // lost to the ether, attempt to restore previous post associations. 99 $existing_associations = (array) get_post_meta( $post_id, "{$taxonomy}_associated_posts", true ); 100 $existing_associations = array_filter( $existing_associations ); 101 102 $new_term = wp_insert_term( $title_after, $taxonomy ); 103 104 if ( is_wp_error( $new_term ) ) { 105 return; 106 } 107 108 foreach ( $existing_associations as $association ) { 109 wp_set_object_terms( $association, $new_term['term_id'], $taxonomy ); 110 } 111 112 return; 113 } 114 90 115 // If the post transitioned from published to not published, remove the associated term. 91 116 if ( 'publish' !== $status_after && $term_before ) { -
shadow-terms/tags/1.2.3/includes/taxonomy.php
r3311131 r3458362 9 9 10 10 use ShadowTerms\API; 11 12 if ( ! defined( 'ABSPATH' ) ) { 13 exit; 14 } 11 15 12 16 add_action( 'init', __NAMESPACE__ . '\register', 9999 ); -
shadow-terms/tags/1.2.3/plugin.php
r3311131 r3458362 3 3 * Plugin Name: Shadow Terms 4 4 * Description: Use terms from generated taxonomies to associate related content. 5 * Version: 1.2. 25 * Version: 1.2.3 6 6 * Plugin URI: https://github.com/happyprime/shadow-terms/ 7 7 * Author: Happy Prime … … 27 27 namespace ShadowTerms; 28 28 29 // If this file is called directly, abort. 30 if ( ! defined( 'WPINC' ) ) { 31 die; 29 if ( ! defined( 'ABSPATH' ) ) { 30 exit; 32 31 } 33 32 -
shadow-terms/tags/1.2.3/readme.txt
r3311131 r3458362 3 3 Tags: terms, related, content 4 4 Requires at least: 5.9 5 Tested up to: 6. 86 Stable tag: 1.2. 25 Tested up to: 6.9 6 Stable tag: 1.2.3 7 7 License: GPLv2 or later 8 8 Requires PHP: 7.4 … … 41 41 ## Changelog 42 42 43 ### 1.2.3 44 45 * In a case where a published post is missing its associated shadow term, create one on post update. 46 * Bail early on direct access to plugin files. 47 * Confirm WordPress 6.9 support. 48 * Update development dependencies. 49 43 50 ### 1.2.2 44 51 -
shadow-terms/trunk/LICENSE
r3311131 r3458362 1 1 Shadow Terms plugin for WordPress 2 2 3 Copyright 2022-202 5by Happy Prime and contributors3 Copyright 2022-2026 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
r3311131 r3458362 7 7 8 8 namespace ShadowTerms\API; 9 10 if ( ! defined( 'ABSPATH' ) ) { 11 exit; 12 } 9 13 10 14 /** -
shadow-terms/trunk/includes/sync.php
r3311131 r3458362 7 7 8 8 namespace ShadowTerms\Sync; 9 10 if ( ! defined( 'ABSPATH' ) ) { 11 exit; 12 } 9 13 10 14 add_action( 'wp_after_insert_post', __NAMESPACE__ . '\sync_shadow_taxonomies', 10, 4 ); … … 88 92 } 89 93 94 // If a post is already published and not undergoing a status change, but does not 95 // have an associated term, create one. 96 if ( 'publish' === $status_before && 'publish' === $status_after && false === $term_after ) { 97 // In the very unlikely condition that a term _was_ associated, but now is 98 // lost to the ether, attempt to restore previous post associations. 99 $existing_associations = (array) get_post_meta( $post_id, "{$taxonomy}_associated_posts", true ); 100 $existing_associations = array_filter( $existing_associations ); 101 102 $new_term = wp_insert_term( $title_after, $taxonomy ); 103 104 if ( is_wp_error( $new_term ) ) { 105 return; 106 } 107 108 foreach ( $existing_associations as $association ) { 109 wp_set_object_terms( $association, $new_term['term_id'], $taxonomy ); 110 } 111 112 return; 113 } 114 90 115 // If the post transitioned from published to not published, remove the associated term. 91 116 if ( 'publish' !== $status_after && $term_before ) { -
shadow-terms/trunk/includes/taxonomy.php
r3311131 r3458362 9 9 10 10 use ShadowTerms\API; 11 12 if ( ! defined( 'ABSPATH' ) ) { 13 exit; 14 } 11 15 12 16 add_action( 'init', __NAMESPACE__ . '\register', 9999 ); -
shadow-terms/trunk/plugin.php
r3311131 r3458362 3 3 * Plugin Name: Shadow Terms 4 4 * Description: Use terms from generated taxonomies to associate related content. 5 * Version: 1.2. 25 * Version: 1.2.3 6 6 * Plugin URI: https://github.com/happyprime/shadow-terms/ 7 7 * Author: Happy Prime … … 27 27 namespace ShadowTerms; 28 28 29 // If this file is called directly, abort. 30 if ( ! defined( 'WPINC' ) ) { 31 die; 29 if ( ! defined( 'ABSPATH' ) ) { 30 exit; 32 31 } 33 32 -
shadow-terms/trunk/readme.txt
r3311131 r3458362 3 3 Tags: terms, related, content 4 4 Requires at least: 5.9 5 Tested up to: 6. 86 Stable tag: 1.2. 25 Tested up to: 6.9 6 Stable tag: 1.2.3 7 7 License: GPLv2 or later 8 8 Requires PHP: 7.4 … … 41 41 ## Changelog 42 42 43 ### 1.2.3 44 45 * In a case where a published post is missing its associated shadow term, create one on post update. 46 * Bail early on direct access to plugin files. 47 * Confirm WordPress 6.9 support. 48 * Update development dependencies. 49 43 50 ### 1.2.2 44 51
Note: See TracChangeset
for help on using the changeset viewer.