user_trailingslashit [ WordPress Function ]
| Parameters: |
|
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Retrieve trailing slash string, if blog set for adding trailing slashes.
Conditionally adds a trailing slash if the permalink structure has a trailing slash, strips the trailing slash if not. The string is passed through the 'user_trailingslashit' filter. Will remove trailing slash from string, if blog is not set to have them.
Source
<?php
function user_trailingslashit($string, $type_of_url = '') {
global $wp_rewrite;
if ( $wp_rewrite->use_trailing_slashes )
$string = trailingslashit($string);
else
$string = untrailingslashit($string);
// Note that $type_of_url can be one of following:
// single, single_trackback, single_feed, single_paged, feed, category, page, year, month, day, paged, post_type_archive
$string = apply_filters('user_trailingslashit', $string, $type_of_url);
return $string;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- user_trailingslashit Wordpress hook details -- Adam Brown, BYU ...
WordPress hook directory user_trailingslashit. WordPress version history for user_trailingslashit. This database has information for all major versions from WP ...
adambrown.info - PHPXRef 0.7 : WordPress : Function Reference: user_trailingslashit()
Function and Method Cross Reference. user_trailingslashit(). Defined at: /wp- includes/link-template.php -> line 19. Referenced 32 times: ...
phpxref.ftwr.co.uk - redirect_canonical not send type_of_url to user_trailingslashit
the function redirect_canonical not send correct type_of_url to user_trailingslashit when path is not home. an accolade missing and it's in accordance with the ...
core.trac.wordpress.org - user_trailingslashit (WordPress Function) - WPSeek.com
WordPress lookup for user_trailingslashit, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com