PHP Класс Carbon_Fields\Container\User_Meta_Container

Наследование: extends Container
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$settings

Защищенные свойства (Protected)

Свойство Тип Описание
$user_id

Открытые методы

Метод Описание
__construct ( string $title ) Create a new user meta container
attach ( ) Add the container to the user
init ( ) Bind attach() and save() to the appropriate WordPress actions.
is_profile_page ( ) Whether we're on the user profile page
is_valid_attach ( ) : boolean Perform checks whether the container should be attached during the current request
is_valid_save ( $user_id ) : boolean Checks whether the current request is valid
is_valid_save_conditions ( integer $user_id ) : boolean Perform checks whether the current save() request is valid
render ( $user_profile = null ) Output the container markup
save ( integer $user_id ) Perform save operation after successful is_valid_save() check.
set_user_id ( integer $user_id ) Set the user ID the container will operate with.
show_on_user_role ( string $role ) : object Show the container only on users who have the $role role.

Описание методов

__construct() публичный Метод

Create a new user meta container
public __construct ( string $title )
$title string Unique title of the container

attach() публичный Метод

Add the container to the user
public attach ( )

init() публичный Метод

Bind attach() and save() to the appropriate WordPress actions.
public init ( )

is_profile_page() публичный Метод

Whether we're on the user profile page
public is_profile_page ( )

is_valid_attach() публичный Метод

Perform checks whether the container should be attached during the current request
public is_valid_attach ( ) : boolean
Результат boolean True if the container is allowed to be attached

is_valid_save() публичный Метод

Checks whether the current request is valid
public is_valid_save ( $user_id ) : boolean
Результат boolean

is_valid_save_conditions() публичный Метод

Perform checks whether the current save() request is valid
public is_valid_save_conditions ( integer $user_id ) : boolean
$user_id integer ID of the user against which save() is ran
Результат boolean

render() публичный Метод

Output the container markup
public render ( $user_profile = null )

save() публичный Метод

The call is propagated to all fields in the container.
public save ( integer $user_id )
$user_id integer ID of the user against which save() is ran

set_user_id() публичный Метод

Set the user ID the container will operate with.
public set_user_id ( integer $user_id )
$user_id integer

show_on_user_role() публичный Метод

Show the container only on users who have the $role role.
public show_on_user_role ( string $role ) : object
$role string
Результат object $this

Описание свойств

$settings публичное свойство

public $settings

$user_id защищенное свойство

protected $user_id