Method |
Description |
|
__callStatic ( string $method, array $args ) : mixed |
|
|
_after_setup_theme ( ) |
Now load the theme's modules. |
|
_after_setup_theme_11 ( ) |
Determine and then load the "mustload" classes
They are the classes with an on_load() method. |
|
_autoloader ( string $class_name ) |
|
|
_call_helper ( string $helped_class, string $helper_method, array $args, object $container = null ) : mixed | null |
Delegate calls to other classes. |
|
_ensure_only_one_class ( $class_container ) |
Scans to ensure that only one PHP class is declared. |
|
_find_files_autoloader ( $class_name ) |
Special autoloader to run only for conflicts. |
|
_get_raw_meta_fieldname ( string $meta_name ) : string |
Returns the raw meta fieldname given a non-prefixed field name. |
|
_init_9 ( ) : array |
Autoload all WPLib module classes to ensure they are available for 'init' hook. |
|
_plugins_loaded_11 ( ) |
Load all necessary files. This finds autoloading files and loads modules. |
|
_register_templates ( ) : array |
Register all templates for WPLib, an App or a module. |
|
_set_mustload_classes ( array $autoload_files ) |
This will get called 4 times. |
|
_shutdown ( ) |
Throw error if site failed to load because of a module failing to load. |
|
_xmlrpc_call ( ) |
Capture status of DOING_XMLRPC |
|
add_class_action ( string $action, integer $priority = 10 ) |
|
|
add_class_filter ( string $filter, integer $priority = 10 ) |
|
|
app_class ( ) : string | null |
Returns the one app class defined. |
|
app_classes ( ) : array | null |
|
|
assets_url ( ) : string |
Return the simple asset path |
|
autoload_all_classes ( ) |
Force loading of all classes if needed to find all classes with a specific constant. |
|
cache_delete ( string $key, string $group = '' ) |
|
|
cache_exists ( string $key, string $group = '' ) : boolean |
|
|
cache_get ( string $key, string $group = '' ) : mixed |
|
|
cache_set ( string $key, mixed $value, string $group = '', integer $expire ) |
|
|
can_call ( string $method_name, string | boolean $class_name = false ) : boolean |
Determines if a named method exists and is_callable a given class. |
|
class_declares_method ( string $class_name, string $method_name ) : boolean |
Determines is a class actually declares a method instead of just inheriting it. |
|
component_classes ( string $scope = 'all' ) : array |
Returns the list of "Component" classes. A Component is one of Lib, Site, App, Theme, Module. |
|
current_helped_class ( ) : array |
Returns the class that is currently being "helped." |
|
dashify ( string $string, boolean | true $lowercase = true ) : string |
|
|
do_log_errors ( ) : boolean |
|
|
do_the_methods ( string | object $view, string | object $model, string $method_name, array $args ) : mixed |
Do "the_" Methods - Allow classes to delegate the "the_" logic processing here. |
|
doing_ajax ( ) : boolean |
|
|
doing_autosave ( ) : boolean |
|
|
doing_cron ( ) : boolean |
|
|
doing_xmlrpc ( ) : boolean |
|
|
emit_headers ( string | array $headers ) |
Emits one or more HTTP headers to the output stream |
|
file_hash ( string $filepath ) : string |
Returns a file hash, but caches it in persistent cache |
|
get_asset_url ( string $asset_path, boolean | string $class_name = false ) : string |
Return the asset path |
|
get_callable ( string | object $object, string $method_name ) : callable | null |
Given an object/class name and method name return a callable or null if can't be called. |
|
get_child_classes ( $base_class, $constant_name ) : string[] |
Returns array of class names $base_class children with positive values for $base_class::$contant_name. |
|
get_constant ( string $constant_name, string | boolean | object $class_name = false, boolean $try_parent = true ) : mixed | null |
Return a class constant for the called class. |
|
get_contents ( string $filepath ) : boolean |
|
|
get_module_class ( string $module_name, string | boolean $app_class = false ) : string |
|
|
get_module_classes ( string $app_class ) : string[] |
|
|
get_module_dir ( WPLib_Item_Base | string | boolean $item_class = false ) : string | null |
|
|
get_module_name ( string $class_name ) : mixed | null |
|
|
get_real_url ( string $url ) : string |
Like realpath() but for URLs |
|
get_root_dir ( string $filepath, boolean | string $class_name = false ) : string |
Return the root directory of the Lib/App/Site/Module/Theme class for a given class name. |
|
get_root_url ( string $filepath, boolean | string $class_name = false ) : string |
Get the root URL for a given Lib/Site/App/Module/Theme. |
|
get_template ( string $template_slug, array | string $_template_vars = [], WPLib_Item_Base | object $item = null ) : string |
|
|
get_template_dir ( string $template ) : string |
Return the template filepath for the passed $template for the called class. |
|
get_theme_file ( string $local_file ) : string |
Returns the filepath for a theme template file given its "local filename." |
|
has_html_suffix ( string | false $suffix ) : boolean |
|
|
initialize ( ) |
If used in a theme you have to first initialize it before WPLib_Theme_Base
classes will be available to extend. |
|
invoke_with_args ( callable $invokable, array $args ) : mixed |
|
|
is_development ( ) : boolean |
|
|
is_found ( string $filepath ) : boolean |
|
|
is_production ( ) : boolean |
|
|
is_script_debug ( ) : string |
If runmode is development or SCRIPT_DEBUG |
|
is_staging ( ) : boolean |
|
|
is_testing ( ) : boolean |
|
|
is_wp_debug ( ) : boolean |
|
|
make_new_item ( WPLib_Item_Base | WP_Post | WP_Term $item, array $args = [] ) : WPLib_Term_Base | WPLib_Post_Base |
|
|
maybe_make_absolute_path ( string $filepath, boolean | string $dir = false ) : string |
Convert relative file paths to absolute file paths. |
|
maybe_make_abspath_relative ( string $filepath ) : string |
Takes a filepath and potentially returns a relative path (prefixed with '~/'), if $filepath begins with ABSPATH. |
|
module_classes ( ) : string[] |
|
|
new_post_url ( ) : string |
|
|
on_load ( ) |
|
|
put_contents ( string $filepath, string $contents ) : boolean |
Runs file_put_contents() |
|
register_helper ( string $helper_class, string | boolean $helped_class = false ) |
Register a helper class to the specified class. |
|
register_module ( string $module, integer $priority = 10 ) |
|
|
register_template ( string $template, string | boolean $called_class = false ) |
Register a template |
|
remove_class_action ( string $action, integer $priority = 10 ) |
|
|
remove_class_filter ( string $filter, integer $priority = 10 ) |
|
|
root_dir ( ) : string |
Return the root directory of the Lib/App/Site/Module/Theme class. |
|
root_url ( ) : string |
Return the root URL of the Lib/App/Site/Module/Theme class. |
|
runmode ( ) : WPLib_Runmode |
|
|
set_runmode ( integer | WPLib_Runmode $runmode ) |
|
|
set_stability ( integer | WPLib_Stability $stability ) |
|
|
set_theme ( WPLib_Theme_Base $theme ) |
|
|
short_prefix ( ) : boolean | string |
|
|
site_classes ( ) : array |
Return the list of classes declared after WPLib first loads. |
|
stability ( ) : WPLib_Stability |
|
|
template_dir ( ) : string |
Return the templates directory path for the called class. |
|
templates_subdir ( ) : string |
Return the subdir name for templates. |
|
the_asset_url ( string $asset_path, boolean | string $class_name = false ) : string |
Echo the asset path |
|
the_template ( string $template_slug, array | string $_template_vars = [], WPLib_Item_Base | object $item = null ) |
|
|
theme ( ) : WPLib_Theme_Base |
|
|
trigger_error ( string $error_msg, integer $error_type = E_USER_NOTICE, boolean $echo = false ) |
Triggers error message unless doing AJAX, XMLRPC or Cron; then it logs the error but only if Development mode. |
|
use_template_global_vars ( ) : boolean |
Return if WPLIB_TEMPLATE_GLOBAL_VARS was set to true |
|