original_string: public function doAction($hook)
      {
          $hook = (string) $hook;
          if (empty($this->hooks[$hook])) {
              return; // No hooks.
          }
          $hook_actions = $this->hooks[$hook];
          $args         = func_get_args();
          ksort($hook_actions);
  
          foreach ($hook_actions as $_hook_action) {
              foreach ($_hook_action as $_action) {
                  if (!isset($_action['function'], $_action['accepted_args'])) {
                      continue; // Not a valid filter in this case.
                  }
                  call_user_func_array($_action['function'], array_slice($args, 1, $_action['accepted_args']));
              }
          }
          unset($_hook_action, $_action); // Housekeeping.
      }
code: public function doAction($hook)
      {
          $hook = (string) $hook;
          if (empty($this->hooks[$hook])) {
              return; // No hooks.
          }
          $hook_actions = $this->hooks[$hook];
          $args         = func_get_args();
          ksort($hook_actions);
  
          foreach ($hook_actions as $_hook_action) {
              foreach ($_hook_action as $_action) {
                  if (!isset($_action['function'], $_action['accepted_args'])) {
                      continue; // Not a valid filter in this case.
                  }
                  call_user_func_array($_action['function'], array_slice($args, 1, $_action['accepted_args']));
              }
          }
          unset($_hook_action, $_action); // Housekeeping.
      }
code_tokens: public function doAction ( $ hook ) { $ hook = ( string ) $ hook ; if ( empty ( $ this -> hooks [ $ hook ] ) ) { return ; // No hooks. } $ hook_actions = $ this -> hooks [ $ hook ] ; $ args = func_get_args ( ) ; ksort ( $ hook_actions ) ; foreach ( $ hook_actions as $ _hook_action ) { foreach ( $ _hook_action as $ _action ) { if ( ! isset ( $ _action [ 'function' ] , $ _action [ 'accepted_args' ] ) ) { continue ; // Not a valid filter in this case. } call_user_func_array ( $ _action [ 'function' ] , array_slice ( $ args , 1 , $ _action [ 'accepted_args' ] ) ) ; } } unset ( $ _hook_action , $ _action ) ; // Housekeeping. }
docstring: Runs any callables attached to an action.
  
  @since 150321 Adding hook API for plugins.
  
  @param string $hook The name of an action hook.
docstring_tokens: Runs any callables attached to an action .