Beispiel #1
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()
 {
     if ($this->parent->args['dev_mode']) {
         if (!wp_style_is('redux-field-ace-editor-css')) {
             wp_enqueue_style('redux-field-ace-editor-css', ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor.css', array(), time(), 'all');
         }
     }
     // @Alice Crumb: ace.js
     if (!wp_script_is('ace-editor-js')) {
         Redux_CDN::enqueue_script('ace-editor-js', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.1.9/ace.js', array('jquery'), '1.1.9', true);
     }
     if (!wp_script_is('redux-field-ace-editor-js')) {
         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);
     }
 }
 /**
  * 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()
 {
     if ($this->parent->args['dev_mode']) {
         if (!wp_style_is('redux-field-ace-editor-css')) {
             wp_enqueue_style('redux-field-ace-editor-css', ReduxFramework::$_url . 'inc/fields/ace_editor/field_ace_editor.css', array(), time(), 'all');
         }
     }
     if (!wp_script_is('ace-editor-js')) {
         Redux_CDN::enqueue_script('ace-editor-js', '//cdn.jsdelivr.net/ace/1.1.9/min/ace.js', array('jquery'), '1.1.9', true);
     }
     if (!wp_script_is('redux-field-ace-editor-js')) {
         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);
     }
 }