Beispiel #1
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 3.0.0
  */
 function enqueue()
 {
     redux_enqueue_style($this->parent, 'redux-field-text-css', ReduxFramework::$_url . 'inc/fields/text/field_text.css', ReduxFramework::$_dir . 'inc/fields/text', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-text-css',
     //                    ReduxFramework::$_url . 'inc/fields/text/field_text.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #2
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 0.0.4
  */
 function enqueue()
 {
     wp_enqueue_script('redux-field-switch-js', ReduxFramework::$_url . 'inc/fields/switch/field_switch' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-switch-css', ReduxFramework::$_url . 'inc/fields/switch/field_switch.css', ReduxFramework::$_dir . 'inc/fields/switch', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-switch-css',
     //                    ReduxFramework::$_url . 'inc/fields/switch/field_switch.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #3
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since         1.0.0
  * @access        public
  * @return        void
  */
 public function enqueue()
 {
     //                wp_enqueue_style(
     //                    'redux-field-date-css',
     //                    ReduxFramework::$_url . 'inc/fields/date/field_date.css',
     //                    time(),
     //                    true
     //                );
     redux_enqueue_style($this->parent, 'redux-field-date-css', ReduxFramework::$_url . 'inc/fields/date/field_date.css', ReduxFramework::$_dir . 'inc/fields/date', array(), time(), false);
     wp_enqueue_script('redux-field-date-js', ReduxFramework::$_url . 'inc/fields/date/field_date' . Redux_Functions::isMin() . '.js', array('jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'redux-js'), time(), true);
 }
Beispiel #4
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     wp_enqueue_script('redux-field-multi-text-js', ReduxFramework::$_url . 'inc/fields/multi_text/field_multi_text' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-multi-text-css', ReduxFramework::$_url . 'inc/fields/multi_text/field_multi_text.css', ReduxFramework::$_dir . 'inc/fields/multi_text', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-multi-text-css',
     //                    ReduxFramework::$_url . 'inc/fields/multi_text/field_multi_text.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #5
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     redux_enqueue_style($this->parent, 'redux-field-editor-css', ReduxFramework::$_url . 'inc/fields/editor/field_editor.css', ReduxFramework::$_dir . 'inc/fields/editor', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-editor-css',
     //                    ReduxFramework::$_url . 'inc/fields/editor/field_editor.css',
     //                    time(),
     //                    true
     //                );
     wp_enqueue_script('redux-field-editor2-js', ReduxFramework::$_url . 'inc/fields/editor/field_editor' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
 }
Beispiel #6
0
 /**
  * Enqueue Function.
  *
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     // Set up min files for dev_mode = false.
     $min = Redux_Functions::isMin();
     // Spectrum colour picker
     wp_enqueue_script('redux-spectrum-js', ReduxFramework::$_url . 'assets/js/vendor/spectrum/redux-spectrum' . $min . '.js', array('jquery'), time(), true);
     // Spectrum CSS
     wp_enqueue_style('redux-spectrum-css', ReduxFramework::$_url . 'assets/css/vendor/spectrum/redux-spectrum.css', array(), time(), 'all');
     // Field dependent JS
     wp_enqueue_script('redux-field-color-rgba-js', ReduxFramework::$_url . 'inc/fields/color_rgba/field_color_rgba' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-spectrum-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-color-rgba-css', ReduxFramework::$_url . 'inc/fields/color_rgba/field_color_rgba.css', ReduxFramework::$_dir . 'inc/fields/color_rgba', array(), time(), false);
 }
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     $min = Redux_Functions::isMin();
     wp_enqueue_script('redux-blockUI', $this->extension_url . '/jquery.blockUI' . $min . '.js', array('jquery'), time(), true);
     wp_enqueue_script('redux-field-custom_fonts-js', $this->extension_url . '/field_custom_fonts' . $min . '.js', array('jquery', 'redux-blockUI'), time(), true);
     if (function_exists('redux_enqueue_style')) {
         redux_enqueue_style($this->parent, 'redux-field-custom_fonts-css', $this->extension_url . 'field_custom_fonts.css', $this->extension_dir, array(), time());
     } else {
         wp_enqueue_style('redux-field-custom_fonts-css', $this->extension_url . 'field_custom_fonts.css', time(), true);
     }
     $class = ReduxFramework_extension_custom_fonts::get_instance();
     if (!empty($class->custom_fonts)) {
         wp_enqueue_style('redux-custom_fonts-css', $class->upload_url . "fonts.css", time(), true);
     }
 }
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     wp_enqueue_script('redux-field-media-js', ReduxFramework::$_url . 'assets/js/media/media' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-media-css', ReduxFramework::$_url . 'inc/fields/media/field_media.css', ReduxFramework::$_dir . 'inc/fields/media', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-media-css',
     //                    ReduxFramework::$_url . 'inc/fields/media/field_media.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #9
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     wp_enqueue_script('redux-field-background-js', ReduxFramework::$_url . 'inc/fields/background/field_background' . Redux_Functions::isMin() . '.js', array('jquery', 'wp-color-picker', 'select2-js', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-background-css', ReduxFramework::$_url . 'inc/fields/background/field_background.css', ReduxFramework::$_dir . 'inc/fields/background', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-background-css',
     //                    ReduxFramework::$_url . 'inc/fields/background/field_background.css',
     //                    time(),
     //                    true
     //                );
 }
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     wp_enqueue_script('redux-field-link-color-js', ReduxFramework::$_url . 'inc/fields/link_color/field_link_color' . Redux_Functions::isMin() . '.js', array('jquery', 'wp-color-picker', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-link_color-css', ReduxFramework::$_url . 'inc/fields/link_color/field_link_color.css', ReduxFramework::$_dir . 'inc/fields/link_color', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-link_color-js',
     //                    ReduxFramework::$_url . 'inc/fields/link_color/field_link_color.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #11
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 1.0.0
  */
 function enqueue()
 {
     wp_enqueue_script('redux-field-typography-js', ReduxFramework::$_url . 'inc/fields/typography/field_typography' . Redux_Functions::isMin() . '.js', array('jquery', 'wp-color-picker', 'select2-js', 'redux-js'), time(), true);
     wp_localize_script('redux-field-typography-js', 'redux_ajax_script', array('ajaxurl' => admin_url('admin-ajax.php')));
     redux_enqueue_style($this->parent, 'redux-field-typography-css', ReduxFramework::$_url . 'inc/fields/typography/field_typography.css', ReduxFramework::$_dir . 'inc/fields/typography', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-typography-css',
     //                    ReduxFramework::$_url . 'inc/fields/typography/field_typography.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #12
0
 public function enqueue()
 {
     redux_enqueue_style($this->parent, 'redux-field-section-css', ReduxFramework::$_url . 'inc/fields/section/field_section.css', ReduxFramework::$_dir . 'inc/fields/section', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-section-css',
     //                    ReduxFramework::$_url . 'inc/fields/section/field_section.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #13
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     redux_enqueue_style($this->parent, 'redux-field-checkbox-css', ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox.css', ReduxFramework::$_dir . 'inc/fields/checkbox', array(), time(), false);
     //            wp_enqueue_style (
     //                    'redux-field-checkbox-css', ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox.css', time (), true
     //            );
     wp_enqueue_script('redux-field-checkbox-js', ReduxFramework::$_url . 'inc/fields/checkbox/field_checkbox' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
 }
Beispiel #14
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 3.1.8
  */
 function enqueue()
 {
     $min = Redux_Functions::isMin();
     wp_enqueue_style('redux-nouislider-css', ReduxFramework::$_url . 'inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.css', array(), filemtime(ReduxFramework::$_dir . 'inc/fields/slider/vendor/nouislider/redux.jquery.nouislider.css'), 'all');
     wp_register_script('redux-nouislider-js', ReduxFramework::$_url . 'inc/fields/slider/vendor/nouislider/redux.jquery.nouislider' . $min . '.js', array('jquery'), '5.0.0', true);
     wp_enqueue_script('redux-field-slider-js', ReduxFramework::$_url . 'inc/fields/slider/field_slider' . $min . '.js', array('jquery', 'redux-nouislider-js', 'redux-js', 'select2-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-slider-css', ReduxFramework::$_url . 'inc/fields/slider/field_slider.css', ReduxFramework::$_dir . 'inc/fields/slider', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-slider-css',
     //                    ReduxFramework::$_url . 'inc/fields/slider/field_slider.css',
     //                    time(),
     //                    true
     //                );
 }
 /**
  * Enqueue CSS/JS for options page
  *
  * @since       1.0.0
  * @access      public
  * @global      $wp_styles
  * @return      void
  */
 public function _enqueue()
 {
     global $wp_styles;
     Redux_Functions::$_parent = $this;
     $min = Redux_Functions::isMin();
     // Select2 business.  Fields:  Background, Border, Dimensions, Select, Slider, Typography
     $field_arr = array('background', 'border', 'dimensions', 'select', 'select_image', 'slider', 'spacing', 'typography', 'color_scheme', 'css_layout');
     if (Redux_Helpers::isFieldInUseByType($this->fields, $field_arr)) {
         // select2 CSS
         wp_register_style('select2-css', self::$_url . 'assets/js/vendor/select2/select2.css', array(), filemtime(self::$_dir . 'assets/js/vendor/select2/select2.css'), 'all');
         wp_enqueue_style('select2-css');
         // JS
         wp_register_script('redux-select2-sortable-js', self::$_url . 'assets/js/vendor/redux.select2.sortable' . $min . '.js', array('jquery'), filemtime(self::$_dir . 'assets/js/vendor/redux.select2.sortable' . $min . '.js'), true);
         wp_register_script('select2-js', self::$_url . 'assets/js/vendor/select2/select2.min.js', array('jquery', 'redux-select2-sortable-js'), filemtime(self::$_dir . 'assets/js/vendor/select2/select2.min.js'), true);
         wp_enqueue_script('select2-js');
     }
     redux_enqueue_style($this, 'redux-admin-css', self::$_url . 'assets/css/redux-admin.css', self::$_dir . 'assets/css/', array('farbtastic'), time(), 'all');
     //                wp_enqueue_style(
     //                    'redux-css',
     //                    self::$_url . 'assets/css/redux.css',
     //                    array( 'farbtastic' ),
     //                    filemtime( self::$_dir . 'assets/css/redux.css' ),
     //                    'all'
     //                );
     //
     //                wp_register_style(
     //                    'admin-css',
     //                    self::$_url . 'assets/css/admin.css',
     //                    array( 'farbtastic' ),
     //                    filemtime( self::$_dir . 'assets/css/admin.css' ),
     //                    'all'
     //                );
     wp_register_style('redux-elusive-icon', self::$_url . 'assets/css/vendor/elusive-icons/elusive-webfont.css', array(), filemtime(self::$_dir . 'assets/css/vendor/elusive-icons/elusive-webfont.css'), 'all');
     wp_register_style('redux-elusive-icon-ie7', self::$_url . 'assets/css/vendor/elusive-icons/elusive-webfont-ie7.css', array(), filemtime(self::$_dir . 'assets/css/vendor/elusive-icons/elusive-webfont-ie7.css'), 'all');
     wp_register_style('qtip-css', self::$_url . 'assets/css/vendor/qtip/jquery.qtip.css', array(), filemtime(self::$_dir . 'assets/css/vendor/qtip/jquery.qtip.css'), 'all');
     $wp_styles->add_data('redux-elusive-icon-ie7', 'conditional', 'lte IE 7');
     /**
      * jQuery UI stylesheet src
      * filter 'redux/page/{opt_name}/enqueue/jquery-ui-css'
      *
      * @param string  bundled stylesheet src
      */
     wp_register_style('jquery-ui-css', apply_filters("redux/page/{$this->args['opt_name']}/enqueue/jquery-ui-css", self::$_url . 'assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.css'), '', filemtime(self::$_dir . 'assets/css/vendor/jquery-ui-bootstrap/jquery-ui-1.10.0.custom.css'), 'all');
     wp_enqueue_style('jquery-ui-css');
     wp_enqueue_style('redux-lte-ie8');
     wp_enqueue_style('qtip-css');
     wp_enqueue_style('redux-elusive-icon');
     wp_enqueue_style('redux-elusive-icon-ie7');
     if (is_rtl()) {
         wp_register_style('redux-rtl-css', self::$_url . 'assets/css/rtl.css', array('redux-css'), filemtime(self::$_dir . 'assets/css/rtl.css'), 'all');
         wp_enqueue_style('redux-rtl-css');
     }
     wp_enqueue_script('jquery');
     wp_enqueue_script('jquery-ui-core');
     wp_enqueue_script('jquery-ui-dialog');
     // Load jQuery sortable for slides, sorter, sortable and group
     if (Redux_Helpers::isFieldInUseByType($this->fields, array('slides', 'sorter', 'sortable', 'group'))) {
         wp_enqueue_script('jquery-ui-sortable');
         wp_enqueue_style('jquery-ui-sortable');
     }
     // Load jQuery UI Datepicker for date
     if (Redux_Helpers::isFieldInUseByType($this->fields, array('date', 'datetime'))) {
         wp_enqueue_script('jquery-ui-datepicker');
     }
     // Load jQuery UI Accordion for slides and group
     if (Redux_Helpers::isFieldInUseByType($this->fields, array('slides', 'group'))) {
         wp_enqueue_script('jquery-ui-accordion');
     }
     // Load wp-color-picker for color, color_gradient, link_color, border, background and typography
     if (Redux_Helpers::isFieldInUseByType($this->fields, array('background', 'color', 'color_gradient', 'link_color', 'border', 'typography', 'css_layout'))) {
         redux_enqueue_style($this, 'redux-color-picker-css', ReduxFramework::$_url . 'assets/css/color-picker/color-picker.css', ReduxFramework::$_dir . 'assets/css/color-picker', array(), time(), false);
         //                    wp_enqueue_style(
         //                        'redux-color-picker-css',
         //                        self::$_url . 'assets/css/color-picker/color-picker.css',
         //                        array( 'wp-color-picker' ),
         //                        filemtime( self::$_dir . 'assets/css/color-picker/color-picker.css' ),
         //                        'all'
         //                    );
         wp_enqueue_style('color-picker-css');
         wp_enqueue_script('wp-color-picker');
         wp_enqueue_style('wp-color-picker');
     }
     if (function_exists('wp_enqueue_media')) {
         wp_enqueue_media();
     } else {
         wp_enqueue_script('media-upload');
     }
     add_thickbox();
     wp_register_script('qtip-js', self::$_url . 'assets/js/vendor/qtip/jquery.qtip.js', array('jquery'), '2.2.0', true);
     wp_register_script('serializeForm-js', self::$_url . 'assets/js/vendor/jquery.serializeForm.js', array('jquery'), '1.0.0', true);
     // Embed the compress version unless in dev mode
     // dev_mode = true
     if (isset($this->args['dev_mode']) && $this->args['dev_mode'] == true) {
         //wp_enqueue_style( 'admin-css' );
         wp_register_script('redux-vendor', self::$_url . 'assets/js/vendor.min.js', array('jquery'), filemtime(self::$_dir . 'assets/js/vendor.min.js'), true);
         // dev_mode - false
     } else {
         //wp_enqueue_style( 'redux-css' );
     }
     $depArray = array('jquery', 'qtip-js', 'serializeForm-js');
     if (true == $this->args['dev_mode']) {
         array_push($depArray, 'redux-vendor');
     }
     wp_register_script('redux-js', self::$_url . 'assets/js/redux' . $min . '.js', $depArray, filemtime(self::$_dir . 'assets/js/redux' . $min . '.js'), true);
     foreach ($this->sections as $section) {
         if (isset($section['fields'])) {
             foreach ($section['fields'] as $field) {
                 // TODO AFTER GROUP WORKS - Revert IF below
                 // if( isset( $field['type'] ) && $field['type'] != 'callback' ) {
                 if (isset($field['type']) && $field['type'] != 'callback') {
                     $field_class = 'ReduxFramework_' . $field['type'];
                     /**
                      * Field class file
                      * filter 'redux/{opt_name}/field/class/{field.type}
                      *
                      * @param       string        field class file path
                      * @param array $field        field config data
                      */
                     $class_file = apply_filters("redux/{$this->args['opt_name']}/field/class/{$field['type']}", self::$_dir . "inc/fields/{$field['type']}/field_{$field['type']}.php", $field);
                     if ($class_file) {
                         if (!class_exists($field_class)) {
                             if (file_exists($class_file)) {
                                 require_once $class_file;
                             }
                         }
                         if (method_exists($field_class, 'enqueue') || method_exists($field_class, 'localize')) {
                             if (!isset($this->options[$field['id']])) {
                                 $this->options[$field['id']] = "";
                             }
                             $theField = new $field_class($field, $this->options[$field['id']], $this);
                             // Move dev_mode check to a new if/then block
                             if (!wp_script_is('redux-field-' . $field['type'] . '-js', 'enqueued') && class_exists($field_class) && method_exists($field_class, 'enqueue')) {
                                 // Checking for extension field AND dev_mode = false OR dev_mode = true
                                 // Since extension fields use 'extension_dir' exclusively, we can detect them here.
                                 // Also checking for dev_mode = true doesn't mess up the JS combinine.
                                 //if ( /*$this->args['dev_mode'] === false && */ isset($theField->extension_dir) && (!'' == $theField->extension_dir) /* || ($this->args['dev_mode'] === true) */) {
                                 $theField->enqueue();
                                 //print_r($field['type']);
                                 //}
                             }
                             if (method_exists($field_class, 'localize')) {
                                 $params = $theField->localize($field);
                                 if (!isset($this->localize_data[$field['type']])) {
                                     $this->localize_data[$field['type']] = array();
                                 }
                                 $this->localize_data[$field['type']][$field['id']] = $theField->localize($field);
                             }
                             unset($theField);
                         }
                     }
                 }
             }
         }
     }
     if ($this->args['sass']['enabled']) {
         reduxSassCompiler::compile_sass($this);
         if (!$this->args['sass']['page_output']) {
             wp_enqueue_style('redux-css', ReduxFramework::$_upload_url . $this->args['opt_name'] . '-redux.css', array(), time(), 'all');
         }
     }
     $this->localize_data['required'] = $this->required;
     $this->localize_data['fonts'] = $this->fonts;
     $this->localize_data['required_child'] = $this->required_child;
     $this->localize_data['fields'] = $this->fields;
     if (isset($this->font_groups['google'])) {
         $this->localize_data['googlefonts'] = $this->font_groups['google'];
     }
     if (isset($this->font_groups['std'])) {
         $this->localize_data['stdfonts'] = $this->font_groups['std'];
     }
     if (isset($this->font_groups['customfonts'])) {
         $this->localize_data['customfonts'] = $this->font_groups['customfonts'];
     }
     $this->localize_data['folds'] = $this->folds;
     // Make sure the children are all hidden properly.
     foreach ($this->fields as $key => $value) {
         if (in_array($key, $this->fieldsHidden)) {
             foreach ($value as $k => $v) {
                 if (!in_array($k, $this->fieldsHidden)) {
                     $this->fieldsHidden[] = $k;
                     $this->folds[$k] = "hide";
                 }
             }
         }
     }
     if (isset($this->args['dev_mode']) && $this->args['dev_mode'] == true) {
         $base = admin_url('admin-ajax.php') . '?action=redux_p&url=';
         $url = $base . urlencode('http://ads.reduxframework.com/api/index.php?js&g&1&v=2') . '&proxy=' . urlencode($base);
         $this->localize_data['rAds'] = '<span data-id="1" class="mgv1_1"><script type="text/javascript">(function(){if (mysa_mgv1_1) return; var ma = document.createElement("script"); ma.type = "text/javascript"; ma.async = true; ma.src = "' . $url . '"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ma, s) })();var mysa_mgv1_1=true;</script></span>';
     }
     $this->localize_data['fieldsHidden'] = $this->fieldsHidden;
     $this->localize_data['options'] = $this->options;
     $this->localize_data['defaults'] = $this->options_defaults;
     /**
      * Save pending string
      * filter 'redux/{opt_name}/localize/save_pending
      *
      * @param       string        save_pending string
      */
     $save_pending = apply_filters("redux/{$this->args['opt_name']}/localize/save_pending", __('You have changes that are not saved. Would you like to save them now?', 'redux-framework'));
     /**
      * Reset all string
      * filter 'redux/{opt_name}/localize/reset
      *
      * @param       string        reset all string
      */
     $reset_all = apply_filters("redux/{$this->args['opt_name']}/localize/reset", __('Are you sure? Resetting will lose all custom values.', 'redux-framework'));
     /**
      * Reset section string
      * filter 'redux/{opt_name}/localize/reset_section
      *
      * @param       string        reset section string
      */
     $reset_section = apply_filters("redux/{$this->args['opt_name']}/localize/reset_section", __('Are you sure? Resetting will lose all custom values in this section.', 'redux-framework'));
     /**
      * Preset confirm string
      * filter 'redux/{opt_name}/localize/preset
      *
      * @param       string        preset confirm string
      */
     $preset_confirm = apply_filters("redux/{$this->args['opt_name']}/localize/preset", __('Your current options will be replaced with the values of this preset. Would you like to proceed?', 'redux-framework'));
     global $pagenow;
     $this->localize_data['args'] = array('save_pending' => $save_pending, 'reset_confirm' => $reset_all, 'reset_section_confirm' => $reset_section, 'preset_confirm' => $preset_confirm, 'please_wait' => __('Please Wait', 'redux-framework'), 'opt_name' => $this->args['opt_name'], 'slug' => $this->args['page_slug'], 'hints' => $this->args['hints'], 'disable_save_warn' => $this->args['disable_save_warn'], 'class' => $this->args['class'], 'menu_search' => $pagenow . '?page=' . $this->args['page_slug'] . "&tab=");
     // Construct the errors array.
     if (isset($this->transients['last_save_mode']) && !empty($this->transients['notices']['errors'])) {
         $theTotal = 0;
         $theErrors = array();
         foreach ($this->transients['notices']['errors'] as $error) {
             $theErrors[$error['section_id']]['errors'][] = $error;
             if (!isset($theErrors[$error['section_id']]['total'])) {
                 $theErrors[$error['section_id']]['total'] = 0;
             }
             $theErrors[$error['section_id']]['total']++;
             $theTotal++;
         }
         $this->localize_data['errors'] = array('total' => $theTotal, 'errors' => $theErrors);
         unset($this->transients['notices']['errors']);
     }
     // Construct the warnings array.
     if (isset($this->transients['last_save_mode']) && !empty($this->transients['notices']['warnings'])) {
         $theTotal = 0;
         $theWarnings = array();
         foreach ($this->transients['notices']['warnings'] as $warning) {
             $theWarnings[$warning['section_id']]['warnings'][] = $warning;
             if (!isset($theWarnings[$warning['section_id']]['total'])) {
                 $theWarnings[$warning['section_id']]['total'] = 0;
             }
             $theWarnings[$warning['section_id']]['total']++;
             $theTotal++;
         }
         unset($this->transients['notices']['warnings']);
         $this->localize_data['warnings'] = array('total' => $theTotal, 'warnings' => $theWarnings);
     }
     if (empty($this->transients['notices'])) {
         unset($this->transients['notices']);
     }
     // Values used by the javascript
     wp_localize_script('redux-js', 'redux', $this->localize_data);
     wp_enqueue_script('redux-js');
     // Enque the JS now
     wp_enqueue_script('webfontloader', 'https://ajax.googleapis.com/ajax/libs/webfont/1.5.0/webfont.js', array('jquery'), '1.5.0', true);
     /**
      * action 'redux-enqueue-{opt_name}'
      *
      * @deprecated
      *
      * @param  object $this ReduxFramework
      */
     do_action("redux-enqueue-{$this->args['opt_name']}", $this);
     // REMOVE
     /**
      * action 'redux/page/{opt_name}/enqueue'
      */
     do_action("redux/page/{$this->args['opt_name']}/enqueue");
 }
Beispiel #16
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 1.0.0
  */
 function enqueue()
 {
     $min = Redux_Functions::isMin();
     wp_enqueue_script('redux-field-border-js', ReduxFramework::$_url . 'inc/fields/border/field_border' . $min . '.js', array('jquery', 'select2-js', 'wp-color-picker', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-border-css', ReduxFramework::$_url . 'inc/fields/border/field_border.css', ReduxFramework::$_dir . 'inc/fields/border', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-border-css',
     //                    ReduxFramework::$_url . 'inc/fields/border/field_border.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #17
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 3.0.0
  */
 function enqueue()
 {
     wp_enqueue_script('redux-field-spinner-custom-js', ReduxFramework::$_url . 'inc/fields/spinner/vendor/spinner_custom.js', array('jquery'), time(), true);
     wp_enqueue_script('redux-field-spinner-js', ReduxFramework::$_url . 'inc/fields/spinner/field_spinner' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-field-spinner-custom-js', 'jquery-ui-core', 'jquery-ui-dialog', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-spinner-css', ReduxFramework::$_url . 'inc/fields/spinner/field_spinner.css', ReduxFramework::$_dir . 'inc/fields/spinner', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-spinner-css',
     //                    ReduxFramework::$_url . 'inc/fields/spinner/field_spinner.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #18
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     redux_enqueue_style($this->parent, 'redux-field-ace-editor-css', ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor.css', ReduxFramework::$_dir . 'inc/fields/ace_editor', array(), time(), false);
     wp_enqueue_script('ace-editor-js', ReduxFramework::$_url . 'inc/fields/ace_editor/vendor/ace.js', array('jquery'), filemtime(ReduxFramework::$_dir . 'inc/fields/ace_editor/vendor/ace.js'), true);
     wp_enqueue_script('redux-field-ace-editor-js', ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor' . Redux_Functions::isMin() . '.js', array('jquery', 'ace-editor-js', 'redux-js'), time(), true);
 }
Beispiel #19
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since ReduxFramework 1.0.0
  */
 function enqueue()
 {
     wp_enqueue_script('redux-field-dimensions-js', ReduxFramework::$_url . 'inc/fields/dimensions/field_dimensions' . Redux_Functions::isMin() . '.js', array('jquery', 'select2-js', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-dimensions-css', ReduxFramework::$_url . 'inc/fields/dimensions/field_dimensions.css', ReduxFramework::$_dir . 'inc/fields/dimensions', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-dimensions-css',
     //                    ReduxFramework::$_url . 'inc/fields/dimensions/field_dimensions.css',
     //                    time(),
     //                    true
     //                );
 }
 public function enqueue()
 {
     wp_enqueue_script('redux-field-import-export-js', ReduxFramework::$_url . 'assets/js/import_export/import_export' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-import-export-css', ReduxFramework::$_url . 'assets/css/import_export/import_export.css', ReduxFramework::$_dir . 'assets/css/import_export', array(), time(), false);
     //                wp_enqueue_style(
     //                    'redux-field-import-export-css',
     //                    ReduxFramework::$_url . 'assets/css/import_export/import_export.css',
     //                    time(),
     //                    true
     //                );
 }
Beispiel #21
0
 /**
  * Enqueue Function.
  * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
  *
  * @since       1.0.0
  * @access      public
  * @return      void
  */
 public function enqueue()
 {
     wp_enqueue_script('redux-field-media-js', ReduxFramework::$_url . 'assets/js/media/media' . Redux_Functions::isMin() . '.js', array('jquery', 'redux-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-media-css', ReduxFramework::$_url . 'inc/fields/media/field_media.css', ReduxFramework::$_dir . 'inc/fields/media', array(), time(), false);
     //            wp_enqueue_style (
     //                'redux-field-media-css',
     //                ReduxFramework::$_url . 'inc/fields/media/field_media.css',
     //                time (),
     //                true
     //            );
     wp_enqueue_script('redux-field-slides-js', ReduxFramework::$_url . 'inc/fields/slides/field_slides' . Redux_Functions::isMin() . '.js', array('jquery', 'jquery-ui-core', 'jquery-ui-accordion', 'wp-color-picker', 'redux-field-media-js'), time(), true);
     redux_enqueue_style($this->parent, 'redux-field-slides-css', ReduxFramework::$_url . 'inc/fields/slides/field_slides.css', ReduxFramework::$_dir . 'inc/fields/slides', array(), time(), false);
     //            wp_enqueue_style (
     //                'redux-field-slides-css',
     //                ReduxFramework::$_url . 'inc/fields/slides/field_slides.css',
     //                time (),
     //                true
     //            );
 }