/** * Redux Framework API Class * Makes instantiating a Redux object an absolute piece of cake. * * @package Redux_Framework * @author Dovy Paukstys * @subpackage Core */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } // Don't duplicate me! if ( ! class_exists( 'Redux' ) ) { /** * Redux API Class * Simple API for Redux Framework * * @since 1.0.0 */ class Redux { public static $fields = array(); public static $sections = array(); public static $help = array(); public static $args = array(); public static $priority = array(); public static $errors = array(); public static $init = array(); public static $extensions = array(); public static $uses_extensions = array(); public function __call( $closure, $args ) { return call_user_func_array( $this->{$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 ); //if (isset($ReduxFramework->extensions[ $name ]->min_redux_version)) { //var_dump($ReduxFramework->extensions[ $name ]->min_redux_version); //} } else { echo '
No class named ' . $extension['class'] . ' exists. Please verify your extension path.
Redux Framework is not installed. Please install it.
Apa yang ingin Anda lakukan?
« kembali ke Beranda atau gunakan kotak pencarian dibawah ini untuk mulai penelusuran.