wp_get_current_user

Retrieve the current user object.

Description

wp_get_current_user(); 

Usage

  1. if ( !function_exists( 'wp_get_current_user' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-db/phpunit/WP_Mock_Functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_get_current_user(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/phpunit/WP_Mock_Functions.php  
  1. function wp_get_current_user() { 
  2. return new Mock_WP_User();