Changeset 3759392
- Timestamp:
- 10/22/2026 06:28:18 AM (2 weeks ago)
- Location:
- custom-post-type-permalinks
- Files:
-
- 4 deleted
- 8 edited
- 1 copied
-
tags/3.5.6 (copied) (copied from custom-post-type-permalinks/trunk )
-
tags/3.5.6/.distignore (modified) (1 diff)
-
tags/3.5.6/.github (deleted)
-
tags/3.5.6/CLAUDE.md (deleted)
-
tags/3.5.6/CPTP/Module/Rewrite.php (modified) (1 diff)
-
tags/3.5.6/custom-post-type-permalinks.php (modified) (2 diffs)
-
tags/3.5.6/readme.txt (modified) (3 diffs)
-
trunk/.distignore (modified) (1 diff)
-
trunk/.github (deleted)
-
trunk/CLAUDE.md (deleted)
-
trunk/CPTP/Module/Rewrite.php (modified) (1 diff)
-
trunk/custom-post-type-permalinks.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
custom-post-type-permalinks/tags/3.5.6/.distignore
r2347047 r3759392 31 31 *.tar.gz 32 32 *.zip 33 .release-it.json34 33 .env 35 34 .wp-env.json 35 .claude 36 .github 37 CLAUDE.md -
custom-post-type-permalinks/tags/3.5.6/CPTP/Module/Rewrite.php
r3166238 r3759392 109 109 } 110 110 111 if ( in_array( 'category', $args->taxonomies, true ) ) { 112 $category_base = get_option( 'category_base', 'category' ); 111 if ( in_array( 'category', (array) $args->taxonomies, true ) ) { 112 $category_base = get_option( 'category_base' ); 113 if ( ! $category_base ) { 114 $category_base = 'category'; 115 } 113 116 114 117 add_rewrite_rule( $slug . '/' . $category_base . '/([^/]+)/page/?([0-9]{1,})/?$', 'index.php?category_name=$matches[1]&paged=$matches[2]&post_type=' . $post_type, 'top' ); -
custom-post-type-permalinks/tags/3.5.6/custom-post-type-permalinks.php
r3538178 r3759392 6 6 * Author: Toro_Unit 7 7 * Author URI: https://torounit.com/ 8 * Version: 3.5. 58 * Version: 3.5.6 9 9 * Text Domain: custom-post-type-permalinks 10 10 * License: GPL2 or later … … 14 14 * 15 15 * @package Custom_Post_Type_Permalinks 16 * @version 3.5. 516 * @version 3.5.6 17 17 */ 18 18 -
custom-post-type-permalinks/tags/3.5.6/readme.txt
r3538178 r3759392 5 5 Tags: permalink, url, link, address, custom post type 6 6 Requires at least: 6.7 7 Tested up to: 7. 07 Tested up to: 7.1 8 8 Requires PHP: 8.0 9 9 License: GPLv2 or Later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.txt 11 Stable tag: 3.5. 511 Stable tag: 3.5.6 12 12 13 13 Edit the permalink of custom post type. … … 43 43 <pre>register_post_type( 'foo', 44 44 array( 45 'public' = >true,46 'has_archive' = >true,47 'rewrite' = >array(48 "with_front" = >true45 'public' => true, 46 'has_archive' => true, 47 'rewrite' => array( 48 "with_front" => true 49 49 ), 50 'cptp_permalink_structure' = >'%post_id%'50 'cptp_permalink_structure' => '%post_id%' 51 51 ) 52 52 );</pre> … … 79 79 80 80 == Changelog == 81 82 = 3.5.6 = 83 84 - Tested WP 7.1 85 - Fix a fatal error when a custom post type registers `taxonomies` as a string. 86 - Fix rewrite rules for custom post type category archives when the category base is empty. 81 87 82 88 = 3.5.5 = -
custom-post-type-permalinks/trunk/.distignore
r2347047 r3759392 31 31 *.tar.gz 32 32 *.zip 33 .release-it.json34 33 .env 35 34 .wp-env.json 35 .claude 36 .github 37 CLAUDE.md -
custom-post-type-permalinks/trunk/CPTP/Module/Rewrite.php
r3166238 r3759392 109 109 } 110 110 111 if ( in_array( 'category', $args->taxonomies, true ) ) { 112 $category_base = get_option( 'category_base', 'category' ); 111 if ( in_array( 'category', (array) $args->taxonomies, true ) ) { 112 $category_base = get_option( 'category_base' ); 113 if ( ! $category_base ) { 114 $category_base = 'category'; 115 } 113 116 114 117 add_rewrite_rule( $slug . '/' . $category_base . '/([^/]+)/page/?([0-9]{1,})/?$', 'index.php?category_name=$matches[1]&paged=$matches[2]&post_type=' . $post_type, 'top' ); -
custom-post-type-permalinks/trunk/custom-post-type-permalinks.php
r3538178 r3759392 6 6 * Author: Toro_Unit 7 7 * Author URI: https://torounit.com/ 8 * Version: 3.5. 58 * Version: 3.5.6 9 9 * Text Domain: custom-post-type-permalinks 10 10 * License: GPL2 or later … … 14 14 * 15 15 * @package Custom_Post_Type_Permalinks 16 * @version 3.5. 516 * @version 3.5.6 17 17 */ 18 18 -
custom-post-type-permalinks/trunk/readme.txt
r3538178 r3759392 5 5 Tags: permalink, url, link, address, custom post type 6 6 Requires at least: 6.7 7 Tested up to: 7. 07 Tested up to: 7.1 8 8 Requires PHP: 8.0 9 9 License: GPLv2 or Later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.txt 11 Stable tag: 3.5. 511 Stable tag: 3.5.6 12 12 13 13 Edit the permalink of custom post type. … … 43 43 <pre>register_post_type( 'foo', 44 44 array( 45 'public' = >true,46 'has_archive' = >true,47 'rewrite' = >array(48 "with_front" = >true45 'public' => true, 46 'has_archive' => true, 47 'rewrite' => array( 48 "with_front" => true 49 49 ), 50 'cptp_permalink_structure' = >'%post_id%'50 'cptp_permalink_structure' => '%post_id%' 51 51 ) 52 52 );</pre> … … 79 79 80 80 == Changelog == 81 82 = 3.5.6 = 83 84 - Tested WP 7.1 85 - Fix a fatal error when a custom post type registers `taxonomies` as a string. 86 - Fix rewrite rules for custom post type category archives when the category base is empty. 81 87 82 88 = 3.5.5 =
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)