PHP Class WPDKUIComponents

You can override this class for register and manage your own components
Author: =undo= ([email protected])
Show file Open project: wpxtreme/wpdk Class Usage Examples

Public Properties

Property Type Description
$components array List of components
$enqueue_scripts array List of scripts handle to load and concat with new WPDK wpdk-load-scripts-php
$enqueue_styles array List of styles handle to load and concat with new WPDK wpdk-load-styles-php

Public Methods

Method Description
__construct ( ) : WPDKUIComponents Create an instance of WPDKUIComponents class
enqueue ( string | array $component_handles ) Perform an enqueue of scripts and styles of a one or more components
init ( ) : WPDKUIComponents Return a singleton instance of WPDKUIComponents class
load_scripts ( boolean $print ) Filter whether to print the footer scripts.
load_styles ( ) Fires in for all admin pages.

Private Methods

Method Description
components ( ) : array List of registered WPDK components

Method Details

__construct() public method

Create an instance of WPDKUIComponents class
public __construct ( ) : WPDKUIComponents
return WPDKUIComponents

enqueue() public method

Load a single components WPDKUIComponents::init()->enqueue( WPDKUIComponents::TOOLTIP ); Load one or more components WPDKUIComponents::init()->enqueue( array( WPDKUIComponents::MODAL, WPDKUIComponents::TOOLTIP ) ); Or... like kind of magic WPDKUIComponents::init()->enqueue( WPDKUIComponents::MODAL, WPDKUIComponents::TOOLTIP );
Since: 1.5.0
public enqueue ( string | array $component_handles )
$component_handles string | array One or more Component handle

init() public static method

Return a singleton instance of WPDKUIComponents class
public static init ( ) : WPDKUIComponents
return WPDKUIComponents

load_scripts() public method

Filter whether to print the footer scripts.
public load_scripts ( boolean $print )
$print boolean Whether to print the footer scripts. Default true.

load_styles() public method

Fires in for all admin pages.
public load_styles ( )

Property Details

$components public property

List of components
Since: 1.6.0
public array $components
return array

$enqueue_scripts public property

List of scripts handle to load and concat with new WPDK wpdk-load-scripts-php
public array $enqueue_scripts
return array

$enqueue_styles public property

List of styles handle to load and concat with new WPDK wpdk-load-styles-php
public array $enqueue_styles
return array