Accordion - Version 2.2.4

Version Description

  • 16-03-2020 - fix - font awesome version compatibility issue fixed.
    • 16-03-2020 - add - 3rd party accordion and tabs data import.
Download this release

Release Info

Developer pickplugins
Plugin Icon 128x128 Accordion
Version 2.2.4
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.4

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.2
7
  WC requires at least: 3.0.0
8
  WC tested up to: 3.6
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.2' );
27
  define('accordions_plugin_name', 'Accordions' );
28
  define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
29
 
@@ -57,10 +57,14 @@ class Accordions{
57
  require_once( accordions_plugin_dir . 'templates/accordion/accordion-hook.php');
58
  require_once( accordions_plugin_dir . 'templates/tabs/tabs-hook.php');
59
 
60
- // require_once( accordions_plugin_dir . 'includes/3rd-party/responsive-accordion-and-collapse/functions-data-import.php');
61
- // require_once( accordions_plugin_dir . 'includes/3rd-party/easy-accordion-free/functions-data-import.php');
62
- // require_once( accordions_plugin_dir . 'includes/3rd-party/arconix-faq/functions-data-import.php');
63
- // require_once( accordions_plugin_dir . 'includes/3rd-party/responsive-tabs/functions-data-import.php');
 
 
 
 
64
  //require_once( accordions_plugin_dir . 'includes/3rd-party/vc-tabs/functions-data-import.php');
65
 
66
 
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.4
7
  WC requires at least: 3.0.0
8
  WC tested up to: 3.6
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.4' );
27
  define('accordions_plugin_name', 'Accordions' );
28
  define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
29
 
57
  require_once( accordions_plugin_dir . 'templates/accordion/accordion-hook.php');
58
  require_once( accordions_plugin_dir . 'templates/tabs/tabs-hook.php');
59
 
60
+ //require_once( accordions_plugin_dir . 'includes/3rd-party/arconix-faq/functions-data-import.php');
61
+ require_once( accordions_plugin_dir . 'includes/3rd-party/easy-accordion-free/functions-data-import.php');
62
+ require_once( accordions_plugin_dir . 'includes/3rd-party/responsive-accordion-and-collapse/functions-data-import.php');
63
+ require_once( accordions_plugin_dir . 'includes/3rd-party/responsive-tabs/functions-data-import.php');
64
+ //
65
+ //
66
+ //
67
+ //
68
  //require_once( accordions_plugin_dir . 'includes/3rd-party/vc-tabs/functions-data-import.php');
69
 
70
 
includes/3rd-party/arconix-faq/functions-data-import.php CHANGED
@@ -2,15 +2,12 @@
2
  if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
 
5
-
6
-
7
-
8
-
9
  add_shortcode('accordions_import_cron_arconix_faq', 'accordions_import_cron_arconix_faq');
10
  add_action('accordions_import_cron_arconix_faq', 'accordions_import_cron_arconix_faq');
11
 
12
 
13
  function accordions_import_cron_arconix_faq(){
 
14
 
15
  $meta_query = array();
16
 
@@ -39,14 +36,7 @@ function accordions_import_cron_arconix_faq(){
39
  $post_content = get_the_content();
40
 
41
  $accordions_options = array();
42
-
43
-
44
  //echo '<pre>'.var_export($accordion_content_source, ture).'</pre>';
45
-
46
-
47
-
48
-
49
-
50
  $accordions_icons_plus = 'plus';
51
  $accordions_icons_minus = 'minus';
52
 
@@ -116,14 +106,6 @@ function accordions_import_cron_arconix_faq(){
116
  $accordions_options['accordion']['is_child'] = '';
117
 
118
 
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
  $i = 0;
128
 
129
  if(!empty($accordion_content_source))
@@ -132,22 +114,13 @@ function accordions_import_cron_arconix_faq(){
132
  $accordion_content_title = $accordion_single_data['accordion_content_title'];
133
  $accordion_content_description = $accordion_single_data['accordion_content_description'];
134
 
135
-
136
-
137
-
138
-
139
  $accordions_options['content'][$index]['header'] = $post_title;
140
  $accordions_options['content'][$index]['body'] = $post_content;
141
  $accordions_options['content'][$index]['hide'] = 'no';
142
  $accordions_options['content'][$index]['toggled_text'] = '';
143
-
144
-
145
  $accordions_options['content'][$index]['is_active'] = '';
146
-
147
-
148
  $accordions_options['content'][$index]['active_icon'] = '';
149
  $accordions_options['content'][$index]['inactive_icon'] = '';
150
-
151
  $accordions_options['content'][$index]['background_color'] = '';
152
  $accordions_options['content'][$index]['background_img'] = '';
153
 
@@ -155,8 +128,6 @@ function accordions_import_cron_arconix_faq(){
155
  }
156
 
157
 
158
-
159
-
160
  $post_data = array(
161
  'post_title' => $post_title,
162
  'post_content' => '',
@@ -169,7 +140,7 @@ function accordions_import_cron_arconix_faq(){
169
 
170
 
171
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
172
- //update_post_meta($accordions_id, 'import_done', 'done');
173
 
174
 
175
  echo '##################';
@@ -182,9 +153,11 @@ function accordions_import_cron_arconix_faq(){
182
  endwhile;
183
  else:
184
 
 
185
 
 
186
 
187
- //wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
188
 
189
 
190
  endif;
2
  if ( ! defined('ABSPATH')) exit; // if direct access
3
 
4
 
 
 
 
 
5
  add_shortcode('accordions_import_cron_arconix_faq', 'accordions_import_cron_arconix_faq');
6
  add_action('accordions_import_cron_arconix_faq', 'accordions_import_cron_arconix_faq');
7
 
8
 
9
  function accordions_import_cron_arconix_faq(){
10
+ $accordions_plugin_info = get_option('accordions_plugin_info');
11
 
12
  $meta_query = array();
13
 
36
  $post_content = get_the_content();
37
 
38
  $accordions_options = array();
 
 
39
  //echo '<pre>'.var_export($accordion_content_source, ture).'</pre>';
 
 
 
 
 
40
  $accordions_icons_plus = 'plus';
41
  $accordions_icons_minus = 'minus';
42
 
106
  $accordions_options['accordion']['is_child'] = '';
107
 
108
 
 
 
 
 
 
 
 
 
109
  $i = 0;
110
 
111
  if(!empty($accordion_content_source))
114
  $accordion_content_title = $accordion_single_data['accordion_content_title'];
115
  $accordion_content_description = $accordion_single_data['accordion_content_description'];
116
 
 
 
 
 
117
  $accordions_options['content'][$index]['header'] = $post_title;
118
  $accordions_options['content'][$index]['body'] = $post_content;
119
  $accordions_options['content'][$index]['hide'] = 'no';
120
  $accordions_options['content'][$index]['toggled_text'] = '';
 
 
121
  $accordions_options['content'][$index]['is_active'] = '';
 
 
122
  $accordions_options['content'][$index]['active_icon'] = '';
123
  $accordions_options['content'][$index]['inactive_icon'] = '';
 
124
  $accordions_options['content'][$index]['background_color'] = '';
125
  $accordions_options['content'][$index]['background_img'] = '';
126
 
128
  }
129
 
130
 
 
 
131
  $post_data = array(
132
  'post_title' => $post_title,
133
  'post_content' => '',
140
 
141
 
142
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
143
+ update_post_meta($post_id, 'import_done', 'done');
144
 
145
 
146
  echo '##################';
153
  endwhile;
154
  else:
155
 
156
+ $accordions_plugin_info['3rd_party_import'] = 'done';
157
 
158
+ update_option('accordions_plugin_info', $accordions_plugin_info);
159
 
160
+ wp_clear_scheduled_hook('accordions_import_cron_arconix_faq');
161
 
162
 
163
  endif;
includes/3rd-party/easy-accordion-free/functions-data-import.php CHANGED
@@ -11,6 +11,7 @@ add_action('accordions_import_cron_easy_accordion_free', 'accordions_import_cron
11
 
12
 
13
  function accordions_import_cron_easy_accordion_free(){
 
14
 
15
  $meta_query = array();
16
 
@@ -195,7 +196,7 @@ function accordions_import_cron_easy_accordion_free(){
195
 
196
 
197
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
198
- //update_post_meta($accordions_id, 'import_done', 'done');
199
 
200
 
201
  echo '##################';
@@ -208,9 +209,10 @@ function accordions_import_cron_easy_accordion_free(){
208
  endwhile;
209
  else:
210
 
 
 
211
 
212
-
213
- //wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
214
 
215
 
216
  endif;
11
 
12
 
13
  function accordions_import_cron_easy_accordion_free(){
14
+ $accordions_plugin_info = get_option('accordions_plugin_info');
15
 
16
  $meta_query = array();
17
 
196
 
197
 
198
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
199
+ update_post_meta($post_id, 'import_done', 'done');
200
 
201
 
202
  echo '##################';
209
  endwhile;
210
  else:
211
 
212
+ $accordions_plugin_info['3rd_party_import'] = 'done';
213
+ update_option('accordions_plugin_info', $accordions_plugin_info);
214
 
215
+ wp_clear_scheduled_hook('accordions_import_cron_easy_accordion_free');
 
216
 
217
 
218
  endif;
includes/3rd-party/responsive-accordion-and-collapse/functions-data-import.php CHANGED
@@ -11,6 +11,7 @@ add_action('accordions_import_cron_wpsm_ac', 'accordions_import_cron_wpsm_ac');
11
 
12
 
13
  function accordions_import_cron_wpsm_ac(){
 
14
 
15
  $meta_query = array();
16
 
@@ -68,7 +69,7 @@ function accordions_import_cron_wpsm_ac(){
68
 
69
 
70
 
71
- echo '<pre>'.var_export($acc_sec_title, ture).'</pre>';
72
 
73
  $accordions_icons_plus = 'plus';
74
  $accordions_icons_minus = 'minus';
@@ -206,7 +207,7 @@ function accordions_import_cron_wpsm_ac(){
206
 
207
 
208
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
209
- update_post_meta($accordions_id, 'import_done', 'done');
210
 
211
 
212
  echo '##################';
@@ -219,9 +220,10 @@ function accordions_import_cron_wpsm_ac(){
219
  endwhile;
220
  else:
221
 
 
 
222
 
223
-
224
- //wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
225
 
226
 
227
  endif;
11
 
12
 
13
  function accordions_import_cron_wpsm_ac(){
14
+ $accordions_plugin_info = get_option('accordions_plugin_info');
15
 
16
  $meta_query = array();
17
 
69
 
70
 
71
 
72
+ //echo '<pre>'.var_export($acc_sec_title, true).'</pre>';
73
 
74
  $accordions_icons_plus = 'plus';
75
  $accordions_icons_minus = 'minus';
207
 
208
 
209
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
210
+ update_post_meta($post_id, 'import_done', 'done');
211
 
212
 
213
  echo '##################';
220
  endwhile;
221
  else:
222
 
223
+ $accordions_plugin_info['3rd_party_import'] = 'done';
224
+ update_option('accordions_plugin_info', $accordions_plugin_info);
225
 
226
+ wp_clear_scheduled_hook('accordions_import_cron_wpsm_ac');
 
227
 
228
 
229
  endif;
includes/3rd-party/responsive-tabs/functions-data-import.php CHANGED
@@ -11,6 +11,7 @@ add_action('accordions_import_cron_responsive_tabs', 'accordions_import_cron_res
11
 
12
 
13
  function accordions_import_cron_responsive_tabs(){
 
14
 
15
  $meta_query = array();
16
 
@@ -174,7 +175,7 @@ function accordions_import_cron_responsive_tabs(){
174
 
175
 
176
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
177
- //update_post_meta($accordions_id, 'import_done', 'done');
178
 
179
 
180
  echo '##################';
@@ -187,9 +188,10 @@ function accordions_import_cron_responsive_tabs(){
187
  endwhile;
188
  else:
189
 
 
 
190
 
191
-
192
- //wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
193
 
194
 
195
  endif;
11
 
12
 
13
  function accordions_import_cron_responsive_tabs(){
14
+ $accordions_plugin_info = get_option('accordions_plugin_info');
15
 
16
  $meta_query = array();
17
 
175
 
176
 
177
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
178
+ update_post_meta($post_id, 'import_done', 'done');
179
 
180
 
181
  echo '##################';
188
  endwhile;
189
  else:
190
 
191
+ $accordions_plugin_info['3rd_party_import'] = 'done';
192
+ update_option('accordions_plugin_info', $accordions_plugin_info);
193
 
194
+ wp_clear_scheduled_hook('accordions_import_cron_responsive_tabs');
 
195
 
196
 
197
  endif;
includes/3rd-party/tabby-responsive-tabs/functions-data-import.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined('ABSPATH')) exit; // if direct access
3
+
4
+
5
+
6
+
7
+
8
+
9
+ add_shortcode('accordions_import_cron_easy_tabby_responsive_tabs', 'accordions_import_cron_easy_tabby_responsive_tabs');
10
+ add_action('accordions_import_cron_easy_tabby_responsive_tabs', 'accordions_import_cron_easy_tabby_responsive_tabs');
11
+
12
+
13
+ function accordions_import_cron_easy_tabby_responsive_tabs(){
14
+ $accordions_plugin_info = get_option('accordions_plugin_info');
15
+
16
+ $meta_query = array();
17
+
18
+ $meta_query[] = array(
19
+ 'key' => 'import_done',
20
+ 'compare' => 'NOT EXISTS'
21
+ );
22
+
23
+ $args = array(
24
+ 'post_type'=>'sp_easy_accordion',
25
+ 'post_status'=>'publish',
26
+ 'posts_per_page'=> 1,
27
+ 'meta_query'=> $meta_query,
28
+
29
+ );
30
+
31
+
32
+ $wp_query = new WP_Query($args);
33
+
34
+
35
+ if ( $wp_query->have_posts() ) :
36
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
37
+
38
+ $post_id = get_the_id();
39
+ $post_title = get_the_title();
40
+ $accordions_options = array();
41
+
42
+ //echo $accordions_title.'<br/>';
43
+ $sp_eap_upload_options = get_post_meta( $post_id, 'sp_eap_upload_options', true );
44
+ $sp_eap_shortcode_options = get_post_meta( $post_id, 'sp_eap_shortcode_options', true );
45
+
46
+ $eap_accordion_type = $sp_eap_upload_options['eap_accordion_type'];
47
+ $accordion_content_source = $sp_eap_upload_options['accordion_content_source'];
48
+
49
+
50
+ echo '<pre>'.var_export($accordion_content_source, ture).'</pre>';
51
+
52
+
53
+ $eap_accordion_event = $sp_eap_shortcode_options['eap_accordion_event'];
54
+ $eap_mutliple_collapse = $sp_eap_shortcode_options['eap_mutliple_collapse'];
55
+ $eap_accordion_fillspace = $sp_eap_shortcode_options['eap_accordion_fillspace'];
56
+ $eap_preloader = $sp_eap_shortcode_options['eap_preloader'];
57
+
58
+ $eap_animation_time = $sp_eap_shortcode_options['eap_animation_time'];
59
+ $eap_icon_size = $sp_eap_shortcode_options['eap_icon_size']['all'];
60
+ $eap_icon_color_set = $sp_eap_shortcode_options['eap_icon_color_set'];
61
+ $eap_icon_position = $sp_eap_shortcode_options['eap_icon_position'];
62
+ $eap_title_color = $sp_eap_shortcode_options['eap_title_color'];
63
+ $eap_header_bg_color = $sp_eap_shortcode_options['eap_header_bg_color'];
64
+ $eap_description_color = $sp_eap_shortcode_options['eap_description_color'];
65
+ $eap_description_bg_color = $sp_eap_shortcode_options['eap_description_bg_color'];
66
+
67
+
68
+
69
+
70
+ $accordions_icons_plus = 'plus';
71
+ $accordions_icons_minus = 'minus';
72
+
73
+
74
+ $accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
75
+ $accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
76
+
77
+ $accordions_options['icon']['active'] = $accordions_icons_plus;
78
+ $accordions_options['icon']['inactive'] = $accordions_icons_minus;
79
+ $accordions_options['icon']['position'] = $eap_icon_position;
80
+ $accordions_options['icon']['color'] = $eap_icon_color_set;
81
+ $accordions_options['icon']['color_hover'] = '';
82
+ $accordions_options['icon']['font_size'] = $eap_icon_size.'px';
83
+ $accordions_options['icon']['background_color'] = '';
84
+ $accordions_options['icon']['padding'] = '';
85
+
86
+
87
+
88
+
89
+ $accordions_options['header']['class'] = '';
90
+ $accordions_options['header']['active_background_color'] = '';
91
+ $accordions_options['header']['background_color'] = $eap_header_bg_color;
92
+ $accordions_options['header']['background_opacity'] = '';
93
+ $accordions_options['header']['color'] = $eap_title_color;
94
+ $accordions_options['header']['color_hover'] = '';
95
+ $accordions_options['header']['font_size'] = '';
96
+ $accordions_options['header']['font_family'] = '';
97
+ $accordions_options['header']['padding'] = '';
98
+ $accordions_options['header']['margin'] = '';
99
+
100
+
101
+ $accordions_options['body']['class'] = '';
102
+
103
+ $accordions_options['body']['active_background_color'] = '';
104
+ $accordions_options['body']['background_color'] = $eap_description_bg_color;
105
+ $accordions_options['body']['background_opacity'] = '';
106
+ $accordions_options['body']['color'] = $eap_description_color;
107
+ $accordions_options['body']['font_size'] = '';
108
+ $accordions_options['body']['font_family'] = '';
109
+ $accordions_options['body']['padding'] = '';
110
+ $accordions_options['body']['margin'] = '';
111
+
112
+
113
+
114
+
115
+
116
+ $accordions_options['lazy_load'] = !empty($eap_preloader) ? 'yes' : 'no';
117
+ $accordions_options['lazy_load_src'] = '';
118
+ $accordions_options['hide_edit'] = '';
119
+ $accordions_options['accordion']['collapsible'] = 'true';
120
+ $accordions_options['accordion']['expanded_other'] = !empty($eap_mutliple_collapse) ? 'yes' : 'no';
121
+ $accordions_options['accordion']['height_style'] = !empty($eap_accordion_fillspace) ? 'content' : '';
122
+
123
+ if($eap_accordion_event == 'ea-click'){
124
+ $active_event = 'click';
125
+ }elseif ($eap_accordion_event == 'ea-hover'){
126
+ $active_event = 'mouseover';
127
+ }else{
128
+ $active_event = 'click';
129
+ }
130
+
131
+ $accordions_options['accordion']['active_event'] = $active_event;
132
+ $accordions_options['accordion']['enable_search'] = '';
133
+ $accordions_options['accordion']['search_placeholder_text'] = '';
134
+ $accordions_options['accordion']['click_scroll_top'] = '';
135
+ $accordions_options['accordion']['click_scroll_top_offset'] = '';
136
+ $accordions_options['accordion']['header_toggle'] = '';
137
+ $accordions_options['accordion']['animate_style'] = '';
138
+ $accordions_options['accordion']['animate_delay'] = $eap_animation_time;
139
+ $accordions_options['accordion']['expand_collapse_display'] = '';
140
+ $accordions_options['accordion']['expand_collapse_bg_color'] = '';
141
+ $accordions_options['accordion']['expand_collapse_text'] = '';
142
+ $accordions_options['accordion']['is_child'] = '';
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ $i = 0;
154
+
155
+ if(!empty($accordion_content_source))
156
+ foreach ($accordion_content_source as $index => $accordion_single_data){
157
+
158
+ $accordion_content_title = $accordion_single_data['accordion_content_title'];
159
+ $accordion_content_description = $accordion_single_data['accordion_content_description'];
160
+
161
+
162
+
163
+
164
+
165
+ $accordions_options['content'][$index]['header'] = $accordion_content_title;
166
+
167
+ $accordions_options['content'][$index]['body'] = $accordion_content_description;
168
+ $accordions_options['content'][$index]['hide'] = 'no';
169
+ $accordions_options['content'][$index]['toggled_text'] = '';
170
+
171
+
172
+ $accordions_options['content'][$index]['is_active'] = '';
173
+
174
+
175
+ $accordions_options['content'][$index]['active_icon'] = '';
176
+ $accordions_options['content'][$index]['inactive_icon'] = '';
177
+
178
+ $accordions_options['content'][$index]['background_color'] = '';
179
+ $accordions_options['content'][$index]['background_img'] = '';
180
+
181
+ $i++;
182
+ }
183
+
184
+
185
+
186
+
187
+ $post_data = array(
188
+ 'post_title' => $post_title,
189
+ 'post_content' => '',
190
+ 'post_status' => 'publish',
191
+ 'post_type' => 'accordions',
192
+ 'post_author' => 1,
193
+ );
194
+
195
+ $accordions_id = wp_insert_post($post_data);
196
+
197
+
198
+ update_post_meta($accordions_id, 'accordions_options', $accordions_options);
199
+ update_post_meta($post_id, 'import_done', 'done');
200
+
201
+
202
+ echo '##################';
203
+ echo '<br/>';
204
+ echo 'import done: '.$post_title;
205
+ echo '<br/>';
206
+
207
+ wp_reset_query();
208
+ wp_reset_postdata();
209
+ endwhile;
210
+ else:
211
+
212
+ $accordions_plugin_info['3rd_party_import'] = 'done';
213
+ update_option('accordions_plugin_info', $accordions_plugin_info);
214
+
215
+ wp_clear_scheduled_hook('accordions_import_cron_easy_accordion_free');
216
+
217
+
218
+ endif;
219
+
220
+
221
+ }
222
+
223
+
224
+
225
+
includes/3rd-party/tabs-responsive/functions-data-import.php ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined('ABSPATH')) exit; // if direct access
3
+
4
+
5
+
6
+
7
+
8
+
9
+ add_shortcode('accordions_import_cron_tabs_responsive', 'accordions_import_cron_tabs_responsive');
10
+ add_action('accordions_import_cron_tabs_responsive', 'accordions_import_cron_tabs_responsive');
11
+
12
+
13
+ function accordions_import_cron_tabs_responsive(){
14
+ $accordions_plugin_info = get_option('accordions_plugin_info');
15
+
16
+ $meta_query = array();
17
+
18
+ $meta_query[] = array(
19
+ 'key' => 'import_done',
20
+ 'compare' => 'NOT EXISTS'
21
+ );
22
+
23
+ $args = array(
24
+ 'post_type'=>'tabs_responsive',
25
+ 'post_status'=>'publish',
26
+ 'posts_per_page'=> 1,
27
+ 'meta_query'=> $meta_query,
28
+
29
+ );
30
+
31
+
32
+ $accordions_fontawesome_ver = get_option('accordions_fontawesome_ver');
33
+
34
+ $wp_query = new WP_Query($args);
35
+
36
+
37
+ if ( $wp_query->have_posts() ) :
38
+ while ( $wp_query->have_posts() ) : $wp_query->the_post();
39
+
40
+ $post_id = get_the_id();
41
+ $post_title = get_the_title();
42
+ $accordions_options = array();
43
+
44
+ //echo $accordions_title.'<br/>';
45
+ $wpsm_tabs_r_data = get_post_meta( $post_id, 'wpsm_tabs_r_data', true );
46
+ $wpsm_tabs_r_data = unserialize( $wpsm_tabs_r_data );
47
+
48
+ $Tabs_R_Settings = get_post_meta( $post_id, 'Tabs_R_Settings', true);
49
+ $Tabs_R_Settings = unserialize( $Tabs_R_Settings );
50
+
51
+
52
+ $title_size = isset($Tabs_R_Settings['title_size']) ? $Tabs_R_Settings['title_size'] : '18';
53
+ $tabs_sec_title = isset($Tabs_R_Settings['tabs_sec_title']) ? $Tabs_R_Settings['tabs_sec_title'] : 'yes';
54
+ $show_tabs_title_icon = isset($Tabs_R_Settings['show_tabs_title_icon']) ? $Tabs_R_Settings['show_tabs_title_icon'] : 'yes';
55
+ $show_tabs_icon_align = isset($Tabs_R_Settings['show_tabs_icon_align']) ? $Tabs_R_Settings['show_tabs_icon_align'] : 'left';
56
+ $enable_tabs_border = isset($Tabs_R_Settings['enable_tabs_border']) ? $Tabs_R_Settings['enable_tabs_border'] : 'yes';
57
+ $tabs_title_bg_clr = isset($Tabs_R_Settings['tabs_title_bg_clr']) ? $Tabs_R_Settings['tabs_title_bg_clr'] : '#e8e8e8';
58
+ $tabs_title_icon_clr = isset($Tabs_R_Settings['tabs_title_icon_clr']) ? $Tabs_R_Settings['tabs_title_icon_clr'] : '#000000';
59
+ $select_tabs_title_bg_clr = isset($Tabs_R_Settings['select_tabs_title_bg_clr']) ? $Tabs_R_Settings['select_tabs_title_bg_clr'] : '#000000';
60
+ $select_tabs_title_icon_clr = isset($Tabs_R_Settings['select_tabs_title_icon_clr']) ? $Tabs_R_Settings['select_tabs_title_icon_clr'] : '#000000';
61
+ $tabs_desc_bg_clr = isset($Tabs_R_Settings['tabs_desc_bg_clr']) ? $Tabs_R_Settings['tabs_desc_bg_clr'] : '#000000';
62
+ $tabs_desc_font_clr = isset($Tabs_R_Settings['tabs_desc_font_clr']) ? $Tabs_R_Settings['tabs_desc_font_clr'] : '#000000';
63
+ $des_size = isset($Tabs_R_Settings['des_size']) ? $Tabs_R_Settings['des_size'] : '16';
64
+ $font_family = isset($Tabs_R_Settings['font_family']) ? $Tabs_R_Settings['font_family'] : 'Open Sans';
65
+ $tabs_styles = isset($Tabs_R_Settings['tabs_styles']) ? $Tabs_R_Settings['tabs_styles'] : 1;
66
+ $custom_css = isset($Tabs_R_Settings['custom_css']) ? $Tabs_R_Settings['custom_css'] : 1;
67
+ $tabs_animation = isset($Tabs_R_Settings['tabs_animation']) ? $Tabs_R_Settings['tabs_animation'] : 1;
68
+ $tabs_alignment = isset($Tabs_R_Settings['tabs_alignment']) ? $Tabs_R_Settings['tabs_alignment'] : 1;
69
+ $tabs_position = isset($Tabs_R_Settings['tabs_position']) ? $Tabs_R_Settings['tabs_position'] : 1;
70
+ $tabs_margin = isset($Tabs_R_Settings['tabs_margin']) ? $Tabs_R_Settings['tabs_margin'] : 1;
71
+ $tabs_content_margin = isset($Tabs_R_Settings['tabs_content_margin']) ? $Tabs_R_Settings['tabs_content_margin'] : 1;
72
+ $tabs_display_on_mob = isset($Tabs_R_Settings['tabs_display_on_mob']) ? $Tabs_R_Settings['tabs_display_on_mob'] : 1;
73
+ $tabs_display_mode_mob = isset($Tabs_R_Settings['tabs_display_mode_mob']) ? $Tabs_R_Settings['tabs_display_mode_mob'] : 1;
74
+
75
+
76
+
77
+
78
+ echo '<pre>'.var_export($tabs_sec_title, ture).'</pre>';
79
+
80
+ $accordions_icons_plus = 'plus';
81
+ $accordions_icons_minus = 'minus';
82
+
83
+
84
+ $accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
85
+ $accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
86
+
87
+ $accordions_options['icon']['active'] = $accordions_icons_plus;
88
+ $accordions_options['icon']['inactive'] = $accordions_icons_minus;
89
+ $accordions_options['icon']['position'] = $show_tabs_icon_align;
90
+ $accordions_options['icon']['color'] = $tabs_title_icon_clr;
91
+ $accordions_options['icon']['color_hover'] = '';
92
+ $accordions_options['icon']['font_size'] = $title_size.'px';
93
+ $accordions_options['icon']['background_color'] = '';
94
+ $accordions_options['icon']['padding'] = '';
95
+
96
+
97
+
98
+
99
+ $accordions_options['header']['class'] = '';
100
+ $accordions_options['header']['active_background_color'] = '';
101
+ $accordions_options['header']['background_color'] = $tabs_title_bg_clr;
102
+ $accordions_options['header']['background_opacity'] = '';
103
+ $accordions_options['header']['color'] = '';
104
+ $accordions_options['header']['color_hover'] = '';
105
+ $accordions_options['header']['font_size'] = $title_size.'px';
106
+ $accordions_options['header']['font_family'] = $font_family;
107
+ $accordions_options['header']['padding'] = '';
108
+ $accordions_options['header']['margin'] = '';
109
+
110
+
111
+ $accordions_options['body']['class'] = ($enable_tabs_border == 'yes') ? 'border-2px' :'';
112
+
113
+ $accordions_options['body']['active_background_color'] = '';
114
+ $accordions_options['body']['background_color'] = '';
115
+ $accordions_options['body']['background_opacity'] = '';
116
+ $accordions_options['body']['color'] = '';
117
+ $accordions_options['body']['font_size'] = '';
118
+ $accordions_options['body']['font_family'] = $font_family;
119
+ $accordions_options['body']['padding'] = '';
120
+ $accordions_options['body']['margin'] = '';
121
+
122
+
123
+
124
+
125
+
126
+ $accordions_options['lazy_load'] = '';
127
+ $accordions_options['lazy_load_src'] = '';
128
+ $accordions_options['view_type'] = 'tabs';
129
+
130
+ $accordions_options['hide_edit'] = '';
131
+ $accordions_options['accordion']['collapsible'] = 'true' ;
132
+ $accordions_options['accordion']['expanded_other'] = 'yes';
133
+ $accordions_options['accordion']['height_style'] = 'content';
134
+ $accordions_options['accordion']['active_event'] = 'click';
135
+ $accordions_options['accordion']['enable_search'] = '';
136
+ $accordions_options['accordion']['search_placeholder_text'] = '';
137
+ $accordions_options['accordion']['click_scroll_top'] = '';
138
+ $accordions_options['accordion']['click_scroll_top_offset'] = '';
139
+ $accordions_options['accordion']['header_toggle'] = '';
140
+ $accordions_options['accordion']['animate_style'] = '';
141
+ $accordions_options['accordion']['animate_delay'] = '';
142
+ $accordions_options['accordion']['expand_collapse_display'] = '';
143
+ $accordions_options['accordion']['expand_collapse_bg_color'] = '';
144
+ $accordions_options['accordion']['expand_collapse_text'] = '';
145
+ $accordions_options['accordion']['is_child'] = '';
146
+
147
+
148
+
149
+
150
+
151
+ $i = 0;
152
+
153
+ if(!empty($wpsm_tabs_r_data))
154
+ foreach ($wpsm_tabs_r_data as $index => $accordion_single_data){
155
+
156
+ $tabs_title = $accordion_single_data['tabs_title'];
157
+ $tabs_title_icon = $accordion_single_data['tabs_title_icon'];
158
+ $enable_single_icon = $accordion_single_data['enable_single_icon'];
159
+ $tabs_desc = $accordion_single_data['tabs_desc'];
160
+
161
+
162
+
163
+
164
+ $accordions_options['content'][$index]['header'] = ($show_tabs_title_icon =='yes') ? (($enable_single_icon == 'yes') ? '<i class="fa '.$tabs_title_icon.'"></i> '.$tabs_title : $tabs_title) : $tabs_title;
165
+
166
+ $accordions_options['content'][$index]['body'] = $tabs_desc;
167
+ $accordions_options['content'][$index]['hide'] = 'no';
168
+ $accordions_options['content'][$index]['toggled_text'] = '';
169
+
170
+
171
+ $accordions_options['content'][$index]['is_active'] = 'yes';
172
+
173
+
174
+ $active_icon = !empty($accordions_section_icon_plus[$index]) ? '<i class="fa '.$enable_single_icon.'"></i>' : '';
175
+ $inactive_icon = !empty($accordions_section_icon_minus[$index]) ? '<i class="fa '.$accordions_section_icon_minus[$index].'"></i>' : '';
176
+
177
+ $accordions_options['content'][$index]['active_icon'] = $active_icon;
178
+ $accordions_options['content'][$index]['inactive_icon'] = $inactive_icon;
179
+
180
+ $accordions_options['content'][$index]['background_color'] = '';
181
+ $accordions_options['content'][$index]['background_img'] = '';
182
+
183
+ $i++;
184
+ }
185
+
186
+
187
+
188
+
189
+
190
+ $accordions_id = wp_insert_post(
191
+ array(
192
+ 'post_title' => $post_title,
193
+ 'post_content' => '',
194
+ 'post_status' => 'publish',
195
+ 'post_type' => 'accordions',
196
+ 'post_author' => 1,
197
+ )
198
+ );
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+
211
+ update_post_meta($accordions_id, 'accordions_options', $accordions_options);
212
+ update_post_meta($post_id, 'import_done', 'done');
213
+
214
+
215
+ echo '##################';
216
+ echo '<br/>';
217
+ echo 'import done: '.$post_title;
218
+ echo '<br/>';
219
+
220
+ wp_reset_query();
221
+ wp_reset_postdata();
222
+ endwhile;
223
+ else:
224
+
225
+ $accordions_plugin_info['3rd_party_import'] = 'done';
226
+ update_option('accordions_plugin_info', $accordions_plugin_info);
227
+
228
+ wp_clear_scheduled_hook('accordions_import_cron_tabs_responsive');
229
+
230
+
231
+ endif;
232
+
233
+
234
+ }
235
+
236
+
237
+
238
+
includes/3rd-party/vc-tabs/functions-data-import.php CHANGED
@@ -11,12 +11,14 @@ add_action('accordions_import_cron_vc_tabs', 'accordions_import_cron_vc_tabs');
11
 
12
 
13
  function accordions_import_cron_vc_tabs(){
 
14
 
15
  $meta_query = array();
16
 
17
- $meta_query[] = array(
18
  'key' => 'import_done',
19
  'compare' => 'NOT EXISTS'
 
20
  );
21
 
22
  $args = array(
@@ -206,8 +208,7 @@ function accordions_import_cron_vc_tabs(){
206
 
207
 
208
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
209
- //update_post_meta($accordions_id, 'import_done', 'done');
210
-
211
 
212
  echo '##################';
213
  echo '<br/>';
@@ -219,9 +220,10 @@ function accordions_import_cron_vc_tabs(){
219
  endwhile;
220
  else:
221
 
 
 
222
 
223
-
224
- //wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
225
 
226
 
227
  endif;
11
 
12
 
13
  function accordions_import_cron_vc_tabs(){
14
+ $accordions_plugin_info = get_option('accordions_plugin_info');
15
 
16
  $meta_query = array();
17
 
18
+ $meta_query[] = array(
19
  'key' => 'import_done',
20
  'compare' => 'NOT EXISTS'
21
+
22
  );
23
 
24
  $args = array(
208
 
209
 
210
  update_post_meta($accordions_id, 'accordions_options', $accordions_options);
211
+ update_post_meta($post_id, 'import_done', 'done');
 
212
 
213
  echo '##################';
214
  echo '<br/>';
220
  endwhile;
221
  else:
222
 
223
+ $accordions_plugin_info['3rd_party_import'] = 'done';
224
+ update_option('accordions_plugin_info', $accordions_plugin_info);
225
 
226
+ wp_clear_scheduled_hook('accordions_import_cron_vc_tabs');
 
227
 
228
 
229
  endif;
includes/class-post-meta-accordions-hook.php CHANGED
@@ -406,6 +406,7 @@ function accordions_metabox_content_tabs_options($post_id){
406
  $tabs = isset($accordions_options['tabs']) ? $accordions_options['tabs'] : array();
407
  $collapsible = isset($tabs['collapsible']) ? $tabs['collapsible'] : 'true';
408
  $active_event = isset($tabs['active_event']) ? $tabs['active_event'] : 'click';
 
409
 
410
 
411
  ?>
@@ -447,6 +448,24 @@ function accordions_metabox_content_tabs_options($post_id){
447
  );
448
 
449
  $settings_tabs_field->generate_field($args);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
450
  ?>
451
 
452
  </div>
406
  $tabs = isset($accordions_options['tabs']) ? $accordions_options['tabs'] : array();
407
  $collapsible = isset($tabs['collapsible']) ? $tabs['collapsible'] : 'true';
408
  $active_event = isset($tabs['active_event']) ? $tabs['active_event'] : 'click';
409
+ $navs_alignment = isset($tabs['navs_alignment']) ? $tabs['navs_alignment'] : 'left';
410
 
411
 
412
  ?>
448
  );
449
 
450
  $settings_tabs_field->generate_field($args);
451
+
452
+ $args = array(
453
+ 'id' => 'navs_alignment',
454
+ 'parent' => 'accordions_options[tabs]',
455
+ 'title' => __('Navs alignment','accordions'),
456
+ 'details' => __('Set navs alignment','accordions'),
457
+ 'type' => 'select',
458
+ 'value' => $navs_alignment,
459
+ 'default' => 'left',
460
+ 'args' => array(
461
+ 'left' => __('Left','accordions'),
462
+ 'right' => __('Right','accordions'),
463
+ ),
464
+ );
465
+
466
+ $settings_tabs_field->generate_field($args);
467
+
468
+
469
  ?>
470
 
471
  </div>
includes/class-settings-hook.php CHANGED
@@ -376,6 +376,129 @@ if(!function_exists('accordions_settings_content_help_support')) {
376
 
377
 
378
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
379
 
380
 
381
  add_action('accordions_settings_content_buy_pro', 'accordions_settings_content_buy_pro');
376
 
377
 
378
 
379
+ add_action('accordions_settings_content_3rd_party_import', 'accordions_settings_content_3rd_party_import');
380
+
381
+ if(!function_exists('accordions_settings_content_3rd_party_import')) {
382
+ function accordions_settings_content_3rd_party_import($tab){
383
+
384
+ $settings_tabs_field = new settings_tabs_field();
385
+
386
+
387
+ ?>
388
+ <div class="section">
389
+ <div class="section-title"><?php echo __('3rd party plugin data import', 'accordions'); ?></div>
390
+ <p class="description section-description"><?php echo __('Import from 3rd party plugin data for accordion and tabs.', 'accordions'); ?></p>
391
+
392
+ <?php
393
+
394
+
395
+
396
+ ob_start();
397
+ $accordions_plugin_info = get_option('accordions_plugin_info');
398
+
399
+ //delete_option('accordions_plugin_info');
400
+ //var_dump($accordions_plugin_info);
401
+
402
+ $_3rd_party_import_stats = isset($accordions_plugin_info['3rd_party_import']) ? $accordions_plugin_info['3rd_party_import'] : '';
403
+
404
+
405
+ $actionurl = admin_url().'edit.php?post_type=accordions&page=settings&tab=3rd_party_import';
406
+ $actionurl = wp_nonce_url( $actionurl, '3rd_party_import' );
407
+
408
+ $nonce = isset($_REQUEST['_wpnonce']) ? $_REQUEST['_wpnonce'] : '';
409
+
410
+ if ( wp_verify_nonce( $nonce, '3rd_party_import' ) ){
411
+
412
+ $source = isset($_REQUEST['source']) ? $_REQUEST['source'] : '';
413
+
414
+ $accordions_plugin_info['3rd_party_import'] = 'processing';
415
+ update_option('accordions_plugin_info', $accordions_plugin_info);
416
+
417
+ if($source == 'arconix-faq'){
418
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_arconix_faq');
419
+ }elseif($source == 'easy-accordion-free'){
420
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_easy_accordion_free');
421
+ }elseif($source == 'responsive-accordion-and-collapse'){
422
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_wpsm_ac');
423
+ }elseif($source == 'responsive-tabs'){
424
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_responsive_tabs');
425
+ }elseif($source == 'vc-tabs'){
426
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_vc_tabs');
427
+ }elseif($source == 'tabs-responsive'){
428
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_tabs_responsive');
429
+ }elseif($source == 'tabby-responsive-tabs'){
430
+ wp_schedule_event(time(), '1minute', 'accordions_import_cron_tabs_responsive');
431
+ }
432
+
433
+
434
+ $_3rd_party_import_stats = 'processing';
435
+ }
436
+
437
+ if($_3rd_party_import_stats == 'processing'){
438
+
439
+ $url = admin_url().'edit.php?post_type=accordions&page=settings&tab=3rd_party_import';
440
+
441
+ ?>
442
+ <p style="color: #f00;"><i class="fas fa-spin fa-spinner"></i> Data import on process, please wait until complete.</p>
443
+ <p><a href="<?php echo $url; ?>">Refresh</a> to check import stats</p>
444
+
445
+
446
+
447
+ <?php
448
+ }else{
449
+ ?>
450
+ <p style="color: #22631a;"><i class="fas fa-check"></i> Data import done.</p>
451
+
452
+
453
+
454
+ <?php
455
+ }
456
+
457
+
458
+
459
+ ?>
460
+
461
+ <!-- <p class="">Arconix FAQ - <a class="button button-primary" href="--><?php //echo $actionurl.'&source=arconix-faq'; ?><!--">Import data</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>-->
462
+ <p class="">Easy Accordion By ShapedPlugin - <a class="button button-primary" href="<?php echo $actionurl.'&source=easy-accordion-free'; ?>">Import data</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
463
+ <p class="">Responsive Accordion And Collapse By wpshopmart - <a class="button button-primary" href="<?php echo $actionurl.'&source=responsive-accordion-and-collapse'; ?>">Import data</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
464
+ <p class="">Tabs Responsive By wpshopmart - <a class="button button-primary" href="<?php echo $actionurl.'&source=tabs-responsive'; ?>">Import data</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
465
+ <p class="">Responsive Tabs By WP Darko - <a class="button button-primary" href="<?php echo $actionurl.'&source=responsive-tabs'; ?>">Import data</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
466
+ <!-- <p class="">Tabs By Biplob Adhikari - <a class="button button-primary" href="--><?php //echo $actionurl.'&source=vc-tabs'; ?><!--">Import data</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>-->
467
+
468
+
469
+
470
+ <?php
471
+
472
+ $html = ob_get_clean();
473
+
474
+ $args = array(
475
+ 'id' => 'reset_migrate',
476
+ //'parent' => '',
477
+ 'title' => __('Import data','accordions'),
478
+ 'details' => '',
479
+ 'type' => 'custom_html',
480
+ 'html' => $html,
481
+
482
+ );
483
+
484
+ $settings_tabs_field->generate_field($args);
485
+
486
+
487
+
488
+
489
+ ?>
490
+
491
+
492
+ </div>
493
+
494
+ <?php
495
+
496
+
497
+ }
498
+ }
499
+
500
+
501
+
502
 
503
 
504
  add_action('accordions_settings_content_buy_pro', 'accordions_settings_content_buy_pro');
includes/menu/settings.php CHANGED
@@ -13,7 +13,12 @@ $accordions_settings_tab[] = array(
13
  'active' => ($current_tab == 'general') ? true : false,
14
  );
15
 
16
-
 
 
 
 
 
17
 
18
  $accordions_settings_tab[] = array(
19
  'id' => 'help_support',
13
  'active' => ($current_tab == 'general') ? true : false,
14
  );
15
 
16
+ $accordions_settings_tab[] = array(
17
+ 'id' => '3rd_party_import',
18
+ 'title' => sprintf(__('%s 3rd party import','accordions'),'<i class="fas fa-download"></i>'),
19
+ 'priority' => 2,
20
+ 'active' => ($current_tab == '3rd_party_import') ? true : false,
21
+ );
22
 
23
  $accordions_settings_tab[] = array(
24
  'id' => 'help_support',
readme.txt CHANGED
@@ -4,7 +4,7 @@
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.3
7
- Stable tag: 2.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -135,6 +135,15 @@ then paste this shortcode anywhere in your page to display accordions<br />
135
 
136
  == Changelog ==
137
 
 
 
 
 
 
 
 
 
 
138
  = 2.2.2 =
139
  * 13-03-2020 - fix - adding new content conflict with 3rd party plugin.
140
 
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.3
7
+ Stable tag: 2.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
135
 
136
  == Changelog ==
137
 
138
+ = 2.2.4 =
139
+ * 16-03-2020 - fix - font awesome version compatibility issue fixed.
140
+ * 16-03-2020 - add - 3rd party accordion and tabs data import.
141
+
142
+ = 2.2.3 =
143
+ * 15-03-2020 - fix - tabs style issue fixed.
144
+ * 15-03-2020 - add - tabs navs alignment to left right added.
145
+
146
+
147
  = 2.2.2 =
148
  * 13-03-2020 - fix - adding new content conflict with 3rd party plugin.
149
 
templates/accordion/accordion-hook.php CHANGED
@@ -91,12 +91,24 @@ function accordions_main_style($atts){
91
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
92
  $custom_css = isset($custom_scripts['custom_css']) ? $custom_scripts['custom_css'] : '';
93
 
 
 
 
94
 
95
  wp_enqueue_style('accordions-style');
96
 
97
  wp_enqueue_style('jquery-ui');
98
  wp_enqueue_style('accordions-themes');
99
- wp_enqueue_style('fontawesome-5');
 
 
 
 
 
 
 
 
 
100
 
101
  wp_enqueue_script( 'jquery' );
102
  wp_enqueue_script( 'jquery-ui-core' );
@@ -106,7 +118,6 @@ function accordions_main_style($atts){
106
 
107
  ?>
108
  <style type='text/css'>
109
-
110
  @media only screen and (min-width: 1024px ){
111
  #accordions-<?php echo $post_id; ?> {
112
  <?php if(!empty($width_large)):?>
@@ -114,7 +125,6 @@ function accordions_main_style($atts){
114
  <?php endif; ?>
115
  }
116
  }
117
-
118
  @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
119
  #accordions-<?php echo $post_id; ?> {
120
  <?php if(!empty($width_medium)):?>
@@ -122,7 +132,6 @@ function accordions_main_style($atts){
122
  <?php endif; ?>
123
  }
124
  }
125
-
126
  @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
127
  #accordions-<?php echo $post_id; ?> {
128
  <?php if(!empty($width_small)):?>
@@ -130,8 +139,6 @@ function accordions_main_style($atts){
130
  <?php endif; ?>
131
  }
132
  }
133
-
134
-
135
  <?php
136
  if($lazy_load=='yes'){
137
  ?>
@@ -555,14 +562,6 @@ function accordions_main_scripts($atts){
555
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
556
 
557
 
558
- wp_enqueue_style('jquery-ui');
559
- wp_enqueue_style('accordions-themes');
560
- wp_enqueue_style('fontawesome-5');
561
-
562
- wp_enqueue_script( 'jquery' );
563
- wp_enqueue_script( 'jquery-ui-core' );
564
- wp_enqueue_script('jquery-ui-accordion');
565
- wp_enqueue_script('jquery-effects-core');
566
 
567
 
568
  ?>
91
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
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'] : 'none';
96
+
97
 
98
  wp_enqueue_style('accordions-style');
99
 
100
  wp_enqueue_style('jquery-ui');
101
  wp_enqueue_style('accordions-themes');
102
+
103
+ if($font_aw_version =='v_5'){
104
+ wp_enqueue_style('fontawesome-5');
105
+ }elseif($font_aw_version =='v_4'){
106
+ wp_enqueue_style('fontawesome-4');
107
+ }else{
108
+
109
+ }
110
+
111
+
112
 
113
  wp_enqueue_script( 'jquery' );
114
  wp_enqueue_script( 'jquery-ui-core' );
118
 
119
  ?>
120
  <style type='text/css'>
 
121
  @media only screen and (min-width: 1024px ){
122
  #accordions-<?php echo $post_id; ?> {
123
  <?php if(!empty($width_large)):?>
125
  <?php endif; ?>
126
  }
127
  }
 
128
  @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
129
  #accordions-<?php echo $post_id; ?> {
130
  <?php if(!empty($width_medium)):?>
132
  <?php endif; ?>
133
  }
134
  }
 
135
  @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
136
  #accordions-<?php echo $post_id; ?> {
137
  <?php if(!empty($width_small)):?>
139
  <?php endif; ?>
140
  }
141
  }
 
 
142
  <?php
143
  if($lazy_load=='yes'){
144
  ?>
562
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
563
 
564
 
 
 
 
 
 
 
 
 
565
 
566
 
567
  ?>
templates/tabs/tabs-hook.php CHANGED
@@ -81,6 +81,9 @@ function accordions_tabs_main_style($atts){
81
  $container_background_color = isset($container['background_color']) ? $container['background_color'] : '';
82
  $container_text_align = isset($container['text_align']) ? $container['text_align'] : '';
83
  $container_background_img = isset($container['background_img']) ? $container['background_img'] : '';
 
 
 
84
 
85
  $custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
86
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
@@ -93,13 +96,25 @@ function accordions_tabs_main_style($atts){
93
  $tabs_is_vertical = isset($tabs['is_vertical']) ? $tabs['is_vertical'] : '';
94
  $navs_width_ratio = isset($tabs['navs_width_ratio']) ? $tabs['navs_width_ratio'] : '';
95
  $tabs_icon_toggle = isset($tabs['tabs_icon_toggle']) ? $tabs['tabs_icon_toggle'] : '';
 
96
 
 
 
97
 
98
 
 
 
99
  wp_enqueue_style('style-tabs');
100
  wp_enqueue_style('accordions-style');
101
  wp_enqueue_style('jquery-ui');
102
- wp_enqueue_style('fontawesome-5');
 
 
 
 
 
 
 
103
 
104
  wp_enqueue_script( 'jquery' );
105
  wp_enqueue_script( 'jquery-ui-core' );
@@ -110,40 +125,136 @@ function accordions_tabs_main_style($atts){
110
 
111
  ?>
112
  <style type='text/css'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  #accordions-tabs-<?php echo $post_id; ?>{
 
114
  text-align: <?php echo $container_text_align; ?>;
 
115
  }
116
  #accordions-tabs-<?php echo $post_id; ?>{
117
- background:<?php echo $container_background_color; ?> url(<?php echo $container_background_img; ?>) repeat
118
- scroll 0 0;
 
 
 
 
 
 
119
  padding: <?php echo $container_padding; ?>;
 
120
  }
121
  #accordions-tabs-<?php echo $post_id; ?> .tabs-nav{
 
122
  background-color:<?php echo $header_background_color; ?>;
123
- color:<?php echo $header_color; ?>;
124
- font-size:<?php echo $header_font_size; ?>;
125
  margin:<?php echo $header_margin; ?> !important;
 
 
126
  padding:<?php echo $header_padding; ?> !important;
 
 
 
 
127
  border: none;
128
- border-radius: 0px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  }
130
  #accordions-tabs-<?php echo $post_id; ?> .accordions-head-title{
 
131
  color:<?php echo $header_color; ?>;
 
132
  }
133
  #accordions-tabs-<?php echo $post_id; ?> .ui-tabs-active{
134
- background: <?php echo $header_active_background_color; ?>;
135
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  }
137
  #accordions-tabs-<?php echo $post_id; ?> .tabs-content{
 
138
  background-color:<?php echo $body_background_color; ?>;
 
 
139
  color:<?php echo $body_color; ?>;
 
 
140
  font-size:<?php echo $body_font_size; ?>;
 
 
141
  margin:<?php echo $body_margin; ?>;
 
 
142
  padding:<?php echo $body_padding; ?>;
 
143
  }
144
  #accordions-tabs-<?php echo $post_id; ?> .accordion-icons span{
 
145
  color:<?php echo $icon_color; ?>;
 
 
146
  font-size:<?php echo $icon_font_size; ?>;
 
147
  }
148
 
149
 
81
  $container_background_color = isset($container['background_color']) ? $container['background_color'] : '';
82
  $container_text_align = isset($container['text_align']) ? $container['text_align'] : '';
83
  $container_background_img = isset($container['background_img']) ? $container['background_img'] : '';
84
+ $width_large = isset($container['width_large']) ? $container['width_large'] : '';
85
+ $width_medium = isset($container['width_medium']) ? $container['width_medium'] : '';
86
+ $width_small = isset($container['width_small']) ? $container['width_small'] : '';
87
 
88
  $custom_scripts = isset($accordions_options['custom_scripts']) ? $accordions_options['custom_scripts'] : array();
89
  $custom_js = isset($custom_scripts['custom_js']) ? $custom_scripts['custom_js'] : '';
96
  $tabs_is_vertical = isset($tabs['is_vertical']) ? $tabs['is_vertical'] : '';
97
  $navs_width_ratio = isset($tabs['navs_width_ratio']) ? $tabs['navs_width_ratio'] : '';
98
  $tabs_icon_toggle = isset($tabs['tabs_icon_toggle']) ? $tabs['tabs_icon_toggle'] : '';
99
+ $navs_alignment = isset($tabs['navs_alignment']) ? $tabs['navs_alignment'] : 'left';
100
 
101
+ $accordions_settings = get_option('accordions_settings');
102
+ $font_aw_version = isset($accordions_settings['font_aw_version']) ? $accordions_settings['font_aw_version'] : 'none';
103
 
104
 
105
+
106
+ wp_enqueue_style('accordions-style');
107
  wp_enqueue_style('style-tabs');
108
  wp_enqueue_style('accordions-style');
109
  wp_enqueue_style('jquery-ui');
110
+
111
+ if($font_aw_version =='v_5'){
112
+ wp_enqueue_style('fontawesome-5');
113
+ }elseif($font_aw_version =='v_4'){
114
+ wp_enqueue_style('fontawesome-4');
115
+ }else{
116
+
117
+ }
118
 
119
  wp_enqueue_script( 'jquery' );
120
  wp_enqueue_script( 'jquery-ui-core' );
125
 
126
  ?>
127
  <style type='text/css'>
128
+ @media only screen and (min-width: 1024px ){
129
+ #accordions-tabs-<?php echo $post_id; ?> {
130
+ <?php if(!empty($width_large)):?>
131
+ width: <?php echo $width_large; ?>;
132
+ <?php endif; ?>
133
+ }
134
+ }
135
+ @media only screen and ( min-width: 768px ) and ( max-width: 1023px ) {
136
+ #accordions-tabs-<?php echo $post_id; ?> {
137
+ <?php if(!empty($width_medium)):?>
138
+ width: <?php echo $width_medium; ?>;
139
+ <?php endif; ?>
140
+ }
141
+ }
142
+ @media only screen and ( min-width: 0px ) and ( max-width: 767px ){
143
+ #accordions-tabs-<?php echo $post_id; ?> {
144
+ <?php if(!empty($width_small)):?>
145
+ width: <?php echo $width_small; ?>;
146
+ <?php endif; ?>
147
+ }
148
+ }
149
  #accordions-tabs-<?php echo $post_id; ?>{
150
+ <?php if(!empty($container_text_align)):?>
151
  text-align: <?php echo $container_text_align; ?>;
152
+ <?php endif; ?>
153
  }
154
  #accordions-tabs-<?php echo $post_id; ?>{
155
+ <?php if(!empty($container_background_color)):?>
156
+ background-color:<?php echo $container_background_color; ?>;
157
+ <?php endif; ?>
158
+ <?php if(!empty($container_background_img)):?>
159
+ background-image: url(<?php echo $container_background_img; ?>);
160
+ <?php endif; ?>
161
+
162
+ <?php if(!empty($container_padding)):?>
163
  padding: <?php echo $container_padding; ?>;
164
+ <?php endif; ?>
165
  }
166
  #accordions-tabs-<?php echo $post_id; ?> .tabs-nav{
167
+ <?php if(!empty($header_background_color)):?>
168
  background-color:<?php echo $header_background_color; ?>;
169
+ <?php endif; ?>
170
+ <?php if(!empty($header_margin)):?>
171
  margin:<?php echo $header_margin; ?> !important;
172
+ <?php endif; ?>
173
+ <?php if(!empty($header_padding)):?>
174
  padding:<?php echo $header_padding; ?> !important;
175
+ <?php endif; ?>
176
+ <?php if(!empty($navs_alignment)):?>
177
+ float:<?php echo $navs_alignment; ?> !important;
178
+ <?php endif; ?>
179
  border: none;
180
+ }
181
+ #accordions-tabs-<?php echo $post_id; ?> .tabs-nav:hover{
182
+ <?php if(!empty($header_active_background_color)):?>
183
+ background-color: <?php echo $header_active_background_color; ?>;
184
+ <?php else:?>
185
+ background-color: rgba(0,0,0,0);
186
+ <?php endif; ?>
187
+ }
188
+
189
+
190
+ #accordions-tabs-<?php echo $post_id; ?> .ui-tabs-anchor{
191
+ <?php if(!empty($header_color)):?>
192
+ color:<?php echo $header_color; ?>;
193
+ <?php endif; ?>
194
+ <?php if(!empty($header_font_size)):?>
195
+ font-size:<?php echo $header_font_size; ?>;
196
+ <?php endif; ?>
197
+ margin:0px !important;
198
+ padding:0px !important;
199
  }
200
  #accordions-tabs-<?php echo $post_id; ?> .accordions-head-title{
201
+ <?php if(!empty($header_color)):?>
202
  color:<?php echo $header_color; ?>;
203
+ <?php endif; ?>
204
  }
205
  #accordions-tabs-<?php echo $post_id; ?> .ui-tabs-active{
206
+ <?php if(!empty($header_active_background_color)):?>
207
+ background-color: <?php echo $header_active_background_color; ?>;
208
+ <?php else:?>
209
+ background-color: rgba(0,0,0,0);
210
+ <?php endif; ?>
211
+ }
212
+ #accordions-tabs-<?php echo $post_id; ?> .accordion-icons{
213
+ <?php if(!empty($icon_color)):?>
214
+ color:<?php echo $icon_color; ?>;
215
+ <?php endif; ?>
216
+ <?php if(!empty($icon_font_size)):?>
217
+ font-size:<?php echo $icon_font_size; ?>;
218
+ <?php endif; ?>
219
+ <?php if(!empty($icon_background_color)):?>
220
+ background:<?php echo $icon_background_color; ?> none repeat scroll 0 0;
221
+ <?php endif; ?>
222
+ <?php if(!empty($icon_padding)):?>
223
+ padding:<?php echo $icon_padding; ?>;
224
+ <?php endif; ?>
225
+ <?php if(!empty($icon_margin)):?>
226
+ margin:<?php echo $icon_margin; ?>;
227
+ <?php endif; ?>
228
+ }
229
+ #accordions-tabs-<?php echo $post_id; ?> .tabs-nav:hover .accordion-icons span{
230
+ <?php if(!empty($icon_color_hover)):?>
231
+ color:<?php echo $icon_color_hover; ?>;
232
+ <?php endif; ?>
233
  }
234
  #accordions-tabs-<?php echo $post_id; ?> .tabs-content{
235
+ <?php if(!empty($body_background_color)):?>
236
  background-color:<?php echo $body_background_color; ?>;
237
+ <?php endif; ?>
238
+ <?php if(!empty($body_color)):?>
239
  color:<?php echo $body_color; ?>;
240
+ <?php endif; ?>
241
+ <?php if(!empty($body_font_size)):?>
242
  font-size:<?php echo $body_font_size; ?>;
243
+ <?php endif; ?>
244
+ <?php if(!empty($body_margin)):?>
245
  margin:<?php echo $body_margin; ?>;
246
+ <?php endif; ?>
247
+ <?php if(!empty($body_padding)):?>
248
  padding:<?php echo $body_padding; ?>;
249
+ <?php endif; ?>
250
  }
251
  #accordions-tabs-<?php echo $post_id; ?> .accordion-icons span{
252
+ <?php if(!empty($icon_color)):?>
253
  color:<?php echo $icon_color; ?>;
254
+ <?php endif; ?>
255
+ <?php if(!empty($icon_font_size)):?>
256
  font-size:<?php echo $icon_font_size; ?>;
257
+ <?php endif; ?>
258
  }
259
 
260