Use correct query var. see #15378.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-12-09 14:23:54 +00:00
parent 3bf4bab66a
commit 5aafa64e34
2 changed files with 3 additions and 3 deletions

View File

@ -5161,8 +5161,8 @@ function _post_format_link( $link, $term, $taxonomy ) {
if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) { if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
return str_replace( "/{$term->slug}", '/' . $slugs[ str_replace( 'post-format-', '', $term->slug ) ], $link ); return str_replace( "/{$term->slug}", '/' . $slugs[ str_replace( 'post-format-', '', $term->slug ) ], $link );
} else { } else {
$link = remove_query_arg( 'format', $link ); $link = remove_query_arg( 'post_format', $link );
return add_query_arg( 'format', str_replace( 'post-format-', $term->slug ), $link ); return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
} }
} }
add_filter( 'term_link', '_post_format_link', 10, 3 ); add_filter( 'term_link', '_post_format_link', 10, 3 );

View File

@ -90,7 +90,7 @@ function create_initial_taxonomies() {
'name' => '', 'name' => '',
'singular_name' => '', 'singular_name' => '',
), ),
'query_var' => 'post_format', 'query_var' => true,
'rewrite' => $rewrite, 'rewrite' => $rewrite,
'show_ui' => false, 'show_ui' => false,
'_builtin' => true, '_builtin' => true,