Properties

$message_key_name

$message_key_name : string

Message post type

Type

string

$twitter

$twitter : \Gianism\Service\Twitter

Type

\Gianism\Service\Twitter

$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

$post_type

$post_type : string

Type

string

$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

$limit_key

$limit_key : string

Post meta key for Cron limit

Type

string

$time_key

$time_key : string

Post meta key for

Type

string

$instances

$instances : \Gianism\Singleton

Instance holder

Type

\Gianism\Singleton

$_all_services

$_all_services : array

All services

Type

array

Methods

register_post_type()

register_post_type()

Register Post Type

enter_title_here()

enter_title_here(string $title, \WP_Post $post) : string

Filter title box

Parameters

string $title
\WP_Post $post

Returns

string

save_post()

save_post(int $post_id, \WP_Post $post)

Save post data

Parameters

int $post_id
\WP_Post $post

admin_enqueue_scripts()

admin_enqueue_scripts(string $suffix)

Enqueue assets

Parameters

string $suffix

edit_form_after_title()

edit_form_after_title(\WP_Post $post)

Edit form

Parameters

\WP_Post $post

get_schedule()

get_schedule(mixed $post) : array

Parameters

mixed $post

Returns

array

get_time_line()

get_time_line(mixed $post) : array

Get time line

Parameters

mixed $post

Returns

array

cron_limit()

cron_limit(int|\WP_Post $post) : false|string

Returns cron limit

Parameters

int|\WP_Post $post

Returns

false|string

cron_schedules()

cron_schedules(array $schedules) : array

Register every ten minutes

Parameters

array $schedules

Returns

array

register_cron()

register_cron()

Register cron

execute_cron()

execute_cron()

Execute Cron

get_columns()

get_columns(mixed $columns) : array

Post column header

Parameters

mixed $columns

Returns

array

custom_columns()

custom_columns(mixed $column_name, mixed $post_id)

Post column

Parameters

mixed $column_name
mixed $post_id

post_updated_messages()

post_updated_messages(mixed $message) : mixed

Update message

Parameters

mixed $message

Returns

mixed

register_short_code()

register_short_code()

Register short codes

__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

clear_schedule()

clear_schedule(int|\WP_Post $post)

Clear all schedule

Parameters

int|\WP_Post $post