Ticket #16626: test-16626.php
File test-16626.php, 389 bytes (added by , 14 years ago) |
---|
Line | |
---|---|
1 | <?php |
2 | |
3 | add_action( 'init', function () { |
4 | register_post_type( 'question', array( |
5 | 'public' => true, |
6 | 'has_archive' => true, |
7 | 'label' => 'Questions', |
8 | ) ); |
9 | |
10 | flush_rewrite_rules(); |
11 | }); |
12 | |
13 | add_action( 'template_redirect', function() { |
14 | global $wp; |
15 | |
16 | echo '<pre>'; |
17 | var_dump( get_post_type_archive_link( 'question' ) ); |
18 | var_dump( $wp->matched_rule, $wp->query_string ); |
19 | echo '</pre>'; |
20 | }); |