示例#1
0
 /**
  * Display Variable Field
  */
 function display_var_field($data)
 {
     // Low Variables doesn't mix in the fieldtype's global settings,
     // so we'll do it manually here
     $this->settings = array_merge($this->settings, Wygwam_helper::get_global_settings());
     if (version_compare(APP_VER, '2.5.0', '<')) {
         // it's way too complicated to get EE's file browser
         // loaded on non-Publish pages, so we'll fallback to CKFinder
         $global_settings = Wygwam_helper::get_global_settings();
         if (!isset($global_settings['file_browser']) || $global_settings['file_browser'] == 'ee') {
             $global_settings['file_browser'] = 'ckfinder';
             Wygwam_helper::set_global_settings($global_settings);
         }
     }
     return $this->display_field($data);
 }