WordPress.org

Make WordPress Core

Ticket #16092: 16092.use-new-args.diff

File 16092.use-new-args.diff, 1.3 KB (added by duck_, 6 years ago)
  • wp-includes/post.php

     
    10271027                                $wp_rewrite->add_rule( "{$archive_slug}/{$wp_rewrite->pagination_base}/([0-9]{1,})/?$", "index.php?post_type=$post_type" . '&paged=$matches[1]', 'top' );
    10281028                }
    10291029
    1030                 $wp_rewrite->add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite['with_front'], $args->rewrite['ep_mask'] );
     1030                $wp_rewrite->add_permastruct( $post_type, "{$args->rewrite['slug']}/%$post_type%", $args->rewrite );
    10311031        }
    10321032
    10331033        if ( $args->register_meta_box_cb )
  • wp-includes/taxonomy.php

     
    344344                        $tag = '([^/]+)';
    345345
    346346                $wp_rewrite->add_rewrite_tag("%$taxonomy%", $tag, $args['query_var'] ? "{$args['query_var']}=" : "taxonomy=$taxonomy&term=");
    347                 $wp_rewrite->add_permastruct($taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite']['with_front'], $args['rewrite']['ep_mask'] );
     347                $wp_rewrite->add_permastruct( $taxonomy, "{$args['rewrite']['slug']}/%$taxonomy%", $args['rewrite'] );
    348348        }
    349349
    350350        if ( is_null($args['show_ui']) )