public static function undefined_function( $function_name ) {

		if ( \function_exists( $function_name ) ) {
			return new \Twig_Function(
				$function_name,
				function () use ( $function_name ) {

					ob_start();
					$return = \call_user_func_array( $function_name, \func_get_args() );
					$echo   = ob_get_clean();

					return empty( $echo ) ? $return : $echo;
				},
				array( 'is_safe' => array( 'all' ) )
			);
		}

		return false;
	}
public static function undefined_function( $function_name ) {

		if ( \function_exists( $function_name ) ) {
			return new \Twig_Function(
				$function_name,
				function () use ( $function_name ) {

					ob_start();
					$return = \call_user_func_array( $function_name, \func_get_args() );
					$echo   = ob_get_clean();

					return empty( $echo ) ? $return : $echo;
				},
				array( 'is_safe' => array( 'all' ) )
			);
		}

		return false;
	}
public static function undefined_function ( $ function_name ) { if ( \ function_exists ( $ function_name ) ) { return new \ Twig_Function ( $ function_name , function ( ) use ( $ function_name ) { ob_start ( ) ; $ return = \ call_user_func_array ( $ function_name , \ func_get_args ( ) ) ; $ echo = ob_get_clean ( ) ; return empty ( $ echo ) ? $ return : $ echo ; } , array ( 'is_safe' => array ( 'all' ) ) ) ; } return false ; }
Handler for undefined functions in Twig to pass them through to PHP and buffer echoing versions.

@param string $function_name Name of the function to handle.

@return bool|\Twig_Function
Handler for undefined functions in Twig to pass them through to PHP and buffer echoing versions .