PHP Class Papi_Property_Bool, papi

Inheritance: extends Papi_Property
Show file Open project: wp-papi/papi

Public Properties

Property Type Description
$convert_type string The convert type.
$default_value boolean The default value.

Public Methods

Method Description
format_value ( mixed $value, string $slug, integer $post_id ) : boolean Format the value of the property before it's returned to WordPress admin or the site.
html ( ) Render property html.
import_value ( mixed $value, string $slug, integer $post_id ) : mixed Import value to the property.
load_value ( mixed $value, string $slug, integer $post_id ) : mixed Change value after it's loaded from the database.
update_value ( mixed $value, string $slug, integer $post_id ) : array Fix the database value on update.

Protected Methods

Method Description
prepare_value ( mixed $value ) : mixed Prepare property value.

Method Details

format_value() public method

Format the value of the property before it's returned to WordPress admin or the site.
public format_value ( mixed $value, string $slug, integer $post_id ) : boolean
$value mixed
$slug string
$post_id integer
return boolean

html() public method

Render property html.
public html ( )

import_value() public method

Import value to the property.
public import_value ( mixed $value, string $slug, integer $post_id ) : mixed
$value mixed
$slug string
$post_id integer
return mixed

load_value() public method

Change value after it's loaded from the database.
public load_value ( mixed $value, string $slug, integer $post_id ) : mixed
$value mixed
$slug string
$post_id integer
return mixed

prepare_value() protected method

Prepare property value.
protected prepare_value ( mixed $value ) : mixed
$value mixed
return mixed

update_value() public method

Fix the database value on update.
public update_value ( mixed $value, string $slug, integer $post_id ) : array
$value mixed
$slug string
$post_id integer
return array

Property Details

$convert_type public property

The convert type.
public string $convert_type
return string

$default_value public property

The default value.
public bool $default_value
return boolean