PHP Class WPDKTheme

Author: =undo= ([email protected])
Inheritance: extends WPDKObject
Show file Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$__version string Override version
$assetsURL string The Theme URL more assets/. This property is very useful for read style sheet and Javascript file in the 'assets' folder.
$classPath string The Filesystem theme path more classes/
$cssURL string The Theme URL more assets/css/
$imagesURL string The Theme URL more assets/css/images/
$javascriptURL string The Theme URL more assets/js/
$path string Filesystem theme path. Alias TEMPLATEPATH
$setup WPDKThemeSetup Theme Setup class model
$theme WP_Theme Instance of WP_Theme class

Public Methods

Method Description
__construct ( string $file, boolean | WPDKThemeSetup $setup = false ) : WPDKTheme Create an instance of WPDKTheme class
_after_setup_theme ( ) Internal use
_body_classes ( $classes ) Add a your custom class in body tag class attribute and make the array (classes attribute) unique.
_init ( ) Do a several Clean Up
_wp_head ( ) Print scripts or data in the head tag on the front end.
admin_init ( ) This action is used to avoid display the admin backend area to subscriber user
after_setup_theme ( ) Setup theme
ajax ( ) Subclass for init Ajax gateway
autoloadEnvironment ( string $sClassName ) This function performs runtime autoloading of a class specifically related to this instance; this autoloading is based on previous class registering that has to be executed before.
image_size_names_choose ( array $sizes ) : array Allows modification of the list of image sizes that are available to administrators in the WordPress Media Library.
init_shortcode ( ) Subclass for inti your shortcode.
init_theme ( ) Init the theme
registerAutoloadClass ( string | array $sLoadingPath, string $mClassName = '' ) This function records a WPX theme class into autoloading register, joined with its loading path.
wp_enqueue_scripts ( ) Fires when scripts and styles are enqueued.
wp_footer ( ) Subclass to insert output in the fotter
wp_head ( ) Print scripts or data in the head tag on the front end.
wp_print_styles ( ) Fires before styles in the $handles queue are printed.

Method Details

__construct() public method

Create an instance of WPDKTheme class
public __construct ( string $file, boolean | WPDKThemeSetup $setup = false ) : WPDKTheme
$file string
$setup boolean | WPDKThemeSetup Optional. A your custom theme setup class model
return WPDKTheme

_after_setup_theme() public method

Internal use
public _after_setup_theme ( )

_body_classes() public method

Add a your custom class in body tag class attribute and make the array (classes attribute) unique.
public _body_classes ( $classes )

_init() public method

Do a several Clean Up
public _init ( )

_wp_head() public method

Print scripts or data in the head tag on the front end.
public _wp_head ( )

admin_init() public method

This action is used to avoid display the admin backend area to subscriber user
public admin_init ( )

after_setup_theme() public method

Setup theme
public after_setup_theme ( )

ajax() public method

Subclass for init Ajax gateway
public ajax ( )

autoloadEnvironment() public method

NOTE: this SPL autoloading logic is encapsulated in every single plugin instance that extends this class, because it is embedded into an instance of WPDKWordPressPlugin. So any plugin has its own SPL autoloading logic.
public autoloadEnvironment ( string $sClassName )
$sClassName string - The class that has to be loaded right now

image_size_names_choose() public method

Allows modification of the list of image sizes that are available to administrators in the WordPress Media Library.
public image_size_names_choose ( array $sizes ) : array
$sizes array Sizes list
return array

init_shortcode() public method

Subclass for inti your shortcode.
public init_shortcode ( )

init_theme() public method

Init the theme
public init_theme ( )

registerAutoloadClass() public method

The function has some facility in its first param, in order to allow both string and array loading of class names ( useful in case of a group of classes that are defined in a single file ). 1. $this->registerAutoloadClass( 'file.php', 'ClassName' ); 2. $this->registerAutoloadClass( array( 'file.php' => 'ClassName' ) ); 3. $this->registerAutoloadClass( array( 'file.php' => array( 'ClassName', 'ClassName', ... ) ) );
public registerAutoloadClass ( string | array $sLoadingPath, string $mClassName = '' )
$sLoadingPath string | array Path of class when $mClassName is a string
$mClassName string Optional. The single class name or key value pairs array with path => classes

wp_enqueue_scripts() public method

Fires when scripts and styles are enqueued.
public wp_enqueue_scripts ( )

wp_head() public method

Print scripts or data in the head tag on the front end.
public wp_head ( )

wp_print_styles() public method

Fires before styles in the $handles queue are printed.
public wp_print_styles ( )

Property Details

$__version public property

Override version
public string $__version
return string

$assetsURL public property

The Theme URL more assets/. This property is very useful for read style sheet and Javascript file in the 'assets' folder.
public string $assetsURL
return string

$classPath public property

The Filesystem theme path more classes/
public string $classPath
return string

$cssURL public property

The Theme URL more assets/css/
public string $cssURL
return string

$imagesURL public property

The Theme URL more assets/css/images/
public string $imagesURL
return string

$javascriptURL public property

The Theme URL more assets/js/
public string $javascriptURL
return string

$path public property

Filesystem theme path. Alias TEMPLATEPATH
public string $path
return string

$setup public property

Theme Setup class model
public WPDKThemeSetup $setup
return WPDKThemeSetup

$theme public property

Instance of WP_Theme class
public WP_Theme $theme
return WP_Theme