PHP Класс TitanFrameworkOptionUpload

Наследование: extends TitanFrameworkOption
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaultSecondarySettings

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

Constructor.
С версии: 1.5
public __construct ( $settings, $owner ) : void
Результат void

allow_svg_uploads() публичный Метод

Allow SVG mime types to be uploaded to WP.
С версии: 2.9
public allow_svg_uploads ( array $mimes ) : array
$mimes array The allowed mime types.
Результат array $mimes The modified mime types.

createUploaderScript() публичный статический Метод

public static createUploaderScript ( )

display() публичный Метод

* Display for options and meta.
public display ( )

generateCSS() публичный Метод

Generates CSS for the font, this is used in TitanFrameworkCSS
С версии: 1.5
public generateCSS ( string $css, TitanFrameworkOption $option ) : string
$css string The CSS generated
$option TitanFrameworkOption The current option being processed.
Результат string The CSS generated

postLivePreview() публичный Метод

Closes the Javascript code created in preLivePreview().
См. также: preLivePreview()
С версии: 1.9
public postLivePreview ( $optionID, $optionType, $option )

preLivePreview() публичный Метод

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.
См. также: tf_upload_option_customizer_get_value()
С версии: 1.9
public preLivePreview ( $optionID, $optionType, $option )

registerCustomizerControl() публичный Метод

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

Описание свойств

$defaultSecondarySettings публичное свойство

public $defaultSecondarySettings