PHP Class Papi_Property_Dropdown, papi

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

Public Properties

Property Type Description
$convert_type string The convert type.

Public Methods

Method Description
format_value ( mixed $value, string $slug, integer $post_id ) : mixed Format the value of the property before it's returned to WordPress admin or the site.
get_default_settings ( ) : array Get default settings.
html ( ) Render property html.
import_value ( mixed $value, string $slug, integer $post_id ) : mixed Import value to the property.
is_string_items ( ) : boolean Determine if items are strings or not.
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 ) : mixed Update value before it's saved to the database.

Protected Methods

Method Description
get_items ( ) : array Get dropdown items.

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 ) : mixed
$value mixed
$slug string
$post_id integer
return mixed

get_default_settings() public method

Get default settings.
public get_default_settings ( ) : array
return array

get_items() protected method

Get dropdown items.
protected get_items ( ) : array
return array

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

is_string_items() public method

Determine if items are strings or not.
public is_string_items ( ) : boolean
return boolean

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

update_value() public method

Update value before it's saved to the database.
public update_value ( mixed $value, string $slug, integer $post_id ) : mixed
$value mixed
$slug string
$post_id integer
return mixed

Property Details

$convert_type public property

The convert type.
public string $convert_type
return string