evolve_hook_comments

Evolve_hook_comments() short description.

Description

evolve_hook_comments( (array) $callback = array() ); 

Long description.

Parameters (1)

0. $callback — Optional. (array) => array()
The callback.

Usage

  1. if ( !function_exists( 'evolve_hook_comments' ) ) { 
  2. require_once '/library/functions/hooks.php'; 
  3.  
  4. // The callback. 
  5. $callback = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = evolve_hook_comments($callback); 
  9.  

Defined (1)

The function is defined in the following location(s).

/library/functions/hooks.php  
  1. function evolve_hook_comments($callback = array('evolve_comment_author', 'evolve_comment_meta', 'evolve_comment_moderation', 'evolve_comment_text', 'evolve_comment_reply')) { 
  2. do_action('evolve_hook_comments_open'); // Available action: evolve_comment_open 
  3. do_action('evolve_hook_comments'); 
  4.  
  5. $callback = apply_filters('evolve_comments_callback', $callback); // Available filter: evolve_comments_callback 
  6. // If $callback is an array, loop through all callbacks and call those functions if they exist 
  7. if (is_array($callback)) { 
  8. foreach ($callback as $function) { 
  9. if (function_exists($function)) { 
  10. call_user_func($function); 
  11.  
  12. // If $callback is a string, just call that function if it exist 
  13. elseif (is_string($callback)) { 
  14. if (function_exists($callback)) { 
  15. call_user_func($callback); 
  16. do_action('evolve_hook_comments_close'); // Available action: evolve_comment_close