Documentation

wp-hide/interface/process/minimum_slug_length

Posted in: Getting Started (4) How To (15) Plugin Options Explained (37) Actions / Filters (32)      Code Example (16)  

Name: wp-hide/interface/process/minimum_slug_length
Type: Filter
Arguments:
(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