PHP Class Papi_Property_File, 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
$file_type string File 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.
get_labels ( ) : array Get labels.
html ( ) Render property html.
import_value ( mixed $value, string $slug, integer $post_id ) : mixed Import value to the property.
render_file_template ( ) Render file template.
wp_get_attachment_metadata ( mixed $data, integer $post_id ) : mixed Get attachment metadata.

Protected Methods

Method Description
is_attachment ( integer $id ) : boolean Check if the given id is a attachment post type or not.
setup_actions ( ) Setup actions.
setup_filters ( ) Setup filters.

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_labels() public method

Get labels.
public get_labels ( ) : 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_attachment() protected method

Check if the given id is a attachment post type or not.
protected is_attachment ( integer $id ) : boolean
$id integer
return boolean

render_file_template() public method

Render file template.

setup_actions() protected method

Setup actions.
protected setup_actions ( )

setup_filters() protected method

Setup filters.
protected setup_filters ( )

wp_get_attachment_metadata() public method

Get attachment metadata.
public wp_get_attachment_metadata ( mixed $data, integer $post_id ) : mixed
$data mixed
$post_id integer
return mixed

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

$file_type protected property

File type.
protected string $file_type
return string