コード例 #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()
 {
     $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);
     }
 }
コード例 #2
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-blockUI', $this->extension_url . '/jquery.blockUI.js', array('jquery'), time(), true);
     wp_enqueue_script('redux-field-custom_fonts-js', $this->extension_url . '/field_custom_fonts.js', array('jquery', 'redux-blockUI'), time(), true);
     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);
     }
 }
コード例 #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()
 {
     $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);
     wp_localize_script('redux-field-custom_fonts-js', 'redux_custom_fonts_l10', apply_filters('redux_custom_fonts_localized_data', array('delete_error' => __('There was an error deleting your font:', 'redux-framework'), 'unzip' => __('Unzipping archive and generating any missing font files.', 'redux-framework'), 'convert' => __('Converting font file(s)...', 'redux-framework'), 'partial' => __('The only file(s) imported were those uploaded.  Please refresh the page to continue (making note of any errors before doing so, please).', 'redux-framework'), 'unknown' => __('An unknown error occurred. Please try again.', 'redux-framework'), 'complete' => __('Conversion complete.  Refreshing page...', 'redux-framework'), 'media_title' => __('Choose font file or ZIP of font files.', 'redux-framework'), 'media_button' => __('Update', 'redux-framework'))));
     wp_enqueue_style('redux-field-custom_fonts-css', $this->extension_url . 'field_custom_fonts.css', array(), time(), 'all');
     $class = ReduxFramework_extension_custom_fonts::get_instance();
     if (!empty($class->custom_fonts)) {
         wp_enqueue_style('redux-custom_fonts-css', $class->upload_url . "fonts.css", array(), time(), 'all');
     }
 }