WordPress at Your Fingertips
function is not described

WP_Community_Events::__construct() public WP 4.8.0

Constructor for WP_Community_Events.

{} It's a method of the class: WP_Community_Events{}

No Hooks.

Return

null. Nothing.

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.

Code of WP_Community_Events::__construct() WP 5.8.2

public function __construct( $user_id, $user_location = false ) {
	$this->user_id       = absint( $user_id );
	$this->user_location = $user_location;
}