Свойство | Type | Description | |
---|---|---|---|
$cssInstance | TitanFrameworkCSS | The CSS class instance used | |
$optionNamespace | string | Options will be prefixed with this in the database | |
$optionsUsed | array | We store the options (with IDs) here, used for ensuring our serialized option value doesn't get cluttered with unused options | |
$settings | array | The current list of settings |
Méthode | Description | |
---|---|---|
__construct ( string $optionNamespace ) | Creates a new TitanFramework object | |
addCustomizerSaveFilter ( mixed $value, string $optionName, mixed $oldValue ) : mixed | Adds a 'tf_save_option_{namespace}_{optionID}' filter to all Customizer options which are just about to be saved | |
createAdminPage ( array $settings ) : TitanFrameworkAdminPage | Create a admin page | |
createAdminPanel ( array $settings ) : TitanFrameworkAdminPage | Create a admin page | |
createCSS ( string $CSSString ) : void | Generates style rules which can use options as their values | |
createContainer ( array $settings ) : TitanFrameworkCustomizer | TitanFrameworkAdminPage | TitanFrameworkMetaBox | Creates a container (e.g. admin page, meta box, customizer section) depending on the type parameter given in $settings | |
createCustomizer ( array $settings ) : TitanFrameworkCustomizer | Create a customizer section | |
createMetaBox ( array $settings ) : TitanFrameworkMetaBox | Create a meta box | |
createSampleContentPage ( array $settings ) : TitanFrameworkAdminPage | Create a sample content only. | |
createThemeCustomizerSection ( array $settings ) : TitanFrameworkCustomizer | Create a customizer section | |
deleteAllOptions ( ) : void | Deletes ALL the options for the namespace. Even deletes all meta found in all posts. | |
displayFrameworkError ( string $message, array | object $errorObject = null ) : void | Displays an error notice | |
generateCSS ( ) : string | Gets the CSS generated | |
getAllInstances ( ) : array | Gets all active instances of Titan Framework | |
getInstance ( string $optionNamespace ) : TitanFramework | Gets an instance of the framework for the namespace | |
getInternalAdminPageOption ( string $optionName, mixed $defaultValue = false ) : mixed | Gets the admin page option that's loaded into the instance, used by the option class | |
getOption ( string $optionName, integer $postID = null ) : mixed | Get an option | |
getOptions ( array $optionArray, integer $postID = null ) : array | Gets a set of options. Pass an associative array containing the option names as keys and the values you want to be retained if the option names are not implemented. | |
getURL ( string $script, string $file ) : string | Acts the same way as plugins_url( 'script', __FILE__ ) but returns then correct url when called from inside a theme. | |
loadAdminScripts ( string $hook ) : void | Loads all the admin scripts used by Titan Framework | |
rememberAllOptions ( TitanFrameworkOption $option ) : void | Action hook on tf_create_option to remember all the options, used to ensure that our serialized option does not get cluttered with unused options | |
removeChildThemeOptions ( boolean $continueCreating, array $optionSettings ) : boolean | Hook to the tf_create_option_continue filter, to check whether or not to continue adding an option (if the option id was used in $titan->removeOption). | |
removeOption ( string $optionName ) : void | A function available ONLY to CHILD themes to stop the creation of options created by the PARENT theme. | |
saveInternalAdminPageOptions ( ) : array | Saves all the admin (not meta & customizer) options which are currently loaded into this instance | |
set ( string $setting, string $value ) : void | Sets a value in the $setting class variable | |
setInternalAdminPageOption ( string $optionName, mixed $value ) : boolean | Sets the admin page option that's loaded into the instance, used by the option class. | |
setOption ( string $optionName, mixed $value, integer $postID = null ) : boolean | Sets an option |
Méthode | Description | |
---|---|---|
getInternalAdminOptions ( ) : array | Gets all the admin page options (not meta & customizer) and loads them from the database into a class variable. This is needed because all our admin page options are contained in a single entry. |
public __construct ( string $optionNamespace ) | ||
$optionNamespace | string | The namespace to get options from. |
public createAdminPage ( array $settings ) : TitanFrameworkAdminPage | ||
$settings | array | The arguments for creating the admin page. |
Résultat | TitanFrameworkAdminPage | The created admin page |
public createAdminPanel ( array $settings ) : TitanFrameworkAdminPage | ||
$settings | array | The arguments for creating the admin page. |
Résultat | TitanFrameworkAdminPage | The created admin page |
public createContainer ( array $settings ) : TitanFrameworkCustomizer | TitanFrameworkAdminPage | TitanFrameworkMetaBox | ||
$settings | array | The arguments for creating the container. |
Résultat | TitanFrameworkCustomizer | TitanFrameworkAdminPage | TitanFrameworkMetaBox | The created container |
public createCustomizer ( array $settings ) : TitanFrameworkCustomizer | ||
$settings | array | The arguments for creating a customizer section. |
Résultat | TitanFrameworkCustomizer | The created section |
public createMetaBox ( array $settings ) : TitanFrameworkMetaBox | ||
$settings | array | The arguments for creating the meta box. |
Résultat | TitanFrameworkMetaBox | The created meta box |
public createSampleContentPage ( array $settings ) : TitanFrameworkAdminPage | ||
$settings | array | The arguments for creating the sample conent page. |
Résultat | TitanFrameworkAdminPage | The created sample coennt page. |
public createThemeCustomizerSection ( array $settings ) : TitanFrameworkCustomizer | ||
$settings | array | The arguments for creating a customizer section. |
Résultat | TitanFrameworkCustomizer | The created section |
public deleteAllOptions ( ) : void | ||
Résultat | void |
public generateCSS ( ) : string | ||
Résultat | string | The generated CSS |
public static getAllInstances ( ) : array | ||
Résultat | array | An array of TitanFramework objects |
public static getInstance ( string $optionNamespace ) : TitanFramework | ||
$optionNamespace | string | The namespace to get options from. |
Résultat | TitanFramework |
protected getInternalAdminOptions ( ) : array | ||
Résultat | array | All admin options currently in the instance |
public loadAdminScripts ( string $hook ) : void | ||
$hook | string | The slug of admin page that called the enqueue. |
Résultat | void |
public rememberAllOptions ( TitanFrameworkOption $option ) : void | ||
$option | TitanFrameworkOption | The option that was just created. |
Résultat | void |
public removeChildThemeOptions ( boolean $continueCreating, array $optionSettings ) : boolean | ||
$continueCreating | boolean | If true, the option will be created. |
$optionSettings | array | The settings for the option to be created. |
Résultat | boolean | If true, continue with creating the option. False to stop it.. |
public removeOption ( string $optionName ) : void | ||
$optionName | string | The id of the option to remove / stop from being created. |
Résultat | void |
public saveInternalAdminPageOptions ( ) : array | ||
Résultat | array | All admin options currently in the instance |
public TitanFrameworkCSS $cssInstance | ||
Résultat | TitanFrameworkCSS |
public string $optionNamespace | ||
Résultat | string |
public array $optionsUsed | ||
Résultat | array |