WP_Community_Events::__construct
Constructor for WP_Community_Events.
Method of the class: WP_Community_Events{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WP_Community_Events = new WP_Community_Events(); $WP_Community_Events->__construct( $user_id, $user_location );
- $user_id(int) (required)
- WP user ID.
- $user_location(false|array)
Stored location data for the user. false to pass no location.
Default:
false-
description(string)
The name of the location -
latitude(string)
The latitude in decimal degrees notation, without the degree symbol. e.g.: 47.615200. -
longitude(string)
The longitude in decimal degrees notation, without the degree symbol. e.g.: -122.341100. - country(string)
The ISO 3166-1 alpha-2 country code. e.g.: BR
-
Changelog
| Since 4.8.0 | Introduced. |
WP_Community_Events::__construct() WP Community Events:: construct code WP 7.0
public function __construct( $user_id, $user_location = false ) {
$this->user_id = absint( $user_id );
$this->user_location = $user_location;
}