WordPress.org

Make WordPress Core

Ticket #16999: 16999.diff

File 16999.diff, 510 bytes (added by solarissmoke, 11 years ago)

Pass parent page slug(s) through editable_slug filter before inserting them into the permalink

  • wp-admin/includes/post.php

     
    10921092                $uri = untrailingslashit($uri);
    10931093                $uri = strrev( stristr( strrev( $uri ), '/' ) );
    10941094                $uri = untrailingslashit($uri);
     1095                $uri = apply_filters( 'editable_slug', $uri );
    10951096                if ( !empty($uri) )
    10961097                        $uri .= '/';
    10971098                $permalink = str_replace('%pagename%', "{$uri}%pagename%", $permalink);