PHP Class TitanFrameworkOptionUpload

Inheritance: extends TitanFrameworkOption
Mostrar archivo Open project: gambitph/titan-framework Class Usage Examples

Public Properties

Property Type Description
$defaultSecondarySettings

Public Methods

Method Description
__construct ( $settings, $owner ) : void Constructor.
allow_svg_uploads ( array $mimes ) : array Allow SVG mime types to be uploaded to WP.
createUploaderScript ( )
display ( ) * Display for options and meta.
generateCSS ( string $css, TitanFrameworkOption $option ) : string Generates CSS for the font, this is used in TitanFrameworkCSS
postLivePreview ( $optionID, $optionType, $option ) Closes the Javascript code created in preLivePreview().
preLivePreview ( $optionID, $optionType, $option ) The upload option gives out an attachment ID. Live previews will not work since we cannot get the upload URL from an ID easily. Use a specially created Ajax Handler for just getting the URL.
registerCustomizerControl ( $wp_customize, $section, $priority = 1 ) * Display for theme customizer.

Method Details

__construct() public method

Constructor.
Since: 1.5
public __construct ( $settings, $owner ) : void
return void

allow_svg_uploads() public method

Allow SVG mime types to be uploaded to WP.
Since: 2.9
public allow_svg_uploads ( array $mimes ) : array
$mimes array The allowed mime types.
return array $mimes The modified mime types.

createUploaderScript() public static method

public static createUploaderScript ( )

display() public method

* Display for options and meta.
public display ( )

generateCSS() public method

Generates CSS for the font, this is used in TitanFrameworkCSS
Since: 1.5
public generateCSS ( string $css, TitanFrameworkOption $option ) : string
$css string The CSS generated
$option TitanFrameworkOption The current option being processed.
return string The CSS generated

postLivePreview() public method

Closes the Javascript code created in preLivePreview().
See also: preLivePreview()
Since: 1.9
public postLivePreview ( $optionID, $optionType, $option )

preLivePreview() public method

The upload option gives out an attachment ID. Live previews will not work since we cannot get the upload URL from an ID easily. Use a specially created Ajax Handler for just getting the URL.
See also: tf_upload_option_customizer_get_value()
Since: 1.9
public preLivePreview ( $optionID, $optionType, $option )

registerCustomizerControl() public method

* Display for theme customizer.
public registerCustomizerControl ( $wp_customize, $section, $priority = 1 )

Property Details

$defaultSecondarySettings public_oe property

public $defaultSecondarySettings