PHP 클래스 Carbon_Fields\Container\User_Meta_Container

상속: extends Container
파일 보기 프로젝트 열기: htmlburger/carbon-fields

공개 프로퍼티들

프로퍼티 타입 설명
$settings

보호된 프로퍼티들

프로퍼티 타입 설명
$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