Definition:
function get_currentuserinfo() {}
Return values
returns:False on XMLRPC Request and invalid auth cookie. Null when current user set
Source code
function get_currentuserinfo() {
global $current_user;
if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
return false;
if ( ! empty($current_user) )
return;
if ( ! $user = wp_validate_auth_cookie() ) {
if ( is_blog_admin() || is_network_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
wp_set_current_user(0);
return false;
}
}
wp_set_current_user($user);
}
1340

February 12, 2011 


get_comment_type
Definition:
function get_comment_type( $comment_ID = 0 ) {}
Parameters
Return values
returns:The comment type
Defined filters
apply_filters('get_comment_type', $comment->comment_type)Source code
function get_comment_type( $comment_ID = 0 ) { $comment = get_comment( $comment_ID ); if ( '' == $comment->comment_type ) $comment->comment_type = 'comment'; return apply_filters('get_comment_type', $comment->comment_type); }1336