/**
  * Retrive the functions hooked on to the "woo_homepage" hook.
  * @access  private
  * @since   2.0.0
  * @return  array An array of the functions, grouped by function name, with a formatted title.
  */
 private function _get_hooked_functions()
 {
     global $wp_filter;
     $response = array();
     if (isset($wp_filter[Homepage_Control()->hook]) && 0 < count($wp_filter[Homepage_Control()->hook])) {
         foreach ($wp_filter[Homepage_Control()->hook] as $k => $v) {
             if (is_array($v)) {
                 foreach ($v as $i => $j) {
                     if (is_array($j['function'])) {
                         $i = get_class($j['function'][0]) . '@' . $j['function'][1];
                         $response[$i] = $this->_maybe_format_title($j['function'][1]);
                     } else {
                         $response[$i] = $this->_maybe_format_title($i);
                     }
                 }
             }
         }
     }
     return $response;
 }
示例#2
0
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Returns the main instance of Homepage_Control to prevent the need to use globals.
 *
 * @since  1.0.0
 * @return object Homepage_Control
 */
function Homepage_Control()
{
    return Homepage_Control::instance();
}
// End Homepage_Control()
Homepage_Control();
/**
 * Main Homepage_Control Class
 *
 * @class Homepage_Control
 * @version	1.0.0
 * @since 1.0.0
 * @package	Kudos
 * @author Matty
 */
final class Homepage_Control
{
    /**
     * Homepage_Control The single instance of Homepage_Control.
     * @var 	object
     * @access  private