. * * @package Redux Framework * @subpackage Repeater * @subpackage Wordpress * @author Dovy Paukstys (dovy) * @author Kevin Provance (kprovance) * @version 1.0.4 */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } // Don't duplicate me! if ( ! class_exists( 'ReduxFramework_extension_repeater' ) ) { /** * Main ReduxFramework css_layout extension class * * @since 1.0.0 */ class ReduxFramework_extension_repeater { public static $version = '1.0.4'; // Protected vars protected $parent; public $extension_url; public $extension_dir; public static $theInstance; public $field_id = ''; private $class_css = ''; /** * Class Constructor. Defines the args for the extions class * * @since 1.0.0 * @access public * * @param array $parent Parent settings. * * @return void */ public function __construct( $parent ) { $redux_ver = ReduxFramework::$_version; // Set parent object $this->parent = $parent; // Set extension dir $ext_dir = get_template_directory().'/inc/redux-ext/repeater'; if ( empty( $this->extension_dir ) ) { $this->extension_dir = trailingslashit( str_replace( '\\', '/', $ext_dir ) ); } // Set field name $this->field_name = 'repeater'; // Set instance self::$theInstance = $this; // Adds the local field add_filter( 'redux/' . $this->parent->args['opt_name'] . '/field/class/' . $this->field_name, array( &$this, 'overload_field_path' ) ); } static public function getInstance() { return self::$theInstance; } // Forces the use of the embeded field path vs what the core typically would use public function overload_field_path( $field ) { $ext_dir = get_template_directory().'/inc/redux-ext/repeater'; return $ext_dir . '/' . $this->field_name . '/field_' . $this->field_name . '.php'; } } // class } // if