for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* ScriptHandler Class.
*
* @package BrightNucleus\Dependency
* @author Alain Schlesser <[email protected]>
* @license GPL-2.0+
* @link http://www.brightnucleus.com/
* @copyright 2015 Alain Schlesser, Bright Nucleus
*/
namespace BrightNucleus\Dependency;
* ScriptHandler class.
* @since 0.1.0
class ScriptHandler extends AbstractDependencyHandler {
* Get the name of the function that is used for registering the dependency.
* @return string Function name.
protected function get_register_function() {
return 'wp_register_script';
}
* Get the name of the function that is used for enqueueing the dependency.
protected function get_enqueue_function() {
return 'wp_enqueue_script';
* Check whether a specific handle has been registered.
* @since 0.2.3
* @param string $handle The handle to check
* @return bool Whether it is registered or not.
protected function is_registered( $handle ) {
return \wp_script_is( $handle );