Ticket #36188: 36188.3.diff
File 36188.3.diff, 2.0 KB (added by , 8 years ago) |
---|
-
src/wp-includes/class-wp-post-type.php
470 470 } 471 471 } 472 472 473 if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {473 if ( false !== $args['rewrite'] && ( is_admin() || wp_installing() || '' != get_option( 'permalink_structure' ) ) ) { 474 474 if ( ! is_array( $args['rewrite'] ) ) { 475 475 $args['rewrite'] = array(); 476 476 } … … 535 535 $wp->add_query_var( $this->query_var ); 536 536 } 537 537 538 if ( false !== $this->rewrite && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {538 if ( false !== $this->rewrite && ( is_admin() || wp_installing() || '' != get_option( 'permalink_structure' ) ) ) { 539 539 if ( $this->hierarchical ) { 540 540 add_rewrite_tag( "%$this->name%", '(.+?)', $this->query_var ? "{$this->query_var}=" : "post_type=$this->name&pagename=" ); 541 541 } else { -
src/wp-includes/class-wp-taxonomy.php
275 275 $args['query_var'] = false; 276 276 } 277 277 278 if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {278 if ( false !== $args['rewrite'] && ( is_admin() || wp_installing() || '' != get_option( 'permalink_structure' ) ) ) { 279 279 $args['rewrite'] = wp_parse_args( $args['rewrite'], array( 280 280 'with_front' => true, 281 281 'hierarchical' => false, … … 360 360 $wp->add_query_var( $this->query_var ); 361 361 } 362 362 363 if ( false !== $this->rewrite && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {363 if ( false !== $this->rewrite && ( is_admin() || wp_installing() || '' != get_option( 'permalink_structure' ) ) ) { 364 364 if ( $this->hierarchical && $this->rewrite['hierarchical'] ) { 365 365 $tag = '(.+?)'; 366 366 } else {