Filters Provided By Permalinks Customizer Plugin

You can find all the filters below which are provided by Permalinks Customizer plugin. These filters can be used as per your Website requirement.

Exclude Permalinks

If you want to exclude some Permalink to processed with the plugin so, just add the filter looks like this:

function yasglobal_exclude_url( $permalink ) {
if ( false !== strpos( $permalink, '/contact-us/' ) ) {
return '__true';
}
return;
}
add_filter( 'permalinks_customizer_exclude_request', 'yasglobal_exclude_url' );
Show Relative Permalink/URL

To show relative permalink/url in Edit Post, add this filter in your themes functions.php.

add_filter( 'permalinks_customizer_remove_home_url', '__return_true' );
Exclude PostType from the Plugin

To exclude the plugin to be worked on any PostType. Add this filter in your themes functions.php.

function yasglobal_exclude_post_types( $post_type ) {
if ( $post_type == 'page' ) {
return '__true';
}
return '__false';
}
add_filter( 'permalinks_customizer_exclude_post_type', 'yasglobal_exclude_post_types');

Note: Plugin stops working on the backend. No more permalinks would be generated by the plugin but the permalink which is already created will remains in work.

Disable automatically create redirects

To disable automatically create redirects feature on creating and updating the post/pages/categories, add this filter in your themes functions.php.

add_filter( 'permalinks_customizer_auto_created_redirects', '__return_false');

This filter stops to be creating new redirects but existed redirects keeps working. To stop existed redirects, add this filter.

Disable Redirects

To disable redirects to be applied, add this filter in your themes functions.php.

add_filter( 'permalinks_customizer_disable_redirects', '__return_false');

This filter only stops redirects to be work but the automatically create redirects still works. To stop automatically create redirects feature add this filter.