wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
_post_format_link is private and should not be used in themes or plugins directly.
_post_format_link › WordPress Function
Od3.1.0
Przestarzałyn/a
› _post_format_link ( $link, $term, $taxonomy )
| Dostęp: |
|
| Parametry: (3) |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Filters the post format term link to remove the format prefix.
Powiązane Funkcje: get_post_format_link, get_post_format_string, post_permalink, get_post_format, get_post_format_strings
Źródło
function _post_format_link( $link, $term, $taxonomy ) {
global $wp_rewrite;
if ( 'post_format' !== $taxonomy ) {
return $link;
}
if ( $wp_rewrite->get_extra_permastruct( $taxonomy ) ) {
return str_replace( "/{$term->slug}", '/' . str_replace( 'post-format-', '', $term->slug ), $link );
} else {
$link = remove_query_arg( 'post_format', $link );
return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link );
}
}