| @@ -1,17 +1,7 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Add Shortcode buttons in TinyMCE |
| 4 | -$css = get_option( 'EBS_BOOTSTRAP_CSS_LOCATION', 1 ); | |
| 5 | -if($css==3){ | |
| 6 | - define('EBS_CONTAINER_CLASS',' oscitas-bootstrap-container'); | |
| 7 | - define('EBS_POPOVER_TEMPLATE','<div class="popover'.EBS_CONTAINER_CLASS.'"><div class="arrow'.EBS_CONTAINER_CLASS.'"></div><h3 class="popover-title'.EBS_CONTAINER_CLASS.'"></h3><div class="popover-content'.EBS_CONTAINER_CLASS.' "></div></div>'); | |
| 8 | - define('EBS_TOOLTIP_TEMPLATE','<div class="tooltip'.EBS_CONTAINER_CLASS.'"><div class="tooltip-arrow'.EBS_CONTAINER_CLASS.'"></div><div class="tooltip-inner'.EBS_CONTAINER_CLASS.'"></div></div>'); | |
| 9 | -} else{ | |
| 10 | - define('EBS_CONTAINER_CLASS',''); | |
| 11 | - define('EBS_POPOVER_TEMPLATE',''); | |
| 12 | - define('EBS_TOOLTIP_TEMPLATE',''); | |
| 13 | -} | |
| 14 | 4 | $elements = array( |
| 15 | 5 | 'toggles', |
| 16 | 6 | 'tabs', |
| 17 | 7 | 'lists', |
| @@ -32,11 +22,9 @@ | ||
| 32 | 22 | 'thumbnail', |
| 33 | 23 | 'icon', |
| 34 | 24 | 'image', |
| 35 | 25 | 'progressbar', |
| 36 | - 'servicebox', | |
| 37 | - 'slider' | |
| 38 | - | |
| 26 | + | |
| 39 | 27 | ); |
| 40 | 28 | |
| 41 | 29 | foreach ($elements as $element) { |
| 42 | 30 | include( $element . '/plugin_shortcode.php'); |
| @@ -44,25 +32,17 @@ | ||
| 44 | 32 | |
| 45 | 33 | add_action('init', 'osc_add_ebs_buttons_to_tinymce'); |
| 46 | 34 | |
| 47 | 35 | function osc_add_ebs_buttons_to_tinymce() { |
| 48 | - $ebsp_editor_opt=get_option('EBS_EDITOR_OPT','icon'); | |
| 49 | 36 | if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) |
| 50 | 37 | return; |
| 51 | 38 | |
| 52 | 39 | if (get_user_option('rich_editing') == 'true') { |
| 53 | 40 | add_filter("mce_external_plugins", "osc_add_ebs_plugin"); |
| 54 | - if($ebsp_editor_opt=='icon'){ | |
| 55 | - add_filter('mce_buttons_3', 'osc_register_ebs_button'); | |
| 56 | - } else{ | |
| 57 | - add_filter('mce_buttons', 'osc_register_ebs_dropdown'); | |
| 58 | - } | |
| 41 | + add_filter('mce_buttons_3', 'osc_register_ebs_button'); | |
| 59 | 42 | } |
| 60 | 43 | } |
| 61 | -function osc_register_ebs_dropdown($buttons){ | |
| 62 | - $buttons[] = 'oscitas_main_dropdown_button'; | |
| 63 | - return $buttons; | |
| 64 | -} | |
| 44 | + | |
| 65 | 45 | function osc_register_ebs_button($buttons) { |
| 66 | 46 | global $elements; |
| 67 | 47 | foreach ($elements as $element) { |
| 68 | 48 | $buttons[] = 'oscitas' . $element; |
| @@ -74,9 +54,6 @@ | ||
| 74 | 54 | global $elements; |
| 75 | 55 | foreach ($elements as $element) { |
| 76 | 56 | $plugin_array['oscitas' . $element] = plugins_url('', __FILE__) . '/' . $element . '/' . $element . '_plugin.js'; |
| 77 | 57 | } |
| 78 | - $plugin_array['oscitas_main_dropdown']=EBS_PLUGIN_URL.'js/oscitas_main_dropdown.js'; | |
| 79 | 58 | return $plugin_array; |
| 80 | - return $plugin_array; | |
| 81 | 59 | } |
| 82 | - | |