PHP Класс WPDKUIComponents

You can override this class for register and manage your own components
Автор: =undo= ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
components ( ) : array List of registered WPDK components

Описание методов

__construct() публичный Метод

Create an instance of WPDKUIComponents class
public __construct ( ) : WPDKUIComponents
Результат WPDKUIComponents

enqueue() публичный Метод

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 );
С версии: 1.5.0
public enqueue ( string | array $component_handles )
$component_handles string | array One or more Component handle

init() публичный статический Метод

Return a singleton instance of WPDKUIComponents class
public static init ( ) : WPDKUIComponents
Результат WPDKUIComponents

load_scripts() публичный Метод

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

load_styles() публичный Метод

Fires in for all admin pages.
public load_styles ( )

Описание свойств

$components публичное свойство

List of components
С версии: 1.6.0
public array $components
Результат array

$enqueue_scripts публичное свойство

List of scripts handle to load and concat with new WPDK wpdk-load-scripts-php
public array $enqueue_scripts
Результат array

$enqueue_styles публичное свойство

List of styles handle to load and concat with new WPDK wpdk-load-styles-php
public array $enqueue_styles
Результат array