Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Disabling plugins now works without killing the whole app. Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Dec 15, 2013
1 parent d7a9925 commit cbe74c3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion library/Zepto/Zepto.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,19 @@ public function run()
* Runs all hooks registered to the specified hook name
*
* @param string $hook
* @return boolean Returns true on successful execution of all hooks
* @return boolean Returns true on successful execution of all hooks, false if plugins are disabled
*/
public function run_hooks($hook_id, $args = array())
{
$container = $this->container;
$settings = $container['settings']['zepto'];
$hooks = $container['hooks'];

// If plugins are disabled, do not run
if ($settings['plugins_enabled'] === false) {
return false;
}

$plugins = $container['plugins'];

// Check if event name exists
Expand Down

0 comments on commit cbe74c3

Please sign in to comment.