PHP Class Papi_Property_Link, 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 array The default value.

Protected Properties

Property Type Description
$link_fields array Link fields.

Public Methods

Method Description
delete_value ( string $slug, integer $post_id, string $type ) : boolean Delete value from the database.
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.
load_value ( mixed $value, string $slug, integer $post_id ) : array Load value from database.
render_link_template ( ) Render link template.
update_value ( mixed $values, string $slug, integer $post_id ) : array Prepare value for the database.

Protected Methods

Method Description
prepare_link_array ( array | object $link, string $slug ) : array | object Prepare link array with post id. If it gets a post id bigger then zero it will use the permalink as url.
setup_actions ( ) Setup actions.

Method Details

delete_value() public method

Delete value from the database.
public delete_value ( string $slug, integer $post_id, string $type ) : boolean
$slug string
$post_id integer
$type string
return boolean

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

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

Load value from database.
public load_value ( mixed $value, string $slug, integer $post_id ) : array
$value mixed
$slug string
$post_id integer
return array

setup_actions() protected method

Setup actions.
protected setup_actions ( )

update_value() public method

Prepare value for the database.
public update_value ( mixed $values, string $slug, integer $post_id ) : array
$values 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 array $default_value
return array