PHP Class WPDK

This class is in singleton mode to avoid double init of action, filters and includes.
Author: =undo= ([email protected])
Mostrar archivo Open project: wpxtreme/wpdk Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
__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

Method Details

admin_print_scripts() public method

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

autoloadWPDKEnvironment() public method

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

init() public static method

Init the framework in singleton mode to avoid double include, action and inits.
public static init ( ) : WPDK
return WPDK

load_plugin_textdomain() public method

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() public method

1. $this->registerAutoloadClass( 'file.php', 'ClassName' ); 2. $this->registerAutoloadClass( array( 'file.php' => 'ClassName' ) ); 3. $this->registerAutoloadClass( array( 'file.php' => array( 'ClassName', 'ClassName', ... ) ) );
Since: 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() public method

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

wpdk_flush_cache_third_parties_plugins() public method

Fires to flush (clear) the third parties plugins.
Since: 1.7.3