PHP Class TitanFrameworkOptionUpload

Inheritance: extends TitanFrameworkOption
Afficher le fichier Open project: gambitph/titan-framework Class Usage Examples

Méthodes publiques

Свойство Type Description
$defaultSecondarySettings

Méthodes publiques

Méthode 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 méthode

Constructor.
Since: 1.5
public __construct ( $settings, $owner ) : void
Résultat void

allow_svg_uploads() public méthode

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.
Résultat array $mimes The modified mime types.

createUploaderScript() public static méthode

public static createUploaderScript ( )

display() public méthode

* Display for options and meta.
public display ( )

generateCSS() public méthode

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.
Résultat string The CSS generated

postLivePreview() public méthode

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

preLivePreview() public méthode

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 méthode

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

Property Details

$defaultSecondarySettings public_oe property

public $defaultSecondarySettings