function_wrapper() public static method

public static function_wrapper ( mixed $function_name, $defaults = [], $return_output_buffer = false ) : FunctionWrapper | mixed
$function_name mixed or array( $class( string|object ), $function_name )
return FunctionWrapper | mixed
Beispiel #1
0
 /**
  * Add functions to Timber context
  *
  * @param   array   $context    Timber context
  * @return  array   $context    Adapted Timber context
  */
 public function filter_timber_context($context)
 {
     Timber\Helper::function_wrapper('get_timber_image_responsive_acf');
     return $context;
 }
Beispiel #2
0
 /**
  * Executed for all types of sites: both multisite and "regular"
  * @internal
  */
 protected function init()
 {
     $this->rdf = get_bloginfo('rdf_url');
     $this->rss = get_bloginfo('rss_url');
     $this->rss2 = get_bloginfo('rss2_url');
     $this->atom = get_bloginfo('atom_url');
     $this->language = get_bloginfo('language');
     $this->charset = get_bloginfo('charset');
     $this->pingback = $this->pingback_url = get_bloginfo('pingback_url');
     $this->language_attributes = Helper::function_wrapper('language_attributes');
 }
Beispiel #3
0
 /**
  * Get widgets.
  * @api
  * @param int     $widget_id
  * @return TimberFunctionWrapper
  */
 public static function get_widgets($widget_id)
 {
     return trim(Helper::function_wrapper('dynamic_sidebar', array($widget_id), true));
 }