_wp_http_get_object

Returns the initialized WP_Http Object.

Description

(WP_Http) _wp_http_get_object(); 

Returns (WP_Http)

HTTP Transport object.


Usage

  1. if ( !function_exists( '_wp_http_get_object' ) ) { 
  2. require_once ABSPATH . WPINC . '/http.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = _wp_http_get_object(); 
  7.  

Defined (1)

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

/wp-includes/http.php  
  1. function _wp_http_get_object() { 
  2. static $http = null; 
  3.  
  4. if ( is_null( $http ) ) { 
  5. $http = new WP_Http(); 
  6. return $http;