src/engines/class-twig-engine.php
public function register_extensions() {
		$extensions = func_get_args();

		foreach ( $extensions as $extension ) {
			if ( $extension instanceof Twig_ExtensionInterface ) {
				$this->add_extension( $extension );
			} else if ( is_string( $extension ) && class_exists( $extension ) ) {
				$this->add_extension( new $extension );
			} else {
				foreach ( (array) $extension as $ext ) {
					$this->register_extensions( $ext );
				}
			}
		}
	}
public function register_extensions() {
		$extensions = func_get_args();

		foreach ( $extensions as $extension ) {
			if ( $extension instanceof Twig_ExtensionInterface ) {
				$this->add_extension( $extension );
			} else if ( is_string( $extension ) && class_exists( $extension ) ) {
				$this->add_extension( new $extension );
			} else {
				foreach ( (array) $extension as $ext ) {
					$this->register_extensions( $ext );
				}
			}
		}
	}
public function register_extensions ( ) { $ extensions = func_get_args ( ) ; foreach ( $ extensions as $ extension ) { if ( $ extension instanceof Twig_ExtensionInterface ) { $ this -> add_extension ( $ extension ) ; } else if ( is_string ( $ extension ) && class_exists ( $ extension ) ) { $ this -> add_extension ( new $ extension ) ; } else { foreach ( ( array ) $ extension as $ ext ) { $ this -> register_extensions ( $ ext ) ; } } } }
Register Twig extensions that use `Twig_ExtensionInterface`.
Register Twig extensions that use Twig_ExtensionInterface .