Constants

UPDATED_ACTION

UPDATED_ACTION

Properties

$values

$values : array

オプション

Type

array

$message_key_name

$message_key_name : string

Message post type

Type

string

$force_register

$force_register : bool

Type

bool

$fb_enabled

$fb_enabled : bool

Type

bool

$facebook_enabled

$facebook_enabled : bool

Type

bool

$fb_app_id

$fb_app_id : string

Type

string

$fb_app_secret

$fb_app_secret : string

Type

string

$fb_fan_gate

$fb_fan_gate : int

Type

int

$fb_use_api

$fb_use_api : bool

Type

bool

$tw_enabled

$tw_enabled : bool

Type

bool

$twitter_enabled

$twitter_enabled : bool

Type

bool

$tw_screen_name

$tw_screen_name : string

Type

string

$tw_consumer_key

$tw_consumer_key : string

Type

string

$tw_consumer_secret

$tw_consumer_secret : string

Type

string

$tw_access_token

$tw_access_token : string

Type

string

$tw_access_token_secret

$tw_access_token_secret : string

Type

string

$tw_use_cron

$tw_use_cron : bool

Type

bool

$ggl_enabled

$ggl_enabled : bool

Type

bool

$google_enabled

$google_enabled : bool

Type

bool

$ggl_consumer_key

$ggl_consumer_key : string

Type

string

$ggl_consumer_secret

$ggl_consumer_secret : string

Type

string

$yahoo_enabled

$yahoo_enabled : bool

Type

bool

$yahoo_application_id

$yahoo_application_id : string

Type

string

$yahoo_consumer_secret

$yahoo_consumer_secret : string

Type

string

$mixi_enabled

$mixi_enabled : bool

Type

bool

$mixi_consumer_key

$mixi_consumer_key : string

Type

string

$mixi_consumer_secret

$mixi_consumer_secret : string

Type

string

$mixi_access_token

$mixi_access_token : string

Type

string

$mixi_refresh_token

$mixi_refresh_token : string

Type

string

$amazon_enabled

$amazon_enabled : bool

Type

bool

$amazon_client_id

$amazon_client_id : string

Type

string

$amazon_client_secret

$amazon_client_secret : string

Type

string

$github_enabled

$github_enabled : bool

Type

bool

$github_client_id

$github_client_id : string

Type

string

$github_client_secret

$github_client_secret : string

Type

string

$show_button_on_login

$show_button_on_login : bool

Type

bool

$button_type

$button_type : int

Type

int

$dir

$dir : string

Type

string

$url

$url : string

Type

string

$all_services

$all_services : array

Type

array

$nonce_key_name

$nonce_key_name : string

Type

string

$key

$key : string

オプションのキー名

Type

string

$default_option

$default_option : array

オプション初期値

Type

array

$name

$name : string

Name

Used for option key, nonce, etc.

Type

string

$version

$version : string

Version number

Type

string

$domain

$domain : string

i18n Domain

Type

string

$instances

$instances : \Gianism\Singleton

Instance holder

Type

\Gianism\Singleton

$_all_services

$_all_services : array

All services

Type

array

Methods

update()

update()

Save options with post data

partial_update()

partial_update(array $options) : bool

Partially update

Parameters

array $options

Returns

bool

show_button_on_login()

show_button_on_login(string $context) : mixed|void

Detect if show login buttons

Parameters

string $context

Returns

mixed|void

button_types()

button_types() : array

Return button types

Returns

array

has_invalid_option()

has_invalid_option(string $name) : bool

Returns if option is wrong

Parameters

string $name

Returns

bool

__get()

__get(string $name) : mixed

Getter

Parameters

string $name

Returns

mixed

get_instance()

get_instance(array $argument) : self

Get instance

Parameters

array $argument

Returns

self

_()

_(string $string) : string

Alias of __

Parameters

string $string

Returns

string

e()

e(string $string)

Alias of _e

Parameters

string $string

get()

get(string $key) : mixed

Return $_GET

Parameters

string $key

Returns

mixed

post()

post(string $key) : mixed

Return $_POST

Parameters

string $key

Returns

mixed

request()

request(string $key) : mixed

return $_REQUEST

Parameters

string $key

Returns

mixed

nonce_action()

nonce_action(string $action) : string

Return nonce name with prefix

Parameters

string $action

Returns

string

nonce_create()

nonce_create(string $action) : string

Parameters

string $action

Returns

string

nonce_field()

nonce_field(string $action, bool $referrer)

Alias of wp_nonce_field

Parameters

string $action
bool $referrer

Default false.

verify_nonce()

verify_nonce(string $action, string $referrer) : boolean

Check nonce

Parameters

string $action
string $referrer

Returns

boolean

is_ssl_required()

is_ssl_required() : boolean

Returns if login is forced to use SSL.

To override it, use filter gianism_force_ssl_login

Returns

boolean

is_enabled()

is_enabled(string $service) : bool

Determine if service is enabled.

Parameters

string $service

If not specified, one of the services are enabled, return true.

Returns

bool

get_meta_owner()

get_meta_owner(string $key, string $value) : int

Retrieve user meta's owner ID

Parameters

string $key
string $value

Returns

int —

User ID. If not exists, return 0

get_service_instance()

get_service_instance(string $service) : null|\Gianism\Service\Common\Mail

Get service instance

Parameters

string $service

Returns

null|\Gianism\Service\Common\Mail

user_can_register()

user_can_register() : bool

Detect if user can register

Returns

bool

__construct()

__construct(array $argument)

Constructor

Parameters

array $argument

add_message()

add_message(string $string, bool $error)

Add message to show

Parameters

string $string
bool $error

wp_die()

wp_die(string $message, int $status_code, bool $return)

Short hand for wp_die

Parameters

string $message
int $status_code
bool $return

session_write()

session_write(string $key, mixed $value)

Write session

Parameters

string $key
mixed $value

session_get()

session_get(string $key) : bool

Get session

After get, session key will be deleted.

Parameters

string $key

Returns

bool

session_delete()

session_delete(string $key)

Delete session

Parameters

string $key