Posted in: Getting Started (4) How To (14) Plugin Options Explained (35) Actions / Filters (30)      Code Example (15)  

Name: wp-hide/interface/process/minimum_slug_length
Type: Filter
(int) $slug_minimum_length
(array) $data

Using this filter, the minimum length of a custom slug can be changed. The default is 5.

    add_filter( 'wp-hide/interface/process/minimum_slug_length', '__wph_minimum_slug_length', 10, 2 );
    function __wph_minimum_slug_length ( $slug_minimum_length, $data )
            if ( $data['module_name']   ==  'New wp-login.php'  )
                $slug_minimum_length    =   2;    
            return $slug_minimum_length;

The above code should be placed inside a custom file on /wp-content/mu-plugins/ folder or a custom plugin.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn
Scroll to top