Méthode | Description | |
---|---|---|
activate_theme ( $theme_name, $theme_dir ) | function activate_theme Updates the database with the name of the new theme to use | |
cancel_preview ( ) | Cancel the viewing of any preview theme | |
class_from_filename ( $file, $check_realpath = false ) | ||
create ( string $name = null, string $template_engine = null, string $theme_dir = null ) : |
Returns a named Theme descendant. | |
get_active ( $nopreview = false ) : |
Returns the active theme information from the database | |
get_active_data ( $nopreview = false ) : array | Returns theme information for the active theme -- dir, path, theme.xml, screenshot url | |
get_all ( ) : array | Returns the theme dir and path information | |
get_all_data ( ) : array | Returns all theme information -- dir, path, theme.xml, screenshot url | |
get_theme_classes ( ) : array | Get a list of classes that extend Theme | |
get_theme_dir ( $nopreview = false ) : string | Returns the name of the active or previewed theme | |
preview_theme ( string $theme_name, string $theme_dir ) | Sets a theme to be the current user's preview theme | |
validate_theme ( string $theme_dir ) : boolean | Ensure that a theme meets requirements for activation/preview |
Méthode | Description | |
---|---|---|
get_active_theme_dir ( $nopreview = false ) : string | Returns the active theme's full directory path. | |
get_by_name ( $name ) |
public static activate_theme ( $theme_name, $theme_dir ) |
public static cancel_preview ( ) |
public static class_from_filename ( $file, $check_realpath = false ) |
public static create ( string $name = null, string $template_engine = null, string $theme_dir = null ) : |
||
$name | string | ( optional ) override the default theme lookup |
$template_engine | string | ( optional ) specify a template engine |
$theme_dir | string | ( optional ) specify a theme directory |
Résultat | An instance of the requested theme or the default theme |
public static get_active ( $nopreview = false ) : |
||
Résultat | An array of Theme data |
public static get_active_data ( $nopreview = false ) : array | ||
Résultat | array | An array of Theme data |
public static get_all_data ( ) : array | ||
Résultat | array | An array of Theme data |
public static get_theme_classes ( ) : array | ||
Résultat | array | List of string names of classes that extend Theme |
public static get_theme_dir ( $nopreview = false ) : string | ||
Résultat | string | the current theme or previewed theme's directory name |
public static preview_theme ( string $theme_name, string $theme_dir ) | ||
$theme_name | string | The name of the theme to preview |
$theme_dir | string | The directory of the theme to preview |
public static validate_theme ( string $theme_dir ) : boolean | ||
$theme_dir | string | the directory of the theme |
Résultat | boolean | True if the theme meets all requirements |