Property | Type | Description | |
---|---|---|---|
$defaultSecondarySettings | Default settings specific to this option | ||
$defaultStyling | Default style options | ||
$webSafeFonts | The list of web safe fonts |
Method | Description | |
---|---|---|
__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 |
public cleanValueForGetting ( string $value ) : string | ||
$value | string | The raw value |
return | string | The cleaned value |
public cleanValueForSaving ( string $value ) : string | ||
$value | string | The serialized value |
return | string | The cleaned value |
public static createFontScript ( ) : void | ||
return | void |
public enqueueGooglefonts ( ) : void | ||
return | void |
public generateCSS ( string $css, TitanFrameworkOption $option ) : string | ||
$css | string | The CSS generated |
$option | TitanFrameworkOption | The current option being processed |
return | string | The CSS generated |
public generateCustomizerPreviewCSS ( array $generated ) : array | ||
$generated | array | The parameters to pass to the ajax handler during customizer live previews. |
return | array | An array containing modified ajax values to pass |
public generateCustomizerPreviewJS ( ) : void | ||
return | void |
public getGoogleFontURLs ( ) : array | ||
return | array | An array containing the font names as keys and the font URLs as values. |
public loadAdminScripts ( ) : void | ||
return | void |
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 |
return | void |
public $defaultSecondarySettings |