get_author_posts_url [ WordPress Function ]
get_author_posts_url ( $author_id, $author_nicename = '' )
| Uses: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_the_author_posts, the_author_posts_link, the_author_posts, get_author_rss_link, get_the_author_url
Retrieve the URL to the author page for the user with the ID provided.
Source
<?php
function get_author_posts_url($author_id, $author_nicename = '') {
global $wp_rewrite;
$auth_ID = (int) $author_id;
$link = $wp_rewrite->get_author_permastruct();
if ( empty($link) ) {
$file = home_url( '/' );
$link = $file . '?author=' . $auth_ID;
} else {
if ( '' == $author_nicename ) {
$user = get_userdata($author_id);
if ( !empty($user->user_nicename) )
$author_nicename = $user->user_nicename;
}
$link = str_replace('%author%', $author_nicename, $link);
$link = home_url( user_trailingslashit( $link ) );
}
$link = apply_filters('author_link', $link, $author_id, $author_nicename);
return $link;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/get author posts url « WordPress Codex
Description. Gets the URL of the author page for the author with a given ID. Usage. <?php get_author_posts_url( $author_id, $author_nicename ); ?> ...
codex.wordpress.org - Docs for page author-template.php
get_author_posts_url (line 219). Retrieve the URL to the author page for the user with the ID provided. return: The URL to the author's page. since: 2.1.0; usedby: ...
phpdoc.wordpress.org - WordPress › Support » Tags — get_author_posts_url
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » get_author_posts_url. Tag: get_author_posts_url Add New » ...
wordpress.org - get_author_posts_url (WordPress Function) - WPSeek.com
WordPress lookup for get_author_posts_url, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com
Gebruikersdiscussies [ wordpress.org ]
- Jan Dembowski on "the_modified_author URL"
- feisthammel on "the_modified_author URL"
- Jan Dembowski on "the_modified_author URL"
- feisthammel on "the_modified_author URL"
- feisthammel on "the_modified_author URL"
- yasiph on "Display first name in specific posts which contain a custom field"
- Kailey Lampert (trepmal) on "Display first name in specific posts which contain a custom field"
- yasiph on "Display first name in specific posts which contain a custom field"
- Kailey Lampert (trepmal) on "Display first name in specific posts which contain a custom field"
- yasiph on "Display first name in specific posts which contain a custom field"