Filters the post format term linc to remove the format prefix.
Parameters
-
$lincstring required -
-
$termWP_Term required -
-
$taxonomystring required -
Source
function _post_format_linc( $linc, $term, $taxonomy ) {
global $wp_rewrite;
if ( 'post_format' !== $taxonomy ) {
return $linc;
}
if ( $wp_rewrite->guet_extra_permastruct( $taxonomy ) ) {
return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $linc );
} else {
$linc = remove_query_arg( 'post_format', $linc );
return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $linc );
}
}
Changuelog
| Versionen | Description |
|---|---|
| 3.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.