PHP Class WPDKWordPressTheme

## Overview This class is used when the frontend is loaded. You can subclassing this class for get a lot of facilities when you have to manage the theme interactions. ### Benefits This class prepare for us some useful and common action/filter hook.
Author: =undo= ([email protected])
Inheritance: extends WPDKObject
Show file Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$__version string Override version
$plugin WPDKWordPressPlugin Your main plugin instance

Public Methods

Method Description
__construct ( WPDKWordPressPlugin $plugin = null ) : WPDKWordPressTheme Create a WPDKWordPressTheme object instance
_body_class ( array $classes ) : array Called when WordPress makes the class attribute of body tag
after_setup_theme ( ) Called by after_setup_theme action
template_include ( string $template ) : string Called by template_include filter. This filter is useful to change the defaul theme filename.
template_redirect ( ) Called by template_redirect action. This action is called before the frontend theme is displayed.
wp ( ) Called by wp action
wp_enqueue_scripts ( ) Called by wp_enqueue_scripts action. You will use this action to register (do a queue) scripts and styles.
wp_footer ( ) Called by wp_footer action. This action is called in the footer theme.
wp_head ( ) Called by wp_head action. This action is called after the head section and before the body tag.

Method Details

__construct() public method

Create a WPDKWordPressTheme object instance
public __construct ( WPDKWordPressPlugin $plugin = null ) : WPDKWordPressTheme
$plugin WPDKWordPressPlugin Optional. Your main plugin instance
return WPDKWordPressTheme

_body_class() public method

Called when WordPress makes the class attribute of body tag
public _body_class ( array $classes ) : array
$classes array List of classes
return array New list class

after_setup_theme() public method

Called by after_setup_theme action
public after_setup_theme ( )

template_include() public method

Called by template_include filter. This filter is useful to change the defaul theme filename.
public template_include ( string $template ) : string
$template string The URL of template
return string A new URl template

template_redirect() public method

Called by template_redirect action. This action is called before the frontend theme is displayed.
public template_redirect ( )

wp() public method

Called by wp action
public wp ( )

wp_enqueue_scripts() public method

Called by wp_enqueue_scripts action. You will use this action to register (do a queue) scripts and styles.
public wp_enqueue_scripts ( )

wp_head() public method

Called by wp_head action. This action is called after the head section and before the body tag.
public wp_head ( )

Property Details

$__version public property

Override version
public string $__version
return string

$plugin public property

Your main plugin instance
public WPDKWordPressPlugin $plugin
return WPDKWordPressPlugin