{$closure}->bindTo( $this ), $args ); } public function __toString() { return call_user_func( $this->{"__toString"}->bindTo( $this ) ); } public static function load() { add_action( 'after_setup_theme', array( 'Redux', 'createRedux' ) ); add_action( 'init', array( 'Redux', 'createRedux' ) ); add_action( 'switch_theme', array( 'Redux', 'createRedux' ) ); } public static function init( $opt_name = "" ) { if ( ! empty( $opt_name ) ) { self::loadRedux( $opt_name ); remove_action( 'setup_theme', array( 'Redux', 'createRedux' ) ); } } public static function loadExtensions( $ReduxFramework ) { if ( $instanceExtensions = self::getExtensions( $ReduxFramework->args['opt_name'], "" ) ) { foreach ( $instanceExtensions as $name => $extension ) { if ( ! class_exists( $extension['class'] ) ) { // In case you wanted override your override, hah. $extension['path'] = apply_filters( 'redux/extension/' . $ReduxFramework->args['opt_name'] . '/' . $name, $extension['path'] ); if ( file_exists( $extension['path'] ) ) { require_once $extension['path']; } } if ( ! isset( $ReduxFramework->extensions[ $name ] ) ) { if ( class_exists( $extension['class'] ) ) { $ReduxFramework->extensions[ $name ] = new $extension['class']( $ReduxFramework ); } else { echo '
No class named ' . $extension['class'] . ' exists. Please verify your extension path.
Redux Framework is not installed. Please install it.