Plugin Directory

Changeset 3759392


Ignore:
Timestamp:
10/22/2026 06:28:18 AM (2 weeks ago)
Author:
Toro_Unit
Message:

Update to version 3.5.6 from GitHub

Location:
custom-post-type-permalinks
Files:
4 deleted
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • custom-post-type-permalinks/tags/3.5.6/.distignore

    r2347047 r3759392  
    3131*.tar.gz
    3232*.zip
    33 .release-it.json
    3433.env
    3534.wp-env.json
     35.claude
     36.github
     37CLAUDE.md
  • custom-post-type-permalinks/tags/3.5.6/CPTP/Module/Rewrite.php

    r3166238 r3759392  
    109109                        }
    110110
    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                                }
    113116
    114117                                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  
    66 * Author: Toro_Unit
    77 * Author URI: https://torounit.com/
    8  * Version: 3.5.5
     8 * Version: 3.5.6
    99 * Text Domain: custom-post-type-permalinks
    1010 * License: GPL2 or later
    … …  
    1414 *
    1515 * @package Custom_Post_Type_Permalinks
    16  * @version 3.5.5
     16 * @version 3.5.6
    1717 */
    1818
  • custom-post-type-permalinks/tags/3.5.6/readme.txt

    r3538178 r3759392  
    55Tags: permalink, url, link, address, custom post type 
    66Requires at least: 6.7 
    7 Tested up to: 7.0 
     7Tested up to: 7.1 
    88Requires PHP: 8.0 
    99License: GPLv2 or Later 
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.txt 
    11 Stable tag:        3.5.5
     11Stable tag:        3.5.6
    1212
    1313Edit the permalink of custom post type.
    … …  
    4343<pre>register_post_type( 'foo',
    4444        array(
    45                 'public' => true,
    46                 'has_archive' => true,
    47                 'rewrite' => array(
    48                         "with_front" => true
     45                'public' =&gt; true,
     46                'has_archive' =&gt; true,
     47                'rewrite' =&gt; array(
     48                        "with_front" =&gt; true
    4949                ),
    50                 'cptp_permalink_structure' => '%post_id%'
     50                'cptp_permalink_structure' =&gt; '%post_id%'
    5151        )
    5252);</pre>
    … …  
    7979
    8080== 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.
    8187
    8288= 3.5.5 =
  • custom-post-type-permalinks/trunk/.distignore

    r2347047 r3759392  
    3131*.tar.gz
    3232*.zip
    33 .release-it.json
    3433.env
    3534.wp-env.json
     35.claude
     36.github
     37CLAUDE.md
  • custom-post-type-permalinks/trunk/CPTP/Module/Rewrite.php

    r3166238 r3759392  
    109109                        }
    110110
    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                                }
    113116
    114117                                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  
    66 * Author: Toro_Unit
    77 * Author URI: https://torounit.com/
    8  * Version: 3.5.5
     8 * Version: 3.5.6
    99 * Text Domain: custom-post-type-permalinks
    1010 * License: GPL2 or later
    … …  
    1414 *
    1515 * @package Custom_Post_Type_Permalinks
    16  * @version 3.5.5
     16 * @version 3.5.6
    1717 */
    1818
  • custom-post-type-permalinks/trunk/readme.txt

    r3538178 r3759392  
    55Tags: permalink, url, link, address, custom post type 
    66Requires at least: 6.7 
    7 Tested up to: 7.0 
     7Tested up to: 7.1 
    88Requires PHP: 8.0 
    99License: GPLv2 or Later 
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.txt 
    11 Stable tag:        3.5.5
     11Stable tag:        3.5.6
    1212
    1313Edit the permalink of custom post type.
    … …  
    4343<pre>register_post_type( 'foo',
    4444        array(
    45                 'public' => true,
    46                 'has_archive' => true,
    47                 'rewrite' => array(
    48                         "with_front" => true
     45                'public' =&gt; true,
     46                'has_archive' =&gt; true,
     47                'rewrite' =&gt; array(
     48                        "with_front" =&gt; true
    4949                ),
    50                 'cptp_permalink_structure' => '%post_id%'
     50                'cptp_permalink_structure' =&gt; '%post_id%'
    5151        )
    5252);</pre>
    … …  
    7979
    8080== 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.
    8187
    8288= 3.5.5 =
Note: See TracChangeset for help on using the changeset viewer.