WordPress.org

Make WordPress Core

Changeset 17298


Ignore:
Timestamp:
01/14/11 15:42:56 (4 years ago)
Author:
nacin
Message:

Don't allow an empty rewrite slug for CPT. If you need something like this, do rewrite=>false. fixes #15082.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r17249 r17298  
    967967        if ( ! is_array( $args->rewrite ) ) 
    968968            $args->rewrite = array(); 
    969         if ( ! isset( $args->rewrite['slug'] ) ) 
     969        if ( empty( $args->rewrite['slug'] ) ) 
    970970            $args->rewrite['slug'] = $post_type; 
    971971        if ( ! isset( $args->rewrite['with_front'] ) ) 
Note: See TracChangeset for help on using the changeset viewer.