get_the_author_meta [ WordPress Function ]
get_the_author_meta ( $field = '', $user_id = false )
| Parameters: |
|
| Uses: |
|
| Links: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: the_author_meta, get_the_author_email, get_the_author_msn, get_the_author_aim, get_the_author_yim
Retrieve the requested data of the author of the current post.
Source
<?php
function get_the_author_meta( $field = '', $user_id = false ) {
if ( ! $user_id ) {
global $authordata;
$user_id = isset( $authordata->ID ) ? $authordata->ID : 0;
} else {
$authordata = get_userdata( $user_id );
}
if ( in_array( $field, array( 'login', 'pass', 'nicename', 'email', 'url', 'registered', 'activation_key', 'status' ) ) )
$field = 'user_' . $field;
$value = isset( $authordata->$field ) ? $authordata->$field : '';
return apply_filters( 'get_the_author_' . $field, $value, $user_id );
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/get the author meta « WordPress Codex
get_the_author_meta() returns the data for use in PHP. To display the information instead, use the_author_meta(). If the specified meta field does not exist for ...
codex.wordpress.org - Function Reference/the author meta « WordPress Codex
A user ID can be specified if this tag is used outside The Loop. If the meta field does not exist, nothing is printed. NOTE: Use get_the_author_meta() if you need ...
codex.wordpress.org - WordPress › Support » get_the_author_meta value?
Can anyone show me an example or point me to the right documentation for the following? How do I only show posts from authors who's user meta value is true ...
wordpress.org - get_the_author_meta (WordPress Function) - WPSeek.com
WordPress lookup for get_the_author_meta, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com
Gebruikersdiscussies [ wordpress.org ]
- theApe on "If author meta exists, do this or that."
- bcworkz on "If author meta exists, do this or that."
- theApe on "If author meta exists, do this or that."
- cmchristou on "Wordpress displays wrong author"
- ryanve on "Get Author ID From Slug"
- suthen on "get_the_author_meta() as a variable/string"
- crookeddesigns on "get_the_author_meta conditional display"
- alchymyth on "get_the_author_meta conditional display"
- crookeddesigns on "get_the_author_meta conditional display"
- jessor on "Wordpress displays wrong author"