PHP Класс WPDK

This class is in singleton mode to avoid double init of action, filters and includes.
Автор: =undo= ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
admin_print_scripts ( ) Fires when scripts are printed for all admin pages.
autoloadWPDKEnvironment ( string $sClassName ) This function performs runtime autoloading of all WPDK classes, based on previous class registering executed in includes method.
init ( ) : WPDK Init the framework in singleton mode to avoid double include, action and inits.
load_plugin_textdomain ( ) Load a text domain for WPDK, like a plugin. In this relase WPDK has an own text domain. This feature could miss in future release
registerAutoloadClass ( string | array $sLoadingPath, string $mClassName = '' ) This function records a WPDK class into autoloading register, joined with its loading path. 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 ):
wp_head ( ) Print scripts or data in the head tag on the front end.
wpdk_flush_cache_third_parties_plugins ( ) Fires to flush (clear) the third parties plugins.

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

Метод Описание
__construct ( ) : WPDK Create an instance of WPDK class and init the franework
defines ( ) Include external defines
registerClasses ( ) Register all autoload classes and include all framework class files through SPL autoload logic
scriptLocalization ( ) : array Return a Key values pairs array to localize Javascript

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

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

Fires when scripts are printed for all admin pages.
public admin_print_scripts ( )

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

This function performs runtime autoloading of all WPDK classes, based on previous class registering executed in includes method.
С версии: 0.10.0
public autoloadWPDKEnvironment ( string $sClassName )
$sClassName string - The class that has to be loaded right now

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

Init the framework in singleton mode to avoid double include, action and inits.
public static init ( ) : WPDK
Результат WPDK

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

Load a text domain for WPDK, like a plugin. In this relase WPDK has an own text domain. This feature could miss in future release

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

1. $this->registerAutoloadClass( 'file.php', 'ClassName' ); 2. $this->registerAutoloadClass( array( 'file.php' => 'ClassName' ) ); 3. $this->registerAutoloadClass( array( 'file.php' => array( 'ClassName', 'ClassName', ... ) ) );
С версии: 0.10.0
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_head() публичный Метод

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

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

Fires to flush (clear) the third parties plugins.
С версии: 1.7.3