Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_post_format_link [ WordPress Function ]

_post_format_link ( $link, $term, $taxonomy )
Access:
  • private
Defined at:



Filters the post format term link to remove the format prefix.

Source


<?php
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 );
    }
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics