PHP 클래스 TitanFrameworkOptionFont

부터: 1.4
상속: extends TitanFrameworkOption
파일 보기 프로젝트 열기: gambitph/titan-framework 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultSecondarySettings Default settings specific to this option
$defaultStyling Default style options
$webSafeFonts The list of web safe fonts

공개 메소드들

메소드 설명
__construct ( $settings, $owner ) : void Constructor
cleanValueForGetting ( string $value ) : string Cleans the raw value for getting
cleanValueForSaving ( string $value ) : string Cleans up the serialized value before saving
createFontScript ( ) : void Creates the Javascript for running the font option
display ( ) : void Displays the option in admin panels and meta boxes
enqueueGooglefonts ( ) : void Enqueues all the Google fonts, used in wp_enqueue_scripts
generateCSS ( string $css, TitanFrameworkOption $option ) : string Generates CSS for the font, this is used in TitanFrameworkCSS
generateCustomizerPreviewCSS ( array $generated ) : array Adds the list of all Google fonts into the customizer live preview
generateCustomizerPreviewJS ( ) : void Adds the Javascript code that adds Google fonts straight into the customizer preview.
getGoogleFontURLs ( ) : array Gets all the Google font URLs for enqueuing. This was previously inside $this->enqueueGooglefonts() but was split off so it can be used by other functions.
loadAdminScripts ( ) : void Enqueues the needed scripts for the admin
registerCustomizerControl ( $wp_customize, TitanFrameworkCustomizerSection $section, integer $priority = 1 ) : void Registers the theme customizer control, for displaying the option

메소드 상세

__construct() 공개 메소드

Constructor
부터: 1.4
public __construct ( $settings, $owner ) : void
리턴 void

cleanValueForGetting() 공개 메소드

Cleans the raw value for getting
부터: 1.4
public cleanValueForGetting ( string $value ) : string
$value string The raw value
리턴 string The cleaned value

cleanValueForSaving() 공개 메소드

Cleans up the serialized value before saving
부터: 1.4
public cleanValueForSaving ( string $value ) : string
$value string The serialized value
리턴 string The cleaned value

createFontScript() 공개 정적인 메소드

Creates the Javascript for running the font option
부터: 1.4
public static createFontScript ( ) : void
리턴 void

display() 공개 메소드

Displays the option in admin panels and meta boxes
부터: 1.4
public display ( ) : void
리턴 void

enqueueGooglefonts() 공개 메소드

Enqueues all the Google fonts, used in wp_enqueue_scripts
부터: 1.4
public enqueueGooglefonts ( ) : void
리턴 void

generateCSS() 공개 메소드

Generates CSS for the font, this is used in TitanFrameworkCSS
부터: 1.4
public generateCSS ( string $css, TitanFrameworkOption $option ) : string
$css string The CSS generated
$option TitanFrameworkOption The current option being processed
리턴 string The CSS generated

generateCustomizerPreviewCSS() 공개 메소드

Adds the list of all Google fonts into the customizer live preview
부터: 1.9.2
public generateCustomizerPreviewCSS ( array $generated ) : array
$generated array The parameters to pass to the ajax handler during customizer live previews.
리턴 array An array containing modified ajax values to pass

generateCustomizerPreviewJS() 공개 메소드

Adds the Javascript code that adds Google fonts straight into the customizer preview.
부터: 1.9.2
public generateCustomizerPreviewJS ( ) : void
리턴 void

getGoogleFontURLs() 공개 메소드

Gets all the Google font URLs for enqueuing. This was previously inside $this->enqueueGooglefonts() but was split off so it can be used by other functions.
부터: 1.9.2
public getGoogleFontURLs ( ) : array
리턴 array An array containing the font names as keys and the font URLs as values.

loadAdminScripts() 공개 메소드

Enqueues the needed scripts for the admin
부터: 1.4
public loadAdminScripts ( ) : void
리턴 void

registerCustomizerControl() 공개 메소드

Registers the theme customizer control, for displaying the option
부터: 1.4
public registerCustomizerControl ( $wp_customize, TitanFrameworkCustomizerSection $section, integer $priority = 1 ) : void
$section TitanFrameworkCustomizerSection The section where this option will be placed
$priority integer The order of this control in the section
리턴 void

프로퍼티 상세

$defaultSecondarySettings 공개적으로 프로퍼티

Default settings specific to this option
public $defaultSecondarySettings

$defaultStyling 공개적으로 정적으로 프로퍼티

Default style options
public static $defaultStyling

$webSafeFonts 공개적으로 정적으로 프로퍼티

The list of web safe fonts
public static $webSafeFonts