Don't allow an empty rewrite slug for CPT. If you need something like this, do rewrite=>false. fixes #15082.
git-svn-id: https://develop.svn.wordpress.org/trunk@17298 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fa0584e236
commit
b735118cd7
@ -966,7 +966,7 @@ function register_post_type($post_type, $args = array()) {
|
||||
if ( false !== $args->rewrite && '' != get_option('permalink_structure') ) {
|
||||
if ( ! is_array( $args->rewrite ) )
|
||||
$args->rewrite = array();
|
||||
if ( ! isset( $args->rewrite['slug'] ) )
|
||||
if ( empty( $args->rewrite['slug'] ) )
|
||||
$args->rewrite['slug'] = $post_type;
|
||||
if ( ! isset( $args->rewrite['with_front'] ) )
|
||||
$args->rewrite['with_front'] = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user