Changeset 2441093
- Timestamp:
- 12/16/2020 10:20:18 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
global-custom-fields/tags/1.2/assets/functions.php
r2315767 r2441093 1 1 <?php 2 2 3 if (!defined('ABSPATH')) { exit; } 3 if (!defined('ABSPATH')) { 4 exit; 5 } 4 6 5 7 require_once GCF_PLUGIN_DIR . "views/Options.php"; … … 20 22 21 23 // Codemirror 22 function codemirror_enqueue_scripts($hook) { 23 $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css')); 24 wp_localize_script('jquery', 'cm_settings', $cm_settings); 25 wp_enqueue_script('wp-theme-plugin-editor'); 26 wp_enqueue_style('wp-codemirror'); 24 function codemirror_enqueue_scripts($hook) 25 { 26 $cm_settings['codeEditor'] = wp_enqueue_code_editor(array('type' => 'text/css')); 27 wp_localize_script('jquery', 'cm_settings', $cm_settings); 28 // wp_enqueue_script('wp-theme-plugin-editor'); 29 wp_enqueue_style('wp-codemirror'); 27 30 } 28 31 … … 36 39 } 37 40 38 function gcf_eval(&$field){ 41 function gcf_eval(&$field) 42 { 39 43 return gcf_Options::gcf_eval($field); 40 44 } … … 48 52 'eval' => false 49 53 ), $attrs)); 50 if (!$group || !$field) return $html;54 if (!$group || !$field) return $html; 51 55 $html .= get_gcf($group, $field, $eval); 52 56 return $html;
Note: See TracChangeset
for help on using the changeset viewer.