PHP Class WPLib_Theme, wplib

Provide support for WordPress themes
Inheritance: extends WPLib_Module_Base
Show file Open project: wplib/wplib Class Usage Examples

Public Methods

Method Description
_body_class ( array $classes ) : array Adds any classes passed to $theme->set_body_class() to the classes that will be displayed in
_template_include_999 ( $template ) : null Hijack template_include so that we can ensure a $theme variable is defined.
_wp_enqueue_scripts_0 ( ) Creates a JS variable WPLib.ajaxurl
on_load ( ) Sets hooks required by all themes.
set_mock_theme ( $theme ) : mixed Theme method for setting a theme instance for unit test mocking.

Method Details

_body_class() static public method

..">
static public _body_class ( array $classes ) : array
$classes array
return array

_template_include_999() static public method

Hijack template_include so that we can ensure a $theme variable is defined.
static public _template_include_999 ( $template ) : null
return null

_wp_enqueue_scripts_0() static public method

Priority 0 ONLY so that this static function does not conflict with the instance method in child classes
static public _wp_enqueue_scripts_0 ( )

on_load() static public method

Sets hooks required by all themes.
static public on_load ( )

set_mock_theme() static public method

Theme method for setting a theme instance for unit test mocking.
static public set_mock_theme ( $theme ) : mixed
$theme
return mixed