Plugin Directory

Changeset 3367049


Ignore:
Timestamp:
09/24/2025 09:34:47 AM (6 months ago)
Author:
sasiddiqui
Message:

Bump to v3.1.2

Location:
custom-permalinks
Files:
8 added
6 deleted
4 edited
51 copied

Legend:

Unmodified
Added
Removed
  • custom-permalinks/tags/3.1.2/custom-permalinks.php

    r3364450 r3367049  
    44 * Plugin URI: https://www.custompermalinks.com/
    55 * Description: Set custom permalinks on a per-post basis.
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Requires at least: 2.6
    88 * Requires PHP: 7.0
  • custom-permalinks/tags/3.1.2/includes/class-custom-permalinks-frontend.php

    r3364450 r3367049  
    690690
    691691    /**
     692     * Trigger safe redirect.
     693     *
     694     * @since 3.1.2
     695     * @access private
     696     *
     697     * @param string $url Relative URL.
     698     *
     699     * @return void
     700     */
     701    private function safe_redirect( $url ) {
     702        $home_url = home_url();
     703        if ( '/' === substr( $home_url, -1 ) ) {
     704            wp_safe_redirect( $home_url . $url, 301 );
     705        } else {
     706            wp_safe_redirect( $home_url . '/' . $url, 301 );
     707        }
     708
     709        exit( 0 );
     710    }
     711
     712    /**
    692713     * Action to redirect to the custom permalink.
    693714     *
     
    753774                // Append any query component.
    754775                $custom_permalink .= strstr( $this->request_uri, '?' );
    755 
    756                 wp_safe_redirect( home_url() . '/' . $custom_permalink, 301 );
    757                 exit( 0 );
     776                $this->safe_redirect( $custom_permalink );
    758777            }
    759778        } else {
     
    823842                // Append any query component.
    824843                $url .= strstr( $this->request_uri, '?' );
    825 
    826                 wp_safe_redirect( home_url() . '/' . $url, 301 );
    827                 exit( 0 );
     844                $this->safe_redirect( $url );
    828845            }
    829846        }
  • custom-permalinks/tags/3.1.2/includes/class-custom-permalinks.php

    r3364450 r3367049  
    1919     * @var string
    2020     */
    21     public $version = '3.1.1';
     21    public $version = '3.1.2';
    2222
    2323    /**
  • custom-permalinks/tags/3.1.2/readme.txt

    r3364450 r3367049  
    8282== Changelog ==
    8383
     84= 3.1.2 - Sep 24, 2025 =
     85
     86* Bug:
     87  * [Prevent adding slash if `home_url()` contains one](https://github.com/samiahmedsiddiqui/custom-permalinks/pull/136)
     88
    8489= 3.1.1 - Sep 19, 2025 =
    8590
  • custom-permalinks/trunk/custom-permalinks.php

    r3364450 r3367049  
    44 * Plugin URI: https://www.custompermalinks.com/
    55 * Description: Set custom permalinks on a per-post basis.
    6  * Version: 3.1.1
     6 * Version: 3.1.2
    77 * Requires at least: 2.6
    88 * Requires PHP: 7.0
  • custom-permalinks/trunk/includes/class-custom-permalinks-frontend.php

    r3364450 r3367049  
    690690
    691691    /**
     692     * Trigger safe redirect.
     693     *
     694     * @since 3.1.2
     695     * @access private
     696     *
     697     * @param string $url Relative URL.
     698     *
     699     * @return void
     700     */
     701    private function safe_redirect( $url ) {
     702        $home_url = home_url();
     703        if ( '/' === substr( $home_url, -1 ) ) {
     704            wp_safe_redirect( $home_url . $url, 301 );
     705        } else {
     706            wp_safe_redirect( $home_url . '/' . $url, 301 );
     707        }
     708
     709        exit( 0 );
     710    }
     711
     712    /**
    692713     * Action to redirect to the custom permalink.
    693714     *
     
    753774                // Append any query component.
    754775                $custom_permalink .= strstr( $this->request_uri, '?' );
    755 
    756                 wp_safe_redirect( home_url() . '/' . $custom_permalink, 301 );
    757                 exit( 0 );
     776                $this->safe_redirect( $custom_permalink );
    758777            }
    759778        } else {
     
    823842                // Append any query component.
    824843                $url .= strstr( $this->request_uri, '?' );
    825 
    826                 wp_safe_redirect( home_url() . '/' . $url, 301 );
    827                 exit( 0 );
     844                $this->safe_redirect( $url );
    828845            }
    829846        }
  • custom-permalinks/trunk/includes/class-custom-permalinks.php

    r3364450 r3367049  
    1919     * @var string
    2020     */
    21     public $version = '3.1.1';
     21    public $version = '3.1.2';
    2222
    2323    /**
  • custom-permalinks/trunk/readme.txt

    r3364450 r3367049  
    8282== Changelog ==
    8383
     84= 3.1.2 - Sep 24, 2025 =
     85
     86* Bug:
     87  * [Prevent adding slash if `home_url()` contains one](https://github.com/samiahmedsiddiqui/custom-permalinks/pull/136)
     88
    8489= 3.1.1 - Sep 19, 2025 =
    8590
Note: See TracChangeset for help on using the changeset viewer.