Version Description
Download this release
Release Info
Developer | pickplugins |
Plugin | Accordion |
Version | 2.2.12 |
Comparing to | |
See all releases |
Code changes from version 2.2.11 to 2.2.12
- accordions.php +6 -26
- includes/class-post-meta-accordions-hook.php +11 -26
- includes/class-post-meta-accordions.php +0 -16
- includes/class-settings-hook.php +1 -1
- includes/class-settings-tabs.php +43 -17
- includes/functions-data-upgrade.php +6 -1
- includes/functions.php +265 -0
- includes/menu/settings.php +0 -12
- readme.txt +9 -2
- templates/accordion/accordion-hook.php +73 -70
- templates/tabs/tabs-hook.php +13 -0
accordions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accordions by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
-
Version: 2.2.
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 4.0
|
9 |
Author: PickPlugins
|
@@ -23,7 +23,7 @@ class Accordions{
|
|
23 |
|
24 |
define('accordions_plugin_url', plugins_url('/', __FILE__) );
|
25 |
define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
|
26 |
-
define('accordions_version', '2.2.
|
27 |
define('accordions_plugin_name', 'Accordions' );
|
28 |
define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
|
29 |
|
@@ -148,44 +148,24 @@ class Accordions{
|
|
148 |
wp_register_style('fontawesome-4', accordions_plugin_url.'assets/global/css/font-awesome-4.css');
|
149 |
wp_register_style('jquery-ui', accordions_plugin_url.'assets/frontend/css/jquery-ui.css');
|
150 |
wp_register_style('accordions-themes', accordions_plugin_url.'assets/global/css/themes.style.css');
|
151 |
-
//wp_register_style('animate', accordions_plugin_url.'assets/global/css/animate.css');
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
|
156 |
}
|
157 |
|
158 |
public function _admin_scripts(){
|
159 |
|
|
|
|
|
160 |
wp_enqueue_script('accordions_admin_js', accordions_plugin_url. 'assets/admin/js/scripts.js' , array( 'jquery' ),'20181018');
|
161 |
wp_localize_script( 'accordions_admin_js', 'accordions_ajax', array( 'accordions_ajaxurl' => admin_url( 'admin-ajax.php'), 'nonce' => wp_create_nonce('accordions_nonce')));
|
162 |
|
163 |
wp_register_style('settings-tabs', accordions_plugin_url.'assets/settings-tabs/settings-tabs.css');
|
164 |
wp_register_script('settings-tabs', accordions_plugin_url.'assets/settings-tabs/settings-tabs.js' , array( 'jquery' ));
|
165 |
|
166 |
-
//wp_register_script('codemirror', accordions_plugin_url.'assets/admin/js/codemirror.js' , array( 'jquery' ));
|
167 |
-
wp_register_style('codemirror', accordions_plugin_url.'assets/admin/css/codemirror.css');
|
168 |
-
|
169 |
wp_register_style('font-awesome-4', accordions_plugin_url.'assets/global/css/font-awesome-4.css');
|
170 |
wp_register_style('font-awesome-5', accordions_plugin_url.'assets/global/css/font-awesome-5.css');
|
171 |
|
172 |
-
|
173 |
-
$
|
174 |
-
wp_localize_script('jquery', 'cm_settings', $cm_settings);
|
175 |
-
wp_enqueue_script('wp-theme-plugin-editor');
|
176 |
-
|
177 |
-
|
178 |
-
wp_enqueue_editor();
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
//wp_enqueue_script('accordions_admin_js', accordions_plugin_url. 'assets/admin/js/scripts.js' , array( 'jquery' ),'20181018');
|
183 |
-
//wp_localize_script( 'accordions_admin_js', 'accordions_ajax', array( 'accordions_ajaxurl' => admin_url( 'admin-ajax.php')));
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
|
190 |
|
191 |
}
|
3 |
Plugin Name: Accordions by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
+
Version: 2.2.12
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 4.0
|
9 |
Author: PickPlugins
|
23 |
|
24 |
define('accordions_plugin_url', plugins_url('/', __FILE__) );
|
25 |
define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
|
26 |
+
define('accordions_version', '2.2.12' );
|
27 |
define('accordions_plugin_name', 'Accordions' );
|
28 |
define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
|
29 |
|
148 |
wp_register_style('fontawesome-4', accordions_plugin_url.'assets/global/css/font-awesome-4.css');
|
149 |
wp_register_style('jquery-ui', accordions_plugin_url.'assets/frontend/css/jquery-ui.css');
|
150 |
wp_register_style('accordions-themes', accordions_plugin_url.'assets/global/css/themes.style.css');
|
|
|
|
|
|
|
|
|
151 |
|
152 |
}
|
153 |
|
154 |
public function _admin_scripts(){
|
155 |
|
156 |
+
|
157 |
+
|
158 |
wp_enqueue_script('accordions_admin_js', accordions_plugin_url. 'assets/admin/js/scripts.js' , array( 'jquery' ),'20181018');
|
159 |
wp_localize_script( 'accordions_admin_js', 'accordions_ajax', array( 'accordions_ajaxurl' => admin_url( 'admin-ajax.php'), 'nonce' => wp_create_nonce('accordions_nonce')));
|
160 |
|
161 |
wp_register_style('settings-tabs', accordions_plugin_url.'assets/settings-tabs/settings-tabs.css');
|
162 |
wp_register_script('settings-tabs', accordions_plugin_url.'assets/settings-tabs/settings-tabs.js' , array( 'jquery' ));
|
163 |
|
|
|
|
|
|
|
164 |
wp_register_style('font-awesome-4', accordions_plugin_url.'assets/global/css/font-awesome-4.css');
|
165 |
wp_register_style('font-awesome-5', accordions_plugin_url.'assets/global/css/font-awesome-5.css');
|
166 |
|
167 |
+
$settings_tabs_field = new settings_tabs_field();
|
168 |
+
$settings_tabs_field->admin_scripts();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
|
170 |
|
171 |
}
|
includes/class-post-meta-accordions-hook.php
CHANGED
@@ -165,6 +165,8 @@ function accordions_metabox_content_general($post_id){
|
|
165 |
|
166 |
$settings_tabs_field = new settings_tabs_field();
|
167 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
|
|
|
|
168 |
|
169 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
170 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
@@ -308,6 +310,9 @@ function accordions_metabox_content_accordion_options($post_id){
|
|
308 |
|
309 |
$settings_tabs_field = new settings_tabs_field();
|
310 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
311 |
$accordion = isset($accordions_options['accordion']) ? $accordions_options['accordion'] : array();
|
312 |
$collapsible = isset($accordion['collapsible']) ? $accordion['collapsible'] : 'true';
|
313 |
$expanded_other = isset($accordion['expanded_other']) ? $accordion['expanded_other'] : 'no';
|
@@ -402,6 +407,8 @@ function accordions_metabox_content_tabs_options($post_id){
|
|
402 |
|
403 |
$settings_tabs_field = new settings_tabs_field();
|
404 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
405 |
|
406 |
$tabs = isset($accordions_options['tabs']) ? $accordions_options['tabs'] : array();
|
407 |
$collapsible = isset($tabs['collapsible']) ? $tabs['collapsible'] : 'true';
|
@@ -477,36 +484,13 @@ function accordions_metabox_content_tabs_options($post_id){
|
|
477 |
|
478 |
|
479 |
|
480 |
-
|
481 |
-
add_action('accordions_metabox_content_general_style', 'accordions_metabox_content_general_style', 10);
|
482 |
-
|
483 |
-
function accordions_metabox_content_general_style($post_id){
|
484 |
-
|
485 |
-
$settings_tabs_field = new settings_tabs_field();
|
486 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
487 |
-
|
488 |
-
|
489 |
-
?>
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
<?php
|
494 |
-
|
495 |
-
|
496 |
-
}
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
add_action('accordions_metabox_content_style', 'accordions_metabox_content_style', 10);
|
505 |
|
506 |
function accordions_metabox_content_style($post_id){
|
507 |
|
508 |
$settings_tabs_field = new settings_tabs_field();
|
509 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
510 |
|
511 |
$icon = isset($accordions_options['icon']) ? $accordions_options['icon'] : array();
|
512 |
$icon_active = isset($icon['active']) ? $icon['active'] : '';
|
@@ -1072,9 +1056,9 @@ function accordions_metabox_content_content($post_id){
|
|
1072 |
|
1073 |
$settings_tabs_field = new settings_tabs_field();
|
1074 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
1075 |
-
$
|
1076 |
-
|
1077 |
|
|
|
1078 |
|
1079 |
|
1080 |
?>
|
@@ -1166,6 +1150,7 @@ function accordions_metabox_content_custom_scripts($post_id){
|
|
1166 |
$settings_tabs_field = new settings_tabs_field();
|
1167 |
|
1168 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
1169 |
|
1170 |
$custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
|
1171 |
$custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
|
165 |
|
166 |
$settings_tabs_field = new settings_tabs_field();
|
167 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
168 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
169 |
+
|
170 |
|
171 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
172 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
310 |
|
311 |
$settings_tabs_field = new settings_tabs_field();
|
312 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
313 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
314 |
+
|
315 |
+
|
316 |
$accordion = isset($accordions_options['accordion']) ? $accordions_options['accordion'] : array();
|
317 |
$collapsible = isset($accordion['collapsible']) ? $accordion['collapsible'] : 'true';
|
318 |
$expanded_other = isset($accordion['expanded_other']) ? $accordion['expanded_other'] : 'no';
|
407 |
|
408 |
$settings_tabs_field = new settings_tabs_field();
|
409 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
410 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
411 |
+
|
412 |
|
413 |
$tabs = isset($accordions_options['tabs']) ? $accordions_options['tabs'] : array();
|
414 |
$collapsible = isset($tabs['collapsible']) ? $tabs['collapsible'] : 'true';
|
484 |
|
485 |
|
486 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
487 |
add_action('accordions_metabox_content_style', 'accordions_metabox_content_style', 10);
|
488 |
|
489 |
function accordions_metabox_content_style($post_id){
|
490 |
|
491 |
$settings_tabs_field = new settings_tabs_field();
|
492 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
493 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
494 |
|
495 |
$icon = isset($accordions_options['icon']) ? $accordions_options['icon'] : array();
|
496 |
$icon_active = isset($icon['active']) ? $icon['active'] : '';
|
1056 |
|
1057 |
$settings_tabs_field = new settings_tabs_field();
|
1058 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
1059 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
|
|
1060 |
|
1061 |
+
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
1062 |
|
1063 |
|
1064 |
?>
|
1150 |
$settings_tabs_field = new settings_tabs_field();
|
1151 |
|
1152 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
1153 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
1154 |
|
1155 |
$custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
|
1156 |
$custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
|
includes/class-post-meta-accordions.php
CHANGED
@@ -127,22 +127,6 @@ class class_accordions_post_meta{
|
|
127 |
foreach ($accordion_settings_tab as $page_key => $tab) $tabs_sorted[$page_key] = isset( $tab['priority'] ) ? $tab['priority'] : 0;
|
128 |
array_multisort($tabs_sorted, SORT_ASC, $accordion_settings_tab);
|
129 |
|
130 |
-
wp_enqueue_script('jquery');
|
131 |
-
wp_enqueue_script('jquery-ui-sortable');
|
132 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
133 |
-
wp_enqueue_script('jquery-ui-accordion');
|
134 |
-
wp_enqueue_script('wp-color-picker');
|
135 |
-
wp_enqueue_style( 'wp-color-picker' );
|
136 |
-
|
137 |
-
wp_enqueue_style( 'jquery-ui');
|
138 |
-
wp_enqueue_style( 'font-awesome-5' );
|
139 |
-
wp_enqueue_style( 'settings-tabs' );
|
140 |
-
wp_enqueue_script( 'settings-tabs' );
|
141 |
-
|
142 |
-
|
143 |
-
wp_enqueue_editor();
|
144 |
-
|
145 |
-
|
146 |
|
147 |
?>
|
148 |
|
127 |
foreach ($accordion_settings_tab as $page_key => $tab) $tabs_sorted[$page_key] = isset( $tab['priority'] ) ? $tab['priority'] : 0;
|
128 |
array_multisort($tabs_sorted, SORT_ASC, $accordion_settings_tab);
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
|
131 |
?>
|
132 |
|
includes/class-settings-hook.php
CHANGED
@@ -29,7 +29,7 @@ function accordions_settings_content_general(){
|
|
29 |
'details' => __('Choose font awesome version you want to load.','accordions'),
|
30 |
'type' => 'select',
|
31 |
'value' => $font_aw_version,
|
32 |
-
'default' => '',
|
33 |
'args' => array('v_5'=>__('Version 5+','accordions'), 'v_4'=>__('Version 4+','accordions'), 'none'=>__('None','accordions') ),
|
34 |
);
|
35 |
|
29 |
'details' => __('Choose font awesome version you want to load.','accordions'),
|
30 |
'type' => 'select',
|
31 |
'value' => $font_aw_version,
|
32 |
+
'default' => 'v_5',
|
33 |
'args' => array('v_5'=>__('Version 5+','accordions'), 'v_4'=>__('Version 4+','accordions'), 'none'=>__('None','accordions') ),
|
34 |
);
|
35 |
|
includes/class-settings-tabs.php
CHANGED
@@ -4,12 +4,40 @@ if ( ! defined('ABSPATH')) exit; // if direct access
|
|
4 |
if( ! class_exists( 'settings_tabs_field' ) ) {
|
5 |
class settings_tabs_field{
|
6 |
|
|
|
|
|
|
|
7 |
public function __construct(){
|
8 |
-
|
9 |
-
|
|
|
|
|
10 |
}
|
11 |
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
function field_template($option){
|
15 |
|
@@ -38,11 +66,8 @@ class settings_tabs_field{
|
|
38 |
|
39 |
|
40 |
|
41 |
-
function _admin_scripts(){
|
42 |
|
43 |
|
44 |
-
}
|
45 |
-
|
46 |
|
47 |
function generate_field($option){
|
48 |
|
@@ -316,7 +341,7 @@ class settings_tabs_field{
|
|
316 |
|
317 |
$media_url = wp_get_attachment_url( $value );
|
318 |
$media_type = get_post_mime_type( $value );
|
319 |
-
$media_title = !empty($value) ? get_the_title( $value ) : __('Placeholder.jpg',
|
320 |
|
321 |
|
322 |
$media_url = !empty($media_url) ? $media_url : $default;
|
@@ -372,8 +397,8 @@ class settings_tabs_field{
|
|
372 |
?>
|
373 |
</div>
|
374 |
<input class="media-input-value" type="hidden" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
|
375 |
-
<div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload',
|
376 |
-
<div placeholder="<?php echo $placeholder; ?>" class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear',
|
377 |
<div class="error-mgs"></div>
|
378 |
</div>
|
379 |
|
@@ -453,7 +478,7 @@ class settings_tabs_field{
|
|
453 |
?>
|
454 |
</div>
|
455 |
<input type="text" placeholder="<?php echo $placeholder; ?>" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
|
456 |
-
<div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload',
|
457 |
<div class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear','accordions');?></div>
|
458 |
<div class="error-mgs"></div>
|
459 |
</div>
|
@@ -571,7 +596,7 @@ class settings_tabs_field{
|
|
571 |
//var_dump($index);
|
572 |
|
573 |
?>
|
574 |
-
<div class="item-wrap <?php if($collapsible) echo 'collapsible'; ?>">
|
575 |
<?php if($collapsible):?>
|
576 |
<div class="header">
|
577 |
<?php endif; ?>
|
@@ -831,7 +856,7 @@ class settings_tabs_field{
|
|
831 |
?>
|
832 |
<div id="input-wrapper-<?php echo $id; ?>" class="input-wrapper input-text-multi-wrapper
|
833 |
input-text-multi-wrapper-<?php echo $css_id; ?>">
|
834 |
-
<span data-placeholder="<?php echo esc_attr($placeholder); ?>" data-sort="<?php echo $sortable; ?>" data-clone="<?php echo $allow_clone; ?>" data-name="<?php echo $field_name; ?>[]" class="button add-item"><?php echo __('Add',
|
835 |
<div class="field-list <?php if($sortable){ echo 'sortable'; }?>" id="<?php echo $css_id; ?>">
|
836 |
<?php
|
837 |
if(!empty($values)):
|
@@ -1237,6 +1262,9 @@ class settings_tabs_field{
|
|
1237 |
|
1238 |
$field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
|
1239 |
|
|
|
|
|
|
|
1240 |
|
1241 |
ob_start();
|
1242 |
?>
|
@@ -1244,10 +1272,7 @@ class settings_tabs_field{
|
|
1244 |
|
1245 |
<script>
|
1246 |
jQuery(document).ready(function($){
|
1247 |
-
|
1248 |
-
wp.codeEditor.initialize($('#<?php echo $css_id; ?>'), cm_settings);
|
1249 |
-
|
1250 |
-
|
1251 |
})
|
1252 |
</script>
|
1253 |
<?php
|
@@ -1280,7 +1305,8 @@ class settings_tabs_field{
|
|
1280 |
$title = isset( $option['title'] ) ? $option['title'] : "";
|
1281 |
$details = isset( $option['details'] ) ? $option['details'] : "";
|
1282 |
|
1283 |
-
|
|
|
1284 |
|
1285 |
$field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
|
1286 |
?>
|
@@ -1295,7 +1321,7 @@ class settings_tabs_field{
|
|
1295 |
|
1296 |
jQuery(document).ready(function($){
|
1297 |
|
1298 |
-
wp.codeEditor.initialize($('#<?php echo $css_id; ?>'),
|
1299 |
|
1300 |
|
1301 |
})
|
4 |
if( ! class_exists( 'settings_tabs_field' ) ) {
|
5 |
class settings_tabs_field{
|
6 |
|
7 |
+
// public $asset_dir_url = '';
|
8 |
+
public $textdomain = 'settings-tabs';
|
9 |
+
|
10 |
public function __construct(){
|
11 |
+
|
12 |
+
// $this->asset_dir_url = isset($args['asset_dir_url']) ? $args['asset_dir_url'] : '';
|
13 |
+
// $this->textdomain = isset($args['textdomain']) ? $args['textdomain'] : '';
|
14 |
+
|
15 |
}
|
16 |
|
17 |
|
18 |
+
function admin_scripts(){
|
19 |
+
|
20 |
+
|
21 |
+
wp_enqueue_script('jquery');
|
22 |
+
wp_enqueue_script('jquery-ui-sortable');
|
23 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
24 |
+
wp_enqueue_script('jquery-ui-accordion');
|
25 |
+
wp_enqueue_style( 'jquery-ui');
|
26 |
+
|
27 |
+
wp_enqueue_script('wp-color-picker');
|
28 |
+
wp_enqueue_style( 'wp-color-picker' );
|
29 |
+
|
30 |
+
|
31 |
+
wp_enqueue_style( 'font-awesome-5' );
|
32 |
+
|
33 |
+
wp_enqueue_style( 'settings-tabs' );
|
34 |
+
wp_enqueue_script( 'settings-tabs' );
|
35 |
+
|
36 |
+
wp_enqueue_script( 'code-editor' );
|
37 |
+
wp_enqueue_style( 'code-editor' );
|
38 |
+
|
39 |
+
wp_enqueue_editor();
|
40 |
+
}
|
41 |
|
42 |
function field_template($option){
|
43 |
|
66 |
|
67 |
|
68 |
|
|
|
69 |
|
70 |
|
|
|
|
|
71 |
|
72 |
function generate_field($option){
|
73 |
|
341 |
|
342 |
$media_url = wp_get_attachment_url( $value );
|
343 |
$media_type = get_post_mime_type( $value );
|
344 |
+
$media_title = !empty($value) ? get_the_title( $value ) : __('Placeholder.jpg', $this->textdomain);
|
345 |
|
346 |
|
347 |
$media_url = !empty($media_url) ? $media_url : $default;
|
397 |
?>
|
398 |
</div>
|
399 |
<input class="media-input-value" type="hidden" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
|
400 |
+
<div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload', $this->textdomain);?></div>
|
401 |
+
<div placeholder="<?php echo $placeholder; ?>" class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear', $this->textdomain);?></div>
|
402 |
<div class="error-mgs"></div>
|
403 |
</div>
|
404 |
|
478 |
?>
|
479 |
</div>
|
480 |
<input type="text" placeholder="<?php echo $placeholder; ?>" name="<?php echo $field_name; ?>" id="media_input_<?php echo $css_id; ?>" value="<?php echo $value; ?>" />
|
481 |
+
<div class="media-upload button" id="media_upload_<?php echo $css_id; ?>"><?php echo __('Upload', $this->textdomain);?></div>
|
482 |
<div class="clear button" id="media_clear_<?php echo $css_id; ?>"><?php echo __('Clear','accordions');?></div>
|
483 |
<div class="error-mgs"></div>
|
484 |
</div>
|
596 |
//var_dump($index);
|
597 |
|
598 |
?>
|
599 |
+
<div class="item-wrap <?php if($collapsible) echo 'collapsible'; ?>" index="<?php echo $index; ?>">
|
600 |
<?php if($collapsible):?>
|
601 |
<div class="header">
|
602 |
<?php endif; ?>
|
856 |
?>
|
857 |
<div id="input-wrapper-<?php echo $id; ?>" class="input-wrapper input-text-multi-wrapper
|
858 |
input-text-multi-wrapper-<?php echo $css_id; ?>">
|
859 |
+
<span data-placeholder="<?php echo esc_attr($placeholder); ?>" data-sort="<?php echo $sortable; ?>" data-clone="<?php echo $allow_clone; ?>" data-name="<?php echo $field_name; ?>[]" class="button add-item"><?php echo __('Add', $this->textdomain); ?></span>
|
860 |
<div class="field-list <?php if($sortable){ echo 'sortable'; }?>" id="<?php echo $css_id; ?>">
|
861 |
<?php
|
862 |
if(!empty($values)):
|
1262 |
|
1263 |
$field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
|
1264 |
|
1265 |
+
$settings = wp_enqueue_code_editor( array( 'type' => 'text/javascript' ) );
|
1266 |
+
$code_editor = wp_json_encode( $settings );
|
1267 |
+
|
1268 |
|
1269 |
ob_start();
|
1270 |
?>
|
1272 |
|
1273 |
<script>
|
1274 |
jQuery(document).ready(function($){
|
1275 |
+
wp.codeEditor.initialize($('#<?php echo $css_id; ?>'), <?php echo $code_editor; ?>);
|
|
|
|
|
|
|
1276 |
})
|
1277 |
</script>
|
1278 |
<?php
|
1305 |
$title = isset( $option['title'] ) ? $option['title'] : "";
|
1306 |
$details = isset( $option['details'] ) ? $option['details'] : "";
|
1307 |
|
1308 |
+
$settings = wp_enqueue_code_editor( array( 'type' => 'text/css' ) );
|
1309 |
+
$code_editor = wp_json_encode( $settings );
|
1310 |
|
1311 |
$field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
|
1312 |
?>
|
1321 |
|
1322 |
jQuery(document).ready(function($){
|
1323 |
|
1324 |
+
wp.codeEditor.initialize($('#<?php echo $css_id; ?>'), <?php echo $code_editor; ?>);
|
1325 |
|
1326 |
|
1327 |
})
|
includes/functions-data-upgrade.php
CHANGED
@@ -81,6 +81,8 @@ function accordions_cron_upgrade_accordions(){
|
|
81 |
$accordions_title = get_the_title();
|
82 |
$accordions_options = array();
|
83 |
|
|
|
|
|
84 |
//echo $accordions_title.'<br/>';
|
85 |
|
86 |
$accordions_lazy_load = get_post_meta( $accordions_id, 'accordions_lazy_load', true );
|
@@ -339,8 +341,11 @@ function accordions_cron_upgrade_accordions(){
|
|
339 |
|
340 |
|
341 |
|
|
|
|
|
|
|
|
|
342 |
|
343 |
-
update_post_meta($accordions_id, 'accordions_options', $accordions_options);
|
344 |
update_post_meta($accordions_id, 'accordions_upgrade_status', 'done');
|
345 |
|
346 |
|
81 |
$accordions_title = get_the_title();
|
82 |
$accordions_options = array();
|
83 |
|
84 |
+
$accordions_options_is_saved = get_post_meta( $accordions_id, 'accordions_options', true );
|
85 |
+
|
86 |
//echo $accordions_title.'<br/>';
|
87 |
|
88 |
$accordions_lazy_load = get_post_meta( $accordions_id, 'accordions_lazy_load', true );
|
341 |
|
342 |
|
343 |
|
344 |
+
if(empty($accordions_options_is_saved)){
|
345 |
+
update_post_meta($accordions_id, 'accordions_options', $accordions_options);
|
346 |
+
}
|
347 |
+
|
348 |
|
|
|
349 |
update_post_meta($accordions_id, 'accordions_upgrade_status', 'done');
|
350 |
|
351 |
|
includes/functions.php
CHANGED
@@ -48,6 +48,271 @@ function accordions_old_content($post_id){
|
|
48 |
|
49 |
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
//add_filter('the_content','accordions_get_shortcode');
|
53 |
function accordions_get_shortcode($content){
|
48 |
|
49 |
|
50 |
|
51 |
+
function accordions_old_options($accordions_id){
|
52 |
+
|
53 |
+
|
54 |
+
$accordions_lazy_load = get_post_meta( $accordions_id, 'accordions_lazy_load', true );
|
55 |
+
$accordions_options['lazy_load'] = $accordions_lazy_load;
|
56 |
+
|
57 |
+
$accordions_lazy_load_src = get_post_meta( $accordions_id, 'accordions_lazy_load_src', true );
|
58 |
+
$accordions_options['lazy_load_src'] = $accordions_lazy_load_src;
|
59 |
+
|
60 |
+
$accordions_hide_edit = get_post_meta( $accordions_id, 'accordions_hide_edit', true );
|
61 |
+
$accordions_options['hide_edit'] = $accordions_hide_edit;
|
62 |
+
|
63 |
+
$accordions_collapsible = get_post_meta( $accordions_id, 'accordions_collapsible', true );
|
64 |
+
$accordions_options['accordion']['collapsible'] = $accordions_collapsible;
|
65 |
+
|
66 |
+
$accordions_expaned_other = get_post_meta( $accordions_id, 'accordions_expaned_other', true );
|
67 |
+
$accordions_options['accordion']['expanded_other'] = $accordions_expaned_other;
|
68 |
+
|
69 |
+
$accordions_heightStyle = get_post_meta( $accordions_id, 'accordions_heightStyle', true );
|
70 |
+
$accordions_options['accordion']['height_style'] = $accordions_heightStyle;
|
71 |
+
|
72 |
+
$accordions_active_event = get_post_meta( $accordions_id, 'accordions_active_event', true );
|
73 |
+
$accordions_options['accordion']['active_event'] = $accordions_active_event;
|
74 |
+
|
75 |
+
$enable_search = get_post_meta( $accordions_id, 'enable_search', true );
|
76 |
+
$accordions_options['accordion']['enable_search'] = $enable_search;
|
77 |
+
|
78 |
+
$search_placeholder_text = get_post_meta( $accordions_id, 'search_placeholder_text', true );
|
79 |
+
$accordions_options['accordion']['search_placeholder_text'] = $search_placeholder_text;
|
80 |
+
|
81 |
+
$accordions_click_scroll_top = get_post_meta( $accordions_id, 'accordions_click_scroll_top', true );
|
82 |
+
$accordions_options['accordion']['click_scroll_top'] = $accordions_click_scroll_top;
|
83 |
+
|
84 |
+
$accordions_click_scroll_top_offset = get_post_meta( $accordions_id, 'accordions_click_scroll_top_offset', true );
|
85 |
+
$accordions_options['accordion']['click_scroll_top_offset'] = $accordions_click_scroll_top_offset;
|
86 |
+
|
87 |
+
$accordions_header_toggle = get_post_meta( $accordions_id, 'accordions_header_toggle', true );
|
88 |
+
$accordions_options['accordion']['header_toggle'] = $accordions_header_toggle;
|
89 |
+
|
90 |
+
$accordions_animate_style = get_post_meta( $accordions_id, 'accordions_animate_style', true );
|
91 |
+
$accordions_options['accordion']['animate_style'] = $accordions_animate_style;
|
92 |
+
|
93 |
+
$accordions_animate_delay = get_post_meta( $accordions_id, 'accordions_animate_delay', true );
|
94 |
+
$accordions_options['accordion']['animate_delay'] = $accordions_animate_delay;
|
95 |
+
|
96 |
+
$accordions_expand_collapse_display = get_post_meta( $accordions_id, 'accordions_expand_collapse_display', true );
|
97 |
+
$accordions_options['accordion']['expand_collapse_display'] = $accordions_expand_collapse_display;
|
98 |
+
|
99 |
+
$expand_collapse_bg_color = get_post_meta( $accordions_id, 'expand_collapse_bg_color', true );
|
100 |
+
$accordions_options['accordion']['expand_collapse_bg_color'] = $expand_collapse_bg_color;
|
101 |
+
|
102 |
+
$expand_collapse_text = get_post_meta( $accordions_id, 'expand_collapse_text', true );
|
103 |
+
$accordions_options['accordion']['expand_collapse_text'] = $expand_collapse_text;
|
104 |
+
|
105 |
+
$accordions_child = get_post_meta( $accordions_id, 'accordions_child', true );
|
106 |
+
$accordions_options['accordion']['is_child'] = $accordions_child;
|
107 |
+
|
108 |
+
|
109 |
+
$accordions_click_track = get_post_meta($accordions_id,'accordions_click_track', true);
|
110 |
+
$accordions_options['enable_stats'] = $accordions_click_track;
|
111 |
+
|
112 |
+
|
113 |
+
$accordions_tabs_collapsible = get_post_meta( $accordions_id, 'accordions_tabs_collapsible', true );
|
114 |
+
$accordions_options['tabs']['collapsible'] = $accordions_tabs_collapsible;
|
115 |
+
|
116 |
+
$accordions_tabs_active_event = get_post_meta( $accordions_id, 'accordions_tabs_active_event', true );
|
117 |
+
$accordions_options['tabs']['active_event'] = $accordions_tabs_active_event;
|
118 |
+
|
119 |
+
$accordions_tabs_vertical = get_post_meta( $accordions_id, 'accordions_tabs_vertical', true );
|
120 |
+
$accordions_options['tabs']['tabs_vertical'] = $accordions_tabs_vertical;
|
121 |
+
|
122 |
+
$accordions_tabs_vertical_width_ratio = get_post_meta( $accordions_id, 'accordions_tabs_vertical_width_ratio', true );
|
123 |
+
$accordions_options['tabs']['navs_width_ratio'] = $accordions_tabs_vertical_width_ratio;
|
124 |
+
|
125 |
+
$accordions_tabs_icon_toggle = get_post_meta( $accordions_id, 'accordions_tabs_icon_toggle', true );
|
126 |
+
$accordions_options['tabs']['tabs_icon_toggle'] = $accordions_tabs_icon_toggle;
|
127 |
+
|
128 |
+
$accordions_icons_plus = get_post_meta( $accordions_id, 'accordions_icons_plus', true );
|
129 |
+
$accordions_icons_minus = get_post_meta( $accordions_id, 'accordions_icons_minus', true );
|
130 |
+
|
131 |
+
$accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa '.$accordions_icons_plus.'"></i>' : '';
|
132 |
+
$accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa '.$accordions_icons_minus.'"></i>' : '';
|
133 |
+
|
134 |
+
$accordions_options['icon']['active'] = $accordions_icons_plus;
|
135 |
+
$accordions_options['icon']['inactive'] = $accordions_icons_minus;
|
136 |
+
|
137 |
+
$accordions_icons_position = get_post_meta( $accordions_id, 'accordions_icons_position', true );
|
138 |
+
$accordions_options['icon']['position'] = $accordions_icons_position;
|
139 |
+
|
140 |
+
$accordions_icons_color = get_post_meta( $accordions_id, 'accordions_icons_color', true );
|
141 |
+
$accordions_options['icon']['color'] = $accordions_icons_color;
|
142 |
+
|
143 |
+
$accordions_icons_color_hover = get_post_meta( $accordions_id, 'accordions_icons_color_hover', true );
|
144 |
+
$accordions_options['icon']['color_hover'] = $accordions_icons_color_hover;
|
145 |
+
|
146 |
+
$accordions_icons_font_size = get_post_meta( $accordions_id, 'accordions_icons_font_size', true );
|
147 |
+
$accordions_options['icon']['font_size'] = $accordions_icons_font_size;
|
148 |
+
|
149 |
+
$accordions_icons_bg_color = get_post_meta( $accordions_id, 'accordions_icons_bg_color', true );
|
150 |
+
$accordions_options['icon']['background_color'] = $accordions_icons_bg_color;
|
151 |
+
|
152 |
+
$accordions_icons_padding = get_post_meta( $accordions_id, 'accordions_icons_padding', true );
|
153 |
+
$accordions_options['icon']['padding'] = $accordions_icons_padding;
|
154 |
+
|
155 |
+
$accordions_themes = get_post_meta( $accordions_id, 'accordions_themes', true );
|
156 |
+
$accordions_options['accordion']['theme'] = $accordions_themes;
|
157 |
+
|
158 |
+
$header_class = 'border-none';
|
159 |
+
|
160 |
+
if($accordions_themes == 'flat'){
|
161 |
+
$header_class = 'border-none';
|
162 |
+
}elseif($accordions_themes == 'rounded'){
|
163 |
+
$header_class = 'border-round';
|
164 |
+
}elseif($accordions_themes == 'semi-rounded'){
|
165 |
+
$header_class = 'border-semi-round';
|
166 |
+
}elseif($accordions_themes == 'rounded-top'){
|
167 |
+
$header_class = 'border-top-round';
|
168 |
+
}elseif($accordions_themes == 'shadow'){
|
169 |
+
$header_class = 'shadow-bottom';
|
170 |
+
}
|
171 |
+
|
172 |
+
|
173 |
+
|
174 |
+
$accordions_options['header']['class'] = $header_class;
|
175 |
+
|
176 |
+
$accordions_active_bg_color = get_post_meta( $accordions_id, 'accordions_active_bg_color', true );
|
177 |
+
$accordions_options['header']['active_background_color'] = $accordions_active_bg_color;
|
178 |
+
|
179 |
+
$accordions_default_bg_color = get_post_meta( $accordions_id, 'accordions_default_bg_color', true );
|
180 |
+
$accordions_options['header']['background_color'] = $accordions_default_bg_color;
|
181 |
+
|
182 |
+
$accordions_header_bg_opacity = get_post_meta( $accordions_id, 'accordions_header_bg_opacity', true );
|
183 |
+
$accordions_options['header']['background_opacity'] = $accordions_header_bg_opacity;
|
184 |
+
|
185 |
+
$accordions_items_title_color = get_post_meta( $accordions_id, 'accordions_items_title_color', true );
|
186 |
+
$accordions_options['header']['color'] = $accordions_items_title_color;
|
187 |
+
|
188 |
+
$accordions_items_title_color_hover = get_post_meta( $accordions_id, 'accordions_items_title_color_hover', true );
|
189 |
+
$accordions_options['header']['color_hover'] = $accordions_items_title_color_hover;
|
190 |
+
|
191 |
+
$accordions_items_title_font_size = get_post_meta( $accordions_id, 'accordions_items_title_font_size', true );
|
192 |
+
$accordions_options['header']['font_size'] = $accordions_items_title_font_size;
|
193 |
+
|
194 |
+
$accordions_items_title_font_family = get_post_meta( $accordions_id, 'accordions_items_title_font_family', true );
|
195 |
+
$accordions_options['header']['font_family'] = $accordions_items_title_font_family;
|
196 |
+
|
197 |
+
$accordions_items_title_padding = get_post_meta( $accordions_id, 'accordions_items_title_padding', true );
|
198 |
+
$accordions_options['header']['padding'] = $accordions_items_title_padding;
|
199 |
+
|
200 |
+
$accordions_items_title_margin = get_post_meta( $accordions_id, 'accordions_items_title_margin', true );
|
201 |
+
$accordions_options['header']['margin'] = $accordions_items_title_margin;
|
202 |
+
|
203 |
+
$body_class = '';
|
204 |
+
$accordions_options['body']['class'] = $body_class;
|
205 |
+
|
206 |
+
$accordions_active_bg_color = get_post_meta( $accordions_id, 'accordions_active_bg_color', true );
|
207 |
+
$accordions_options['body']['active_background_color'] = $accordions_active_bg_color;
|
208 |
+
|
209 |
+
$accordions_items_content_bg_color = get_post_meta( $accordions_id, 'accordions_items_content_bg_color', true );
|
210 |
+
$accordions_options['body']['background_color'] = $accordions_items_content_bg_color;
|
211 |
+
|
212 |
+
$accordions_items_content_bg_opacity = get_post_meta( $accordions_id, 'accordions_items_content_bg_opacity', true );
|
213 |
+
$accordions_options['body']['background_opacity'] = $accordions_items_content_bg_opacity;
|
214 |
+
|
215 |
+
$accordions_items_content_color = get_post_meta( $accordions_id, 'accordions_items_content_color', true );
|
216 |
+
$accordions_options['body']['color'] = $accordions_items_content_color;
|
217 |
+
|
218 |
+
|
219 |
+
|
220 |
+
$accordions_items_content_font_size = get_post_meta( $accordions_id, 'accordions_items_content_font_size', true );
|
221 |
+
$accordions_options['body']['font_size'] = $accordions_items_content_font_size;
|
222 |
+
|
223 |
+
$accordions_items_content_font_family = get_post_meta( $accordions_id, 'accordions_items_content_font_family', true );
|
224 |
+
$accordions_options['body']['font_family'] = $accordions_items_content_font_family;
|
225 |
+
|
226 |
+
|
227 |
+
$accordions_items_content_padding = get_post_meta( $accordions_id, 'accordions_items_content_padding', true );
|
228 |
+
$accordions_options['body']['padding'] = $accordions_items_content_padding;
|
229 |
+
|
230 |
+
$accordions_items_content_margin = get_post_meta( $accordions_id, 'accordions_items_content_margin', true );
|
231 |
+
$accordions_options['body']['margin'] = $accordions_items_content_margin;
|
232 |
+
|
233 |
+
|
234 |
+
//Container options
|
235 |
+
$accordions_container_padding = get_post_meta( $accordions_id, 'accordions_container_padding', true );
|
236 |
+
$accordions_options['container']['padding'] = $accordions_container_padding;
|
237 |
+
|
238 |
+
$accordions_container_bg_color = get_post_meta( $accordions_id, 'accordions_container_bg_color', true );
|
239 |
+
$accordions_options['container']['background_color'] = $accordions_container_bg_color;
|
240 |
+
|
241 |
+
$accordions_items_content_bg_opacity = get_post_meta( $accordions_id, 'accordions_items_content_bg_opacity', true );
|
242 |
+
$accordions_options['container']['background_opacity'] = $accordions_items_content_bg_opacity;
|
243 |
+
|
244 |
+
$accordions_bg_img = get_post_meta( $accordions_id, 'accordions_bg_img', true );
|
245 |
+
$accordions_options['container']['background_img'] = $accordions_bg_img;
|
246 |
+
|
247 |
+
$accordions_container_text_align = get_post_meta( $accordions_id, 'accordions_container_text_align', true );
|
248 |
+
$accordions_options['container']['text_align'] = $accordions_container_text_align;
|
249 |
+
|
250 |
+
$accordions_width = get_post_meta( $accordions_id, 'accordions_width', true );
|
251 |
+
$accordions_width_large = !empty($accordions_width['large']) ? $accordions_width['large'] : '100%';
|
252 |
+
$accordions_width_medium = !empty($accordions_width['medium']) ? $accordions_width['medium'] : '100%';
|
253 |
+
$accordions_width_small = !empty($accordions_width['small']) ? $accordions_width['small'] : '100%';
|
254 |
+
|
255 |
+
$accordions_options['container']['width_large'] = $accordions_width_large;
|
256 |
+
$accordions_options['container']['width_medium'] = $accordions_width_medium;
|
257 |
+
$accordions_options['container']['width_small'] = $accordions_width_small;
|
258 |
+
|
259 |
+
|
260 |
+
// Custom Scripts
|
261 |
+
$accordions_custom_css = get_post_meta($accordions_id,'accordions_custom_css', true);
|
262 |
+
$accordions_options['custom_scripts']['custom_css'] = $accordions_custom_css;
|
263 |
+
|
264 |
+
$accordions_custom_js = get_post_meta($accordions_id,'accordions_custom_js', true);
|
265 |
+
$accordions_options['custom_scripts']['custom_js'] = $accordions_custom_js;
|
266 |
+
|
267 |
+
|
268 |
+
$track_header = get_post_meta($accordions_id, 'track_header', true);
|
269 |
+
$accordions_options['track_header'] = $track_header;
|
270 |
+
|
271 |
+
$accordions_content_title = get_post_meta($accordions_id,'accordions_content_title', true);
|
272 |
+
$accordions_content_body = get_post_meta($accordions_id,'accordions_content_body', true);
|
273 |
+
$accordions_content_title_toggled = get_post_meta($accordions_id,'accordions_content_title_toggled', true);
|
274 |
+
$accordions_section_icon_plus = get_post_meta($accordions_id,'accordions_section_icon_plus', true);
|
275 |
+
$accordions_section_icon_minus = get_post_meta($accordions_id,'accordions_section_icon_minus', true);
|
276 |
+
$accordions_hide = get_post_meta($accordions_id,'accordions_hide', true);
|
277 |
+
$accordions_bg_color = get_post_meta($accordions_id,'accordions_bg_color', true);
|
278 |
+
$accordions_header_bg_img = get_post_meta($accordions_id,'accordions_header_bg_img', true);
|
279 |
+
|
280 |
+
$accordions_active_accordion = get_post_meta($accordions_id,'accordions_active_accordion', true);
|
281 |
+
|
282 |
+
$i = 0;
|
283 |
+
|
284 |
+
if(!empty($accordions_content_title))
|
285 |
+
foreach ($accordions_content_title as $index => $title){
|
286 |
+
|
287 |
+
$accordions_options['content'][$index]['header'] = $title;
|
288 |
+
$accordions_options['content'][$index]['body'] = isset($accordions_content_body[$index]) ? $accordions_content_body[$index] : '';
|
289 |
+
$accordions_options['content'][$index]['hide'] = isset($accordions_hide[$index]) ? $accordions_hide[$index] : '';
|
290 |
+
$accordions_options['content'][$index]['toggled_text'] = isset($accordions_content_title_toggled[$index]) ? $accordions_content_title_toggled[$index] : '';
|
291 |
+
|
292 |
+
$accordions_options['content'][$index]['is_active'] = ($accordions_active_accordion == $i) ? 'yes' : 'no';
|
293 |
+
|
294 |
+
|
295 |
+
$active_icon = !empty($accordions_section_icon_plus[$index]) ? '<i class="fa '.$accordions_section_icon_plus[$index].'"></i>' : '';
|
296 |
+
$inactive_icon = !empty($accordions_section_icon_minus[$index]) ? '<i class="fa '.$accordions_section_icon_minus[$index].'"></i>' : '';
|
297 |
+
|
298 |
+
$accordions_options['content'][$index]['active_icon'] = $active_icon;
|
299 |
+
$accordions_options['content'][$index]['inactive_icon'] = $inactive_icon;
|
300 |
+
|
301 |
+
$accordions_options['content'][$index]['background_color'] = isset($accordions_bg_color[$index]) ? $accordions_bg_color[$index] : '';
|
302 |
+
$accordions_options['content'][$index]['background_img'] = isset($accordions_header_bg_img[$index]) ? $accordions_header_bg_img[$index] : '';
|
303 |
+
|
304 |
+
$i++;
|
305 |
+
}
|
306 |
+
|
307 |
+
|
308 |
+
return $accordions_options;
|
309 |
+
|
310 |
+
}
|
311 |
+
|
312 |
+
|
313 |
+
|
314 |
+
|
315 |
+
|
316 |
|
317 |
//add_filter('the_content','accordions_get_shortcode');
|
318 |
function accordions_get_shortcode($content){
|
includes/menu/settings.php
CHANGED
@@ -43,18 +43,6 @@ foreach ($accordions_settings_tab as $page_key => $tab) $tabs_sorted[$page_key]
|
|
43 |
array_multisort($tabs_sorted, SORT_ASC, $accordions_settings_tab);
|
44 |
|
45 |
|
46 |
-
wp_enqueue_script('jquery');
|
47 |
-
wp_enqueue_script('jquery-ui-sortable');
|
48 |
-
wp_enqueue_script( 'jquery-ui-core' );
|
49 |
-
wp_enqueue_script('jquery-ui-accordion');
|
50 |
-
wp_enqueue_style( 'wp-color-picker' );
|
51 |
-
wp_enqueue_script('wp-color-picker');
|
52 |
-
wp_enqueue_style('font-awesome-5');
|
53 |
-
wp_enqueue_style('settings-tabs');
|
54 |
-
wp_enqueue_script('settings-tabs');
|
55 |
-
|
56 |
-
wp_enqueue_style('codemirror');
|
57 |
-
wp_enqueue_script('codemirror');
|
58 |
|
59 |
$accordions_settings = get_option('accordions_settings');
|
60 |
|
43 |
array_multisort($tabs_sorted, SORT_ASC, $accordions_settings_tab);
|
44 |
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
$accordions_settings = get_option('accordions_settings');
|
48 |
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
Donate link: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
4 |
Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
|
5 |
Requires at least: 3.8
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -139,6 +139,13 @@ then paste this shortcode anywhere in your page to display accordions<br />
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
= 2.2.11=
|
143 |
* 2020-03-19 - fix - display old content if data migration not completed
|
144 |
|
3 |
Donate link: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
4 |
Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
|
5 |
Requires at least: 3.8
|
6 |
+
Tested up to: 5.4
|
7 |
+
Stable tag: 2.2.12
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 2.2.12=
|
143 |
+
* 2020-04-01 - fix - default font-awesome version set to 5+ if not set.
|
144 |
+
* 2020-04-01 - fix - load old data and option if data migration not completed.
|
145 |
+
* 2020-04-01 - fix - codemirror issue fixed.
|
146 |
+
|
147 |
+
|
148 |
+
|
149 |
= 2.2.11=
|
150 |
* 2020-03-19 - fix - display old content if data migration not completed
|
151 |
|
templates/accordion/accordion-hook.php
CHANGED
@@ -7,6 +7,9 @@ function accordions_main_top($atts){
|
|
7 |
|
8 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
9 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
10 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
11 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
12 |
|
@@ -42,6 +45,8 @@ function accordions_main_style($atts){
|
|
42 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
43 |
|
44 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
45 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
46 |
|
47 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
@@ -92,7 +97,7 @@ function accordions_main_style($atts){
|
|
92 |
$custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
|
93 |
|
94 |
$accordions_settings = get_option('accordions_settings');
|
95 |
-
$font_aw_version = isset($accordions_settings['font_aw_version']) ? $accordions_settings['font_aw_version'] : '
|
96 |
|
97 |
|
98 |
wp_enqueue_style('accordions-style');
|
@@ -286,6 +291,9 @@ function accordions_main_items($atts){
|
|
286 |
|
287 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
288 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
289 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
290 |
$enable_shortcode = isset($accordions_options['enable_shortcode']) ? $accordions_options['enable_shortcode'] : 'yes';
|
291 |
$enable_wpautop = isset($accordions_options['enable_wpautop']) ? $accordions_options['enable_wpautop'] : 'yes';
|
@@ -309,16 +317,6 @@ function accordions_main_items($atts){
|
|
309 |
|
310 |
|
311 |
|
312 |
-
|
313 |
-
if(empty($accordions_content)){
|
314 |
-
|
315 |
-
$accordions_content = accordions_old_content($post_id);
|
316 |
-
//var_dump($accordions_content);
|
317 |
-
|
318 |
-
}
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
$active_index = array();
|
323 |
?>
|
324 |
<div class="items">
|
@@ -329,93 +327,93 @@ function accordions_main_items($atts){
|
|
329 |
|
330 |
$item_count = 0;
|
331 |
|
332 |
-
|
333 |
|
334 |
-
|
335 |
|
336 |
-
|
337 |
|
338 |
|
339 |
-
|
340 |
-
|
341 |
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
|
347 |
|
348 |
-
|
349 |
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
|
354 |
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
|
|
360 |
}
|
361 |
-
}
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
-
|
367 |
|
368 |
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
|
382 |
|
383 |
-
|
384 |
-
|
385 |
|
386 |
-
<?php
|
387 |
-
if($icon_position == 'left'):
|
388 |
-
?>
|
389 |
-
<span id="accordion-icons-<?php echo $index; ?>" class="accordion-icons">
|
390 |
-
<span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
|
391 |
-
<span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
|
392 |
-
</span>
|
393 |
-
<span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
|
394 |
<?php
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
<?php
|
403 |
-
|
404 |
?>
|
405 |
-
<span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
|
406 |
-
<?php
|
407 |
-
endif;
|
408 |
-
?>
|
409 |
|
410 |
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
else:
|
420 |
|
421 |
do_action('accordions_main_no_content', $post_id);
|
@@ -500,6 +498,8 @@ function accordions_main_edit_link($atts){
|
|
500 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
501 |
|
502 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
|
|
|
|
503 |
$hide_edit = isset($accordions_options['hide_edit']) ? $accordions_options['hide_edit'] : 'yes';
|
504 |
|
505 |
|
@@ -530,6 +530,9 @@ function accordions_main_scripts($atts){
|
|
530 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
531 |
|
532 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
533 |
$accordion = isset($accordions_options['accordion']) ? $accordions_options['accordion'] : array();
|
534 |
$collapsible = !empty($accordion['collapsible']) ? $accordion['collapsible'] : 'true';
|
535 |
$height_style = isset($accordion['height_style']) ? $accordion['height_style'] : 'content';
|
7 |
|
8 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
9 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
10 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
11 |
+
|
12 |
+
|
13 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
14 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
15 |
|
45 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
46 |
|
47 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
48 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
49 |
+
|
50 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
51 |
|
52 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
97 |
$custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
|
98 |
|
99 |
$accordions_settings = get_option('accordions_settings');
|
100 |
+
$font_aw_version = isset($accordions_settings['font_aw_version']) ? $accordions_settings['font_aw_version'] : 'v_5';
|
101 |
|
102 |
|
103 |
wp_enqueue_style('accordions-style');
|
291 |
|
292 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
293 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
294 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
295 |
+
|
296 |
+
|
297 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
298 |
$enable_shortcode = isset($accordions_options['enable_shortcode']) ? $accordions_options['enable_shortcode'] : 'yes';
|
299 |
$enable_wpautop = isset($accordions_options['enable_wpautop']) ? $accordions_options['enable_wpautop'] : 'yes';
|
317 |
|
318 |
|
319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
$active_index = array();
|
321 |
?>
|
322 |
<div class="items">
|
327 |
|
328 |
$item_count = 0;
|
329 |
|
330 |
+
foreach ($accordions_content as $index => $accordion){
|
331 |
|
332 |
+
$accordion_hide = isset($accordion['hide']) ? $accordion['hide'] : '';
|
333 |
|
334 |
+
if($accordion_hide == 'true') continue;
|
335 |
|
336 |
|
337 |
+
$accordion_header = isset($accordion['header']) ? $accordion['header'] : '';
|
338 |
+
$accordion_body = isset($accordion['body']) ? $accordion['body'] : '';
|
339 |
|
340 |
+
$accordion_is_active = isset($accordion['is_active']) ? $accordion['is_active'] : '';
|
341 |
+
$toggled_text = isset($accordion['toggled_text']) ? $accordion['toggled_text'] : '';
|
342 |
+
$active_icon = !empty($accordion['active_icon']) ? $accordion['active_icon'] : $icon_active;
|
343 |
+
$inactive_icon = !empty($accordion['inactive_icon']) ? $accordion['inactive_icon'] : $icon_inactive;
|
344 |
|
345 |
|
346 |
+
$accordion_header = apply_filters( 'accordions_item_header', $accordion_header, $post_id );
|
347 |
|
348 |
+
if(($accordion_is_active =='yes')){
|
349 |
+
$active_index[$index] = $item_count;
|
350 |
+
}
|
351 |
|
352 |
|
353 |
+
if(!in_array( 'accordions-pro/accordions-pro.php', (array) $active_plugins )){
|
354 |
+
if(has_shortcode($accordion_body, 'accordions') || has_shortcode($accordion_body, 'accordions_pickplguins') || has_shortcode($accordion_body, 'accordions_pplugins') ){
|
355 |
+
$accordion_body = str_replace('[accordions','**<a target="_blank" href="https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=wordpress.org"> <strong>Please buy pro to create nested accordion</strong></a>**', $accordion_body);
|
356 |
+
$accordion_body = str_replace('[accordions_pickplguins','**<a target="_blank" href="https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=wordpress.org"> <strong>Please buy pro to create nested accordion</strong></a>**', $accordion_body);
|
357 |
+
$accordion_body = str_replace('[accordions_pplugins','**<a target="_blank" href="https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=wordpress.org"> <strong>Please buy pro to create nested accordion</strong></a>**', $accordion_body);
|
358 |
+
}
|
359 |
}
|
|
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
+
$accordion_body = apply_filters( 'accordions_item_body', $accordion_body, $post_id );
|
365 |
|
366 |
|
367 |
+
if($enable_autoembed =='yes'){
|
368 |
+
$WP_Embed = new WP_Embed();
|
369 |
+
$accordion_body = $WP_Embed->autoembed( $accordion_body);
|
370 |
+
}
|
371 |
|
372 |
+
if($enable_wpautop =='yes'){
|
373 |
+
$accordion_body = wpautop($accordion_body);
|
374 |
+
}
|
375 |
|
376 |
+
if($enable_shortcode =='yes'){
|
377 |
+
$accordion_body = do_shortcode($accordion_body);
|
378 |
+
}
|
379 |
|
380 |
|
381 |
+
?>
|
382 |
+
<div post_id="<?php echo $post_id; ?>" header_id="header-<?php echo $index; ?>" id="header-<?php echo $index; ?>" style="" class="accordions-head head<?php echo $index; ?> <?php echo $header_class; ?>" toggle-text="<?php echo do_shortcode(esc_attr($toggled_text)); ?>" main-text="<?php echo do_shortcode(esc_attr($accordion_header)); ?>">
|
383 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
<?php
|
385 |
+
if($icon_position == 'left'):
|
386 |
+
?>
|
387 |
+
<span id="accordion-icons-<?php echo $index; ?>" class="accordion-icons">
|
388 |
+
<span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
|
389 |
+
<span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
|
390 |
+
</span>
|
391 |
+
<span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
|
392 |
+
<?php
|
393 |
+
elseif ($icon_position == 'right'):
|
394 |
+
?>
|
395 |
+
<span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
|
396 |
+
<span id="accordion-icons-<?php echo $index; ?>" class="accordion-icons">
|
397 |
+
<span class="accordion-icon-active accordion-plus"><?php echo $active_icon; ?></span>
|
398 |
+
<span class="accordion-icon-inactive accordion-minus"><?php echo $inactive_icon; ?></span>
|
399 |
+
</span>
|
400 |
+
<?php
|
401 |
+
else:
|
402 |
+
?>
|
403 |
+
<span id="header-text-<?php echo $index; ?>" class="accordions-head-title"><?php echo do_shortcode($accordion_header); ?></span>
|
404 |
<?php
|
405 |
+
endif;
|
406 |
?>
|
|
|
|
|
|
|
|
|
407 |
|
408 |
|
409 |
+
</div>
|
410 |
+
<div class="accordion-content content<?php echo $index; ?> <?php echo $body_class; ?>">
|
411 |
+
<?php echo $accordion_body; ?>
|
412 |
+
</div>
|
413 |
|
414 |
+
<?php
|
415 |
+
$item_count++;
|
416 |
+
}
|
417 |
else:
|
418 |
|
419 |
do_action('accordions_main_no_content', $post_id);
|
498 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
499 |
|
500 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
501 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
502 |
+
|
503 |
$hide_edit = isset($accordions_options['hide_edit']) ? $accordions_options['hide_edit'] : 'yes';
|
504 |
|
505 |
|
530 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
531 |
|
532 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
533 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
534 |
+
|
535 |
+
|
536 |
$accordion = isset($accordions_options['accordion']) ? $accordions_options['accordion'] : array();
|
537 |
$collapsible = !empty($accordion['collapsible']) ? $accordion['collapsible'] : 'true';
|
538 |
$height_style = isset($accordion['height_style']) ? $accordion['height_style'] : 'content';
|
templates/tabs/tabs-hook.php
CHANGED
@@ -7,6 +7,9 @@ function accordions_tabs_main_top($atts){
|
|
7 |
|
8 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
9 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
10 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
11 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
12 |
|
@@ -40,6 +43,9 @@ function accordions_tabs_main_style($atts){
|
|
40 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
41 |
|
42 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
43 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
44 |
|
45 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
@@ -309,6 +315,9 @@ function accordions_tabs_main_items($atts){
|
|
309 |
|
310 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
311 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
|
|
|
|
312 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
313 |
$enable_shortcode = isset($accordions_options['enable_shortcode']) ? $accordions_options['enable_shortcode'] : 'yes';
|
314 |
$enable_wpautop = isset($accordions_options['enable_wpautop']) ? $accordions_options['enable_wpautop'] : 'yes';
|
@@ -500,6 +509,9 @@ function accordions_tabs_main_edit_link($atts){
|
|
500 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
501 |
|
502 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
|
|
|
|
|
|
503 |
$hide_edit = isset($accordions_options['hide_edit']) ? $accordions_options['hide_edit'] : 'yes';
|
504 |
|
505 |
|
@@ -530,6 +542,7 @@ function accordions_tabs_main_scripts($atts){
|
|
530 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
531 |
|
532 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
|
|
533 |
|
534 |
$custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
|
535 |
$custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
|
7 |
|
8 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
9 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
10 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
11 |
+
|
12 |
+
|
13 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
14 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
15 |
|
43 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
44 |
|
45 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
46 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
47 |
+
|
48 |
+
|
49 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
50 |
|
51 |
$lazy_load = isset($accordions_options['lazy_load']) ? $accordions_options['lazy_load'] : 'yes';
|
315 |
|
316 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
317 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
318 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
319 |
+
|
320 |
+
|
321 |
$accordions_content = isset($accordions_options['content']) ? $accordions_options['content'] : array();
|
322 |
$enable_shortcode = isset($accordions_options['enable_shortcode']) ? $accordions_options['enable_shortcode'] : 'yes';
|
323 |
$enable_wpautop = isset($accordions_options['enable_wpautop']) ? $accordions_options['enable_wpautop'] : 'yes';
|
509 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
510 |
|
511 |
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
512 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
513 |
+
|
514 |
+
|
515 |
$hide_edit = isset($accordions_options['hide_edit']) ? $accordions_options['hide_edit'] : 'yes';
|
516 |
|
517 |
|
542 |
$post_id = isset($atts['id']) ? $atts['id'] : '';
|
543 |
|
544 |
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
545 |
+
$accordions_options = !empty($accordions_options) ? $accordions_options : accordions_old_options($post_id);
|
546 |
|
547 |
$custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
|
548 |
$custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
|