GC_Community_Events::__construct()

最后更新于:2021-11-26 23:10:11

GC_Community_Events::__construct( int$user_id, false|array$user_location=false)

Constructor for GC_Community_Events.

参数

$user_id

(int) (Required) GC user ID.

$user_location

(false|array) (Optional) Stored location data for the user. false to pass no location.

  • ‘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

Default value: false

源文件

文件: gc-admin/includes/class-gc-community-events.php

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