Version Description
- 13-03-2020 - fix - adding new content conflict with 3rd party plugin.
Download this release
Release Info
Developer | pickplugins |
Plugin | Accordion |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- accordions.php +10 -2
- assets/settings-tabs/settings-tabs.js +25 -0
- includes/3rd-party/arconix-faq/functions-data-import.php +197 -0
- includes/3rd-party/easy-accordion-free/functions-data-import.php +223 -0
- includes/3rd-party/responsive-accordion-and-collapse/functions-data-import.php +234 -0
- includes/3rd-party/responsive-tabs/functions-data-import.php +202 -0
- includes/3rd-party/vc-tabs/functions-data-import.php +234 -0
- includes/class-post-meta-accordions-hook.php +2 -2
- includes/class-post-types.php +1 -1
- includes/class-settings-hook.php +2 -1
- includes/class-settings-tabs.php +33 -0
- includes/functions-data-upgrade.php +1 -1
- includes/menu/upgrade-status.php +3 -3
- readme.txt +10 -1
- templates/accordion/accordion-hook.php +10 -7
- templates/tabs/tabs-hook.php +7 -6
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: 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.
|
27 |
define('accordions_plugin_name', 'Accordions' );
|
28 |
define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
|
29 |
|
@@ -57,6 +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 |
|
61 |
add_action( 'wp_enqueue_scripts', array( $this, '_front_scripts' ) );
|
62 |
add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
|
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 |
|
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 |
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 |
+
|
67 |
+
|
68 |
|
69 |
add_action( 'wp_enqueue_scripts', array( $this, '_front_scripts' ) );
|
70 |
add_action( 'admin_enqueue_scripts', array( $this, '_admin_scripts' ) );
|
assets/settings-tabs/settings-tabs.js
CHANGED
@@ -30,6 +30,31 @@ jQuery(document).ready(function($){
|
|
30 |
|
31 |
$(".settings-tabs .sortable" ).sortable({ handle: ".sort" });
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
$(document).on('click','.settings-tabs .tab-nav',function(){
|
34 |
|
35 |
$(this).parent().parent().children('.tab-navs').children('.tab-nav').removeClass('active');
|
30 |
|
31 |
$(".settings-tabs .sortable" ).sortable({ handle: ".sort" });
|
32 |
|
33 |
+
$(document).on('click','.settings-tabs .textarea-editor',function(){
|
34 |
+
|
35 |
+
id = $(this).attr('id');
|
36 |
+
editor_enabled = $(this).attr('editor_enabled');
|
37 |
+
|
38 |
+
|
39 |
+
console.log(typeof wp.editor);
|
40 |
+
|
41 |
+
if(editor_enabled == 'no' && typeof wp.editor != 'undefined'){
|
42 |
+
wp.editor.initialize( id, {
|
43 |
+
mediaButtons: true,
|
44 |
+
tinymce: {
|
45 |
+
toolbar1: 'bold,italic,bullist,numlist,link,blockquote,alignleft,aligncenter,alignright,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,undo,redo'
|
46 |
+
},
|
47 |
+
quicktags: true,
|
48 |
+
} );
|
49 |
+
|
50 |
+
$(this).attr('editor_enabled','yes');
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
})
|
57 |
+
|
58 |
$(document).on('click','.settings-tabs .tab-nav',function(){
|
59 |
|
60 |
$(this).parent().parent().children('.tab-navs').children('.tab-nav').removeClass('active');
|
includes/3rd-party/arconix-faq/functions-data-import.php
ADDED
@@ -0,0 +1,197 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
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 |
+
|
17 |
+
$meta_query[] = array(
|
18 |
+
'key' => 'import_done',
|
19 |
+
'compare' => 'NOT EXISTS'
|
20 |
+
);
|
21 |
+
|
22 |
+
$args = array(
|
23 |
+
'post_type'=>'faq',
|
24 |
+
'post_status'=>'publish',
|
25 |
+
'posts_per_page'=> 1,
|
26 |
+
'meta_query'=> $meta_query,
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
|
31 |
+
$wp_query = new WP_Query($args);
|
32 |
+
|
33 |
+
|
34 |
+
if ( $wp_query->have_posts() ) :
|
35 |
+
while ( $wp_query->have_posts() ) : $wp_query->the_post();
|
36 |
+
|
37 |
+
$post_id = get_the_id();
|
38 |
+
$post_title = get_the_title();
|
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 |
+
|
53 |
+
|
54 |
+
$accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
|
55 |
+
$accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
|
56 |
+
|
57 |
+
$accordions_options['icon']['active'] = '';
|
58 |
+
$accordions_options['icon']['inactive'] = '';
|
59 |
+
$accordions_options['icon']['position'] = '';
|
60 |
+
$accordions_options['icon']['color'] = '';
|
61 |
+
$accordions_options['icon']['color_hover'] = '';
|
62 |
+
$accordions_options['icon']['font_size'] = 'px';
|
63 |
+
$accordions_options['icon']['background_color'] = '';
|
64 |
+
$accordions_options['icon']['padding'] = '';
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
$accordions_options['header']['class'] = '';
|
70 |
+
$accordions_options['header']['active_background_color'] = '';
|
71 |
+
$accordions_options['header']['background_color'] = '';
|
72 |
+
$accordions_options['header']['background_opacity'] = '';
|
73 |
+
$accordions_options['header']['color'] = '';
|
74 |
+
$accordions_options['header']['color_hover'] = '';
|
75 |
+
$accordions_options['header']['font_size'] = '';
|
76 |
+
$accordions_options['header']['font_family'] = '';
|
77 |
+
$accordions_options['header']['padding'] = '';
|
78 |
+
$accordions_options['header']['margin'] = '';
|
79 |
+
|
80 |
+
|
81 |
+
$accordions_options['body']['class'] = '';
|
82 |
+
|
83 |
+
$accordions_options['body']['active_background_color'] = '';
|
84 |
+
$accordions_options['body']['background_color'] = '';
|
85 |
+
$accordions_options['body']['background_opacity'] = '';
|
86 |
+
$accordions_options['body']['color'] = '';
|
87 |
+
$accordions_options['body']['font_size'] = '';
|
88 |
+
$accordions_options['body']['font_family'] = '';
|
89 |
+
$accordions_options['body']['padding'] = '';
|
90 |
+
$accordions_options['body']['margin'] = '';
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
$accordions_options['lazy_load'] = !empty($eap_preloader) ? 'yes' : 'no';
|
97 |
+
$accordions_options['lazy_load_src'] = '';
|
98 |
+
$accordions_options['hide_edit'] = '';
|
99 |
+
$accordions_options['accordion']['collapsible'] = 'true';
|
100 |
+
$accordions_options['accordion']['expanded_other'] = !empty($eap_mutliple_collapse) ? 'yes' : 'no';
|
101 |
+
$accordions_options['accordion']['height_style'] = !empty($eap_accordion_fillspace) ? 'content' : '';
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
$accordions_options['accordion']['active_event'] = '';
|
106 |
+
$accordions_options['accordion']['enable_search'] = '';
|
107 |
+
$accordions_options['accordion']['search_placeholder_text'] = '';
|
108 |
+
$accordions_options['accordion']['click_scroll_top'] = '';
|
109 |
+
$accordions_options['accordion']['click_scroll_top_offset'] = '';
|
110 |
+
$accordions_options['accordion']['header_toggle'] = '';
|
111 |
+
$accordions_options['accordion']['animate_style'] = '';
|
112 |
+
$accordions_options['accordion']['animate_delay'] = '';
|
113 |
+
$accordions_options['accordion']['expand_collapse_display'] = '';
|
114 |
+
$accordions_options['accordion']['expand_collapse_bg_color'] = '';
|
115 |
+
$accordions_options['accordion']['expand_collapse_text'] = '';
|
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))
|
130 |
+
foreach ($accordion_content_source as $index => $accordion_single_data){
|
131 |
+
|
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 |
+
|
154 |
+
$i++;
|
155 |
+
}
|
156 |
+
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
$post_data = array(
|
161 |
+
'post_title' => $post_title,
|
162 |
+
'post_content' => '',
|
163 |
+
'post_status' => 'publish',
|
164 |
+
'post_type' => 'accordions',
|
165 |
+
'post_author' => 1,
|
166 |
+
);
|
167 |
+
|
168 |
+
$accordions_id = wp_insert_post($post_data);
|
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 '##################';
|
176 |
+
echo '<br/>';
|
177 |
+
echo 'import done: '.$post_title;
|
178 |
+
echo '<br/>';
|
179 |
+
|
180 |
+
wp_reset_query();
|
181 |
+
wp_reset_postdata();
|
182 |
+
endwhile;
|
183 |
+
else:
|
184 |
+
|
185 |
+
|
186 |
+
|
187 |
+
//wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
188 |
+
|
189 |
+
|
190 |
+
endif;
|
191 |
+
|
192 |
+
|
193 |
+
}
|
194 |
+
|
195 |
+
|
196 |
+
|
197 |
+
|
includes/3rd-party/easy-accordion-free/functions-data-import.php
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined('ABSPATH')) exit; // if direct access
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
add_shortcode('accordions_import_cron_easy_accordion_free', 'accordions_import_cron_easy_accordion_free');
|
10 |
+
add_action('accordions_import_cron_easy_accordion_free', 'accordions_import_cron_easy_accordion_free');
|
11 |
+
|
12 |
+
|
13 |
+
function accordions_import_cron_easy_accordion_free(){
|
14 |
+
|
15 |
+
$meta_query = array();
|
16 |
+
|
17 |
+
$meta_query[] = array(
|
18 |
+
'key' => 'import_done',
|
19 |
+
'compare' => 'NOT EXISTS'
|
20 |
+
);
|
21 |
+
|
22 |
+
$args = array(
|
23 |
+
'post_type'=>'sp_easy_accordion',
|
24 |
+
'post_status'=>'publish',
|
25 |
+
'posts_per_page'=> 1,
|
26 |
+
'meta_query'=> $meta_query,
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
|
31 |
+
$wp_query = new WP_Query($args);
|
32 |
+
|
33 |
+
|
34 |
+
if ( $wp_query->have_posts() ) :
|
35 |
+
while ( $wp_query->have_posts() ) : $wp_query->the_post();
|
36 |
+
|
37 |
+
$post_id = get_the_id();
|
38 |
+
$post_title = get_the_title();
|
39 |
+
$accordions_options = array();
|
40 |
+
|
41 |
+
//echo $accordions_title.'<br/>';
|
42 |
+
$sp_eap_upload_options = get_post_meta( $post_id, 'sp_eap_upload_options', true );
|
43 |
+
$sp_eap_shortcode_options = get_post_meta( $post_id, 'sp_eap_shortcode_options', true );
|
44 |
+
|
45 |
+
$eap_accordion_type = $sp_eap_upload_options['eap_accordion_type'];
|
46 |
+
$accordion_content_source = $sp_eap_upload_options['accordion_content_source'];
|
47 |
+
|
48 |
+
|
49 |
+
echo '<pre>'.var_export($accordion_content_source, ture).'</pre>';
|
50 |
+
|
51 |
+
|
52 |
+
$eap_accordion_event = $sp_eap_shortcode_options['eap_accordion_event'];
|
53 |
+
$eap_mutliple_collapse = $sp_eap_shortcode_options['eap_mutliple_collapse'];
|
54 |
+
$eap_accordion_fillspace = $sp_eap_shortcode_options['eap_accordion_fillspace'];
|
55 |
+
$eap_preloader = $sp_eap_shortcode_options['eap_preloader'];
|
56 |
+
|
57 |
+
$eap_animation_time = $sp_eap_shortcode_options['eap_animation_time'];
|
58 |
+
$eap_icon_size = $sp_eap_shortcode_options['eap_icon_size']['all'];
|
59 |
+
$eap_icon_color_set = $sp_eap_shortcode_options['eap_icon_color_set'];
|
60 |
+
$eap_icon_position = $sp_eap_shortcode_options['eap_icon_position'];
|
61 |
+
$eap_title_color = $sp_eap_shortcode_options['eap_title_color'];
|
62 |
+
$eap_header_bg_color = $sp_eap_shortcode_options['eap_header_bg_color'];
|
63 |
+
$eap_description_color = $sp_eap_shortcode_options['eap_description_color'];
|
64 |
+
$eap_description_bg_color = $sp_eap_shortcode_options['eap_description_bg_color'];
|
65 |
+
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
$accordions_icons_plus = 'plus';
|
70 |
+
$accordions_icons_minus = 'minus';
|
71 |
+
|
72 |
+
|
73 |
+
$accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
|
74 |
+
$accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
|
75 |
+
|
76 |
+
$accordions_options['icon']['active'] = $accordions_icons_plus;
|
77 |
+
$accordions_options['icon']['inactive'] = $accordions_icons_minus;
|
78 |
+
$accordions_options['icon']['position'] = $eap_icon_position;
|
79 |
+
$accordions_options['icon']['color'] = $eap_icon_color_set;
|
80 |
+
$accordions_options['icon']['color_hover'] = '';
|
81 |
+
$accordions_options['icon']['font_size'] = $eap_icon_size.'px';
|
82 |
+
$accordions_options['icon']['background_color'] = '';
|
83 |
+
$accordions_options['icon']['padding'] = '';
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
$accordions_options['header']['class'] = '';
|
89 |
+
$accordions_options['header']['active_background_color'] = '';
|
90 |
+
$accordions_options['header']['background_color'] = $eap_header_bg_color;
|
91 |
+
$accordions_options['header']['background_opacity'] = '';
|
92 |
+
$accordions_options['header']['color'] = $eap_title_color;
|
93 |
+
$accordions_options['header']['color_hover'] = '';
|
94 |
+
$accordions_options['header']['font_size'] = '';
|
95 |
+
$accordions_options['header']['font_family'] = '';
|
96 |
+
$accordions_options['header']['padding'] = '';
|
97 |
+
$accordions_options['header']['margin'] = '';
|
98 |
+
|
99 |
+
|
100 |
+
$accordions_options['body']['class'] = '';
|
101 |
+
|
102 |
+
$accordions_options['body']['active_background_color'] = '';
|
103 |
+
$accordions_options['body']['background_color'] = $eap_description_bg_color;
|
104 |
+
$accordions_options['body']['background_opacity'] = '';
|
105 |
+
$accordions_options['body']['color'] = $eap_description_color;
|
106 |
+
$accordions_options['body']['font_size'] = '';
|
107 |
+
$accordions_options['body']['font_family'] = '';
|
108 |
+
$accordions_options['body']['padding'] = '';
|
109 |
+
$accordions_options['body']['margin'] = '';
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
+
|
114 |
+
|
115 |
+
$accordions_options['lazy_load'] = !empty($eap_preloader) ? 'yes' : 'no';
|
116 |
+
$accordions_options['lazy_load_src'] = '';
|
117 |
+
$accordions_options['hide_edit'] = '';
|
118 |
+
$accordions_options['accordion']['collapsible'] = 'true';
|
119 |
+
$accordions_options['accordion']['expanded_other'] = !empty($eap_mutliple_collapse) ? 'yes' : 'no';
|
120 |
+
$accordions_options['accordion']['height_style'] = !empty($eap_accordion_fillspace) ? 'content' : '';
|
121 |
+
|
122 |
+
if($eap_accordion_event == 'ea-click'){
|
123 |
+
$active_event = 'click';
|
124 |
+
}elseif ($eap_accordion_event == 'ea-hover'){
|
125 |
+
$active_event = 'mouseover';
|
126 |
+
}else{
|
127 |
+
$active_event = 'click';
|
128 |
+
}
|
129 |
+
|
130 |
+
$accordions_options['accordion']['active_event'] = $active_event;
|
131 |
+
$accordions_options['accordion']['enable_search'] = '';
|
132 |
+
$accordions_options['accordion']['search_placeholder_text'] = '';
|
133 |
+
$accordions_options['accordion']['click_scroll_top'] = '';
|
134 |
+
$accordions_options['accordion']['click_scroll_top_offset'] = '';
|
135 |
+
$accordions_options['accordion']['header_toggle'] = '';
|
136 |
+
$accordions_options['accordion']['animate_style'] = '';
|
137 |
+
$accordions_options['accordion']['animate_delay'] = $eap_animation_time;
|
138 |
+
$accordions_options['accordion']['expand_collapse_display'] = '';
|
139 |
+
$accordions_options['accordion']['expand_collapse_bg_color'] = '';
|
140 |
+
$accordions_options['accordion']['expand_collapse_text'] = '';
|
141 |
+
$accordions_options['accordion']['is_child'] = '';
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
|
148 |
+
|
149 |
+
|
150 |
+
|
151 |
+
|
152 |
+
$i = 0;
|
153 |
+
|
154 |
+
if(!empty($accordion_content_source))
|
155 |
+
foreach ($accordion_content_source as $index => $accordion_single_data){
|
156 |
+
|
157 |
+
$accordion_content_title = $accordion_single_data['accordion_content_title'];
|
158 |
+
$accordion_content_description = $accordion_single_data['accordion_content_description'];
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
$accordions_options['content'][$index]['header'] = $accordion_content_title;
|
165 |
+
|
166 |
+
$accordions_options['content'][$index]['body'] = $accordion_content_description;
|
167 |
+
$accordions_options['content'][$index]['hide'] = 'no';
|
168 |
+
$accordions_options['content'][$index]['toggled_text'] = '';
|
169 |
+
|
170 |
+
|
171 |
+
$accordions_options['content'][$index]['is_active'] = '';
|
172 |
+
|
173 |
+
|
174 |
+
$accordions_options['content'][$index]['active_icon'] = '';
|
175 |
+
$accordions_options['content'][$index]['inactive_icon'] = '';
|
176 |
+
|
177 |
+
$accordions_options['content'][$index]['background_color'] = '';
|
178 |
+
$accordions_options['content'][$index]['background_img'] = '';
|
179 |
+
|
180 |
+
$i++;
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
$post_data = array(
|
187 |
+
'post_title' => $post_title,
|
188 |
+
'post_content' => '',
|
189 |
+
'post_status' => 'publish',
|
190 |
+
'post_type' => 'accordions',
|
191 |
+
'post_author' => 1,
|
192 |
+
);
|
193 |
+
|
194 |
+
$accordions_id = wp_insert_post($post_data);
|
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 '##################';
|
202 |
+
echo '<br/>';
|
203 |
+
echo 'import done: '.$post_title;
|
204 |
+
echo '<br/>';
|
205 |
+
|
206 |
+
wp_reset_query();
|
207 |
+
wp_reset_postdata();
|
208 |
+
endwhile;
|
209 |
+
else:
|
210 |
+
|
211 |
+
|
212 |
+
|
213 |
+
//wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
214 |
+
|
215 |
+
|
216 |
+
endif;
|
217 |
+
|
218 |
+
|
219 |
+
}
|
220 |
+
|
221 |
+
|
222 |
+
|
223 |
+
|
includes/3rd-party/responsive-accordion-and-collapse/functions-data-import.php
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined('ABSPATH')) exit; // if direct access
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
add_shortcode('accordions_import_cron_wpsm_ac', 'accordions_import_cron_wpsm_ac');
|
10 |
+
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 |
+
|
17 |
+
$meta_query[] = array(
|
18 |
+
'key' => 'import_done',
|
19 |
+
'compare' => 'NOT EXISTS'
|
20 |
+
);
|
21 |
+
|
22 |
+
$args = array(
|
23 |
+
'post_type'=>'responsive_accordion',
|
24 |
+
'post_status'=>'publish',
|
25 |
+
'posts_per_page'=> 1,
|
26 |
+
'meta_query'=> $meta_query,
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
|
31 |
+
$accordions_fontawesome_ver = get_option('accordions_fontawesome_ver');
|
32 |
+
|
33 |
+
$wp_query = new WP_Query($args);
|
34 |
+
|
35 |
+
|
36 |
+
if ( $wp_query->have_posts() ) :
|
37 |
+
while ( $wp_query->have_posts() ) : $wp_query->the_post();
|
38 |
+
|
39 |
+
$post_id = get_the_id();
|
40 |
+
$post_title = get_the_title();
|
41 |
+
$accordions_options = array();
|
42 |
+
|
43 |
+
//echo $accordions_title.'<br/>';
|
44 |
+
$wpsm_accordion_data = get_post_meta( $post_id, 'wpsm_accordion_data', true );
|
45 |
+
$wpsm_accordion_data = unserialize( $wpsm_accordion_data );
|
46 |
+
|
47 |
+
$Accordion_Settings = get_post_meta( $post_id, 'Accordion_Settings', true);
|
48 |
+
$Accordion_Settings = unserialize( $Accordion_Settings );
|
49 |
+
|
50 |
+
$acc_sec_title = isset($Accordion_Settings['acc_sec_title']) ? $Accordion_Settings['acc_sec_title'] : 'yes';
|
51 |
+
$op_cl_icon = isset($Accordion_Settings['op_cl_icon']) ? $Accordion_Settings['op_cl_icon'] : 'yes';
|
52 |
+
$acc_title_icon = isset($Accordion_Settings['acc_title_icon']) ? $Accordion_Settings['acc_title_icon'] : 'yes';
|
53 |
+
$acc_radius = isset($Accordion_Settings['acc_radius']) ? $Accordion_Settings['acc_radius'] : 'yes';
|
54 |
+
$acc_margin = isset($Accordion_Settings['acc_margin']) ? $Accordion_Settings['acc_margin'] : 'yes';
|
55 |
+
$enable_toggle = isset($Accordion_Settings['enable_toggle']) ? $Accordion_Settings['enable_toggle'] : 'yes';
|
56 |
+
$enable_ac_border = isset($Accordion_Settings['enable_ac_border']) ? $Accordion_Settings['enable_ac_border'] : 'yes';
|
57 |
+
$acc_op_cl_align = isset($Accordion_Settings['acc_op_cl_align']) ? $Accordion_Settings['acc_op_cl_align'] : 'right';
|
58 |
+
$acc_title_bg_clr = isset($Accordion_Settings['acc_title_bg_clr']) ? $Accordion_Settings['acc_title_bg_clr'] : '#e8e8e8';
|
59 |
+
$acc_title_icon_clr = isset($Accordion_Settings['acc_title_icon_clr']) ? $Accordion_Settings['acc_title_icon_clr'] : '#000000';
|
60 |
+
$acc_desc_bg_clr = isset($Accordion_Settings['acc_desc_bg_clr']) ? $Accordion_Settings['acc_desc_bg_clr'] : '#ffffff';
|
61 |
+
$acc_desc_font_clr = isset($Accordion_Settings['acc_desc_font_clr']) ? $Accordion_Settings['acc_desc_font_clr'] : '#000000';
|
62 |
+
$title_size = isset($Accordion_Settings['title_size']) ? $Accordion_Settings['title_size'] : '18';
|
63 |
+
$des_size = isset($Accordion_Settings['des_size']) ? $Accordion_Settings['des_size'] : '16';
|
64 |
+
$font_family = isset($Accordion_Settings['font_family']) ? $Accordion_Settings['font_family'] : 'Open Sans';
|
65 |
+
$expand_option = isset($Accordion_Settings['expand_option']) ? $Accordion_Settings['expand_option'] : 1;
|
66 |
+
$ac_styles = isset($Accordion_Settings['ac_styles']) ? $Accordion_Settings['ac_styles'] : 1;
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
echo '<pre>'.var_export($acc_sec_title, ture).'</pre>';
|
72 |
+
|
73 |
+
$accordions_icons_plus = 'plus';
|
74 |
+
$accordions_icons_minus = 'minus';
|
75 |
+
|
76 |
+
|
77 |
+
$accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
|
78 |
+
$accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
|
79 |
+
|
80 |
+
$accordions_options['icon']['active'] = $accordions_icons_plus;
|
81 |
+
$accordions_options['icon']['inactive'] = $accordions_icons_minus;
|
82 |
+
$accordions_options['icon']['position'] = $acc_op_cl_align;
|
83 |
+
$accordions_options['icon']['color'] = $acc_title_icon_clr;
|
84 |
+
$accordions_options['icon']['color_hover'] = '';
|
85 |
+
$accordions_options['icon']['font_size'] = $title_size.'px';
|
86 |
+
$accordions_options['icon']['background_color'] = '';
|
87 |
+
$accordions_options['icon']['padding'] = '';
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
$accordions_options['header']['class'] = ($acc_radius == 'yes') ? 'border-semi-round' :'';
|
93 |
+
$accordions_options['header']['active_background_color'] = '';
|
94 |
+
$accordions_options['header']['background_color'] = $acc_title_bg_clr;
|
95 |
+
$accordions_options['header']['background_opacity'] = '';
|
96 |
+
$accordions_options['header']['color'] = '';
|
97 |
+
$accordions_options['header']['color_hover'] = '';
|
98 |
+
$accordions_options['header']['font_size'] = $title_size.'px';
|
99 |
+
$accordions_options['header']['font_family'] = $font_family;
|
100 |
+
$accordions_options['header']['padding'] = '';
|
101 |
+
$accordions_options['header']['margin'] = ($acc_margin == 'yes') ? '5px' :'';
|
102 |
+
|
103 |
+
|
104 |
+
$accordions_options['body']['class'] = ($enable_ac_border == 'yes') ? 'border-2px' :'';
|
105 |
+
|
106 |
+
$accordions_options['body']['active_background_color'] = '';
|
107 |
+
$accordions_options['body']['background_color'] = $acc_desc_bg_clr;
|
108 |
+
$accordions_options['body']['background_opacity'] = '';
|
109 |
+
$accordions_options['body']['color'] = $acc_desc_font_clr;
|
110 |
+
$accordions_options['body']['font_size'] = '';
|
111 |
+
$accordions_options['body']['font_family'] = $font_family;
|
112 |
+
$accordions_options['body']['padding'] = '';
|
113 |
+
$accordions_options['body']['margin'] = '';
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
$accordions_options['lazy_load'] = '';
|
120 |
+
$accordions_options['lazy_load_src'] = '';
|
121 |
+
$accordions_options['hide_edit'] = '';
|
122 |
+
$accordions_options['accordion']['collapsible'] = ($enable_toggle == 'yes') ? 'true' :'false';
|
123 |
+
$accordions_options['accordion']['expanded_other'] = ($enable_toggle == 'yes') ? 'yes' :'no';
|
124 |
+
$accordions_options['accordion']['height_style'] = 'content';
|
125 |
+
$accordions_options['accordion']['active_event'] = 'click';
|
126 |
+
$accordions_options['accordion']['enable_search'] = '';
|
127 |
+
$accordions_options['accordion']['search_placeholder_text'] = '';
|
128 |
+
$accordions_options['accordion']['click_scroll_top'] = '';
|
129 |
+
$accordions_options['accordion']['click_scroll_top_offset'] = '';
|
130 |
+
$accordions_options['accordion']['header_toggle'] = '';
|
131 |
+
$accordions_options['accordion']['animate_style'] = '';
|
132 |
+
$accordions_options['accordion']['animate_delay'] = '';
|
133 |
+
$accordions_options['accordion']['expand_collapse_display'] = '';
|
134 |
+
$accordions_options['accordion']['expand_collapse_bg_color'] = '';
|
135 |
+
$accordions_options['accordion']['expand_collapse_text'] = '';
|
136 |
+
$accordions_options['accordion']['is_child'] = '';
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
|
148 |
+
$i = 0;
|
149 |
+
|
150 |
+
if(!empty($wpsm_accordion_data))
|
151 |
+
foreach ($wpsm_accordion_data as $index => $accordion_single_data){
|
152 |
+
|
153 |
+
$accordion_title = $accordion_single_data['accordion_title'];
|
154 |
+
$accordion_title_icon = $accordion_single_data['accordion_title_icon'];
|
155 |
+
$enable_single_icon = $accordion_single_data['enable_single_icon'];
|
156 |
+
$accordion_desc = $accordion_single_data['accordion_desc'];
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
$accordions_options['content'][$index]['header'] = ($acc_title_icon =='yes') ? (($enable_single_icon == 'yes') ? '<i class="fa '.$accordion_title_icon.'"></i> '.$accordion_title : $accordion_title) : $accordion_title;
|
162 |
+
|
163 |
+
$accordions_options['content'][$index]['body'] = $accordion_desc;
|
164 |
+
$accordions_options['content'][$index]['hide'] = 'no';
|
165 |
+
$accordions_options['content'][$index]['toggled_text'] = '';
|
166 |
+
|
167 |
+
|
168 |
+
$accordions_options['content'][$index]['is_active'] = ($expand_option == '1' && $i==0) ? 'yes' :'';
|
169 |
+
|
170 |
+
|
171 |
+
$active_icon = !empty($accordions_section_icon_plus[$index]) ? '<i class="fa '.$enable_single_icon.'"></i>' : '';
|
172 |
+
$inactive_icon = !empty($accordions_section_icon_minus[$index]) ? '<i class="fa '.$accordions_section_icon_minus[$index].'"></i>' : '';
|
173 |
+
|
174 |
+
$accordions_options['content'][$index]['active_icon'] = $active_icon;
|
175 |
+
$accordions_options['content'][$index]['inactive_icon'] = $inactive_icon;
|
176 |
+
|
177 |
+
$accordions_options['content'][$index]['background_color'] = '';
|
178 |
+
$accordions_options['content'][$index]['background_img'] = '';
|
179 |
+
|
180 |
+
$i++;
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
|
187 |
+
$accordions_id = wp_insert_post(
|
188 |
+
array(
|
189 |
+
'post_title' => $post_title,
|
190 |
+
'post_content' => '',
|
191 |
+
'post_status' => 'publish',
|
192 |
+
'post_type' => 'accordions',
|
193 |
+
'post_author' => 1,
|
194 |
+
)
|
195 |
+
);
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
+
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
|
205 |
+
|
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/>';
|
214 |
+
echo 'import done: '.$post_title;
|
215 |
+
echo '<br/>';
|
216 |
+
|
217 |
+
wp_reset_query();
|
218 |
+
wp_reset_postdata();
|
219 |
+
endwhile;
|
220 |
+
else:
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
//wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
225 |
+
|
226 |
+
|
227 |
+
endif;
|
228 |
+
|
229 |
+
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
|
234 |
+
|
includes/3rd-party/responsive-tabs/functions-data-import.php
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined('ABSPATH')) exit; // if direct access
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
add_shortcode('accordions_import_cron_responsive_tabs', 'accordions_import_cron_responsive_tabs');
|
10 |
+
add_action('accordions_import_cron_responsive_tabs', 'accordions_import_cron_responsive_tabs');
|
11 |
+
|
12 |
+
|
13 |
+
function accordions_import_cron_responsive_tabs(){
|
14 |
+
|
15 |
+
$meta_query = array();
|
16 |
+
|
17 |
+
$meta_query[] = array(
|
18 |
+
'key' => 'import_done',
|
19 |
+
'compare' => 'NOT EXISTS'
|
20 |
+
|
21 |
+
);
|
22 |
+
|
23 |
+
$args = array(
|
24 |
+
'post_type'=>'rtbs_tabs',
|
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 |
+
$_rtbs_tabs_head = get_post_meta( $post_id, '_rtbs_tabs_head', true );
|
44 |
+
|
45 |
+
|
46 |
+
|
47 |
+
echo '<pre>'.var_export($_rtbs_tabs_head, ture).'</pre>';
|
48 |
+
|
49 |
+
|
50 |
+
|
51 |
+
|
52 |
+
$accordions_icons_plus = 'plus';
|
53 |
+
$accordions_icons_minus = 'minus';
|
54 |
+
|
55 |
+
|
56 |
+
$accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
|
57 |
+
$accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
|
58 |
+
|
59 |
+
$accordions_options['icon']['active'] = $accordions_icons_plus;
|
60 |
+
$accordions_options['icon']['inactive'] = $accordions_icons_minus;
|
61 |
+
$accordions_options['icon']['position'] = '';
|
62 |
+
$accordions_options['icon']['color'] = '';
|
63 |
+
$accordions_options['icon']['color_hover'] = '';
|
64 |
+
$accordions_options['icon']['font_size'] = '';
|
65 |
+
$accordions_options['icon']['background_color'] = '';
|
66 |
+
$accordions_options['icon']['padding'] = '';
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
$accordions_options['header']['class'] = '';
|
72 |
+
$accordions_options['header']['active_background_color'] = '';
|
73 |
+
$accordions_options['header']['background_color'] = '';
|
74 |
+
$accordions_options['header']['background_opacity'] = '';
|
75 |
+
$accordions_options['header']['color'] = '';
|
76 |
+
$accordions_options['header']['color_hover'] = '';
|
77 |
+
$accordions_options['header']['font_size'] = '';
|
78 |
+
$accordions_options['header']['font_family'] = '';
|
79 |
+
$accordions_options['header']['padding'] = '';
|
80 |
+
$accordions_options['header']['margin'] = '';
|
81 |
+
|
82 |
+
|
83 |
+
$accordions_options['body']['class'] = '';
|
84 |
+
|
85 |
+
$accordions_options['body']['active_background_color'] = '';
|
86 |
+
$accordions_options['body']['background_color'] = '';
|
87 |
+
$accordions_options['body']['background_opacity'] = '';
|
88 |
+
$accordions_options['body']['color'] = '';
|
89 |
+
$accordions_options['body']['font_size'] = '';
|
90 |
+
$accordions_options['body']['font_family'] = '';
|
91 |
+
$accordions_options['body']['padding'] = '';
|
92 |
+
$accordions_options['body']['margin'] = '';
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
$accordions_options['lazy_load'] = 'yes';
|
99 |
+
$accordions_options['lazy_load_src'] = '';
|
100 |
+
$accordions_options['view_type'] = 'tabs';
|
101 |
+
|
102 |
+
$accordions_options['hide_edit'] = '';
|
103 |
+
$accordions_options['accordion']['collapsible'] = 'true';
|
104 |
+
$accordions_options['accordion']['expanded_other'] = 'yes';
|
105 |
+
$accordions_options['accordion']['height_style'] = 'content';
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
$accordions_options['accordion']['active_event'] = '';
|
110 |
+
$accordions_options['accordion']['enable_search'] = '';
|
111 |
+
$accordions_options['accordion']['search_placeholder_text'] = '';
|
112 |
+
$accordions_options['accordion']['click_scroll_top'] = '';
|
113 |
+
$accordions_options['accordion']['click_scroll_top_offset'] = '';
|
114 |
+
$accordions_options['accordion']['header_toggle'] = '';
|
115 |
+
$accordions_options['accordion']['animate_style'] = '';
|
116 |
+
$accordions_options['accordion']['animate_delay'] = '';
|
117 |
+
$accordions_options['accordion']['expand_collapse_display'] = '';
|
118 |
+
$accordions_options['accordion']['expand_collapse_bg_color'] = '';
|
119 |
+
$accordions_options['accordion']['expand_collapse_text'] = '';
|
120 |
+
$accordions_options['accordion']['is_child'] = '';
|
121 |
+
|
122 |
+
|
123 |
+
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
+
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
$i = 0;
|
132 |
+
|
133 |
+
if(!empty($_rtbs_tabs_head))
|
134 |
+
foreach ($_rtbs_tabs_head as $index => $accordion_single_data){
|
135 |
+
|
136 |
+
$_rtbs_title = $accordion_single_data['_rtbs_title'];
|
137 |
+
$_rtbs_content = $accordion_single_data['_rtbs_content'];
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
$accordions_options['content'][$index]['header'] = $_rtbs_title;
|
144 |
+
|
145 |
+
$accordions_options['content'][$index]['body'] = $_rtbs_content;
|
146 |
+
$accordions_options['content'][$index]['hide'] = 'no';
|
147 |
+
$accordions_options['content'][$index]['toggled_text'] = '';
|
148 |
+
|
149 |
+
|
150 |
+
$accordions_options['content'][$index]['is_active'] = '';
|
151 |
+
|
152 |
+
|
153 |
+
$accordions_options['content'][$index]['active_icon'] = '';
|
154 |
+
$accordions_options['content'][$index]['inactive_icon'] = '';
|
155 |
+
|
156 |
+
$accordions_options['content'][$index]['background_color'] = '';
|
157 |
+
$accordions_options['content'][$index]['background_img'] = '';
|
158 |
+
|
159 |
+
$i++;
|
160 |
+
}
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
|
165 |
+
$post_data = array(
|
166 |
+
'post_title' => $post_title,
|
167 |
+
'post_content' => '',
|
168 |
+
'post_status' => 'publish',
|
169 |
+
'post_type' => 'accordions',
|
170 |
+
'post_author' => 1,
|
171 |
+
);
|
172 |
+
|
173 |
+
$accordions_id = wp_insert_post($post_data);
|
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 '##################';
|
181 |
+
echo '<br/>';
|
182 |
+
echo 'import done: '.$post_title;
|
183 |
+
echo '<br/>';
|
184 |
+
|
185 |
+
wp_reset_query();
|
186 |
+
wp_reset_postdata();
|
187 |
+
endwhile;
|
188 |
+
else:
|
189 |
+
|
190 |
+
|
191 |
+
|
192 |
+
//wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
193 |
+
|
194 |
+
|
195 |
+
endif;
|
196 |
+
|
197 |
+
|
198 |
+
}
|
199 |
+
|
200 |
+
|
201 |
+
|
202 |
+
|
includes/3rd-party/vc-tabs/functions-data-import.php
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( ! defined('ABSPATH')) exit; // if direct access
|
3 |
+
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
add_shortcode('accordions_import_cron_vc_tabs', 'accordions_import_cron_vc_tabs');
|
10 |
+
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(
|
23 |
+
'post_type'=>'responsive_accordion',
|
24 |
+
'post_status'=>'publish',
|
25 |
+
'posts_per_page'=> 1,
|
26 |
+
'meta_query'=> $meta_query,
|
27 |
+
|
28 |
+
);
|
29 |
+
|
30 |
+
|
31 |
+
$accordions_fontawesome_ver = get_option('accordions_fontawesome_ver');
|
32 |
+
|
33 |
+
$wp_query = new WP_Query($args);
|
34 |
+
|
35 |
+
|
36 |
+
if ( $wp_query->have_posts() ) :
|
37 |
+
while ( $wp_query->have_posts() ) : $wp_query->the_post();
|
38 |
+
|
39 |
+
$post_id = get_the_id();
|
40 |
+
$post_title = get_the_title();
|
41 |
+
$accordions_options = array();
|
42 |
+
|
43 |
+
//echo $accordions_title.'<br/>';
|
44 |
+
$wpsm_accordion_data = get_post_meta( $post_id, 'wpsm_accordion_data', true );
|
45 |
+
$wpsm_accordion_data = unserialize( $wpsm_accordion_data );
|
46 |
+
|
47 |
+
$Accordion_Settings = get_post_meta( $post_id, 'Accordion_Settings', true);
|
48 |
+
$Accordion_Settings = unserialize( $Accordion_Settings );
|
49 |
+
|
50 |
+
$acc_sec_title = isset($Accordion_Settings['acc_sec_title']) ? $Accordion_Settings['acc_sec_title'] : 'yes';
|
51 |
+
$op_cl_icon = isset($Accordion_Settings['op_cl_icon']) ? $Accordion_Settings['op_cl_icon'] : 'yes';
|
52 |
+
$acc_title_icon = isset($Accordion_Settings['acc_title_icon']) ? $Accordion_Settings['acc_title_icon'] : 'yes';
|
53 |
+
$acc_radius = isset($Accordion_Settings['acc_radius']) ? $Accordion_Settings['acc_radius'] : 'yes';
|
54 |
+
$acc_margin = isset($Accordion_Settings['acc_margin']) ? $Accordion_Settings['acc_margin'] : 'yes';
|
55 |
+
$enable_toggle = isset($Accordion_Settings['enable_toggle']) ? $Accordion_Settings['enable_toggle'] : 'yes';
|
56 |
+
$enable_ac_border = isset($Accordion_Settings['enable_ac_border']) ? $Accordion_Settings['enable_ac_border'] : 'yes';
|
57 |
+
$acc_op_cl_align = isset($Accordion_Settings['acc_op_cl_align']) ? $Accordion_Settings['acc_op_cl_align'] : 'right';
|
58 |
+
$acc_title_bg_clr = isset($Accordion_Settings['acc_title_bg_clr']) ? $Accordion_Settings['acc_title_bg_clr'] : '#e8e8e8';
|
59 |
+
$acc_title_icon_clr = isset($Accordion_Settings['acc_title_icon_clr']) ? $Accordion_Settings['acc_title_icon_clr'] : '#000000';
|
60 |
+
$acc_desc_bg_clr = isset($Accordion_Settings['acc_desc_bg_clr']) ? $Accordion_Settings['acc_desc_bg_clr'] : '#ffffff';
|
61 |
+
$acc_desc_font_clr = isset($Accordion_Settings['acc_desc_font_clr']) ? $Accordion_Settings['acc_desc_font_clr'] : '#000000';
|
62 |
+
$title_size = isset($Accordion_Settings['title_size']) ? $Accordion_Settings['title_size'] : '18';
|
63 |
+
$des_size = isset($Accordion_Settings['des_size']) ? $Accordion_Settings['des_size'] : '16';
|
64 |
+
$font_family = isset($Accordion_Settings['font_family']) ? $Accordion_Settings['font_family'] : 'Open Sans';
|
65 |
+
$expand_option = isset($Accordion_Settings['expand_option']) ? $Accordion_Settings['expand_option'] : 1;
|
66 |
+
$ac_styles = isset($Accordion_Settings['ac_styles']) ? $Accordion_Settings['ac_styles'] : 1;
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
echo '<pre>'.var_export($acc_sec_title, ture).'</pre>';
|
72 |
+
|
73 |
+
$accordions_icons_plus = 'plus';
|
74 |
+
$accordions_icons_minus = 'minus';
|
75 |
+
|
76 |
+
|
77 |
+
$accordions_icons_plus = !empty($accordions_icons_plus) ? '<i class="fa fa-'.$accordions_icons_plus.'"></i>' : '<i class="fa fa-plus"></i>';
|
78 |
+
$accordions_icons_minus = !empty($accordions_icons_minus) ? '<i class="fa fa-'.$accordions_icons_minus.'"></i>' : '<i class="fa fa-minus"></i>';
|
79 |
+
|
80 |
+
$accordions_options['icon']['active'] = $accordions_icons_plus;
|
81 |
+
$accordions_options['icon']['inactive'] = $accordions_icons_minus;
|
82 |
+
$accordions_options['icon']['position'] = $acc_op_cl_align;
|
83 |
+
$accordions_options['icon']['color'] = $acc_title_icon_clr;
|
84 |
+
$accordions_options['icon']['color_hover'] = '';
|
85 |
+
$accordions_options['icon']['font_size'] = $title_size.'px';
|
86 |
+
$accordions_options['icon']['background_color'] = '';
|
87 |
+
$accordions_options['icon']['padding'] = '';
|
88 |
+
|
89 |
+
|
90 |
+
|
91 |
+
|
92 |
+
$accordions_options['header']['class'] = ($acc_radius == 'yes') ? 'border-semi-round' :'';
|
93 |
+
$accordions_options['header']['active_background_color'] = '';
|
94 |
+
$accordions_options['header']['background_color'] = $acc_title_bg_clr;
|
95 |
+
$accordions_options['header']['background_opacity'] = '';
|
96 |
+
$accordions_options['header']['color'] = '';
|
97 |
+
$accordions_options['header']['color_hover'] = '';
|
98 |
+
$accordions_options['header']['font_size'] = $title_size.'px';
|
99 |
+
$accordions_options['header']['font_family'] = $font_family;
|
100 |
+
$accordions_options['header']['padding'] = '';
|
101 |
+
$accordions_options['header']['margin'] = ($acc_margin == 'yes') ? '5px' :'';
|
102 |
+
|
103 |
+
|
104 |
+
$accordions_options['body']['class'] = ($enable_ac_border == 'yes') ? 'border-2px' :'';
|
105 |
+
|
106 |
+
$accordions_options['body']['active_background_color'] = '';
|
107 |
+
$accordions_options['body']['background_color'] = $acc_desc_bg_clr;
|
108 |
+
$accordions_options['body']['background_opacity'] = '';
|
109 |
+
$accordions_options['body']['color'] = $acc_desc_font_clr;
|
110 |
+
$accordions_options['body']['font_size'] = '';
|
111 |
+
$accordions_options['body']['font_family'] = $font_family;
|
112 |
+
$accordions_options['body']['padding'] = '';
|
113 |
+
$accordions_options['body']['margin'] = '';
|
114 |
+
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
+
$accordions_options['lazy_load'] = '';
|
120 |
+
$accordions_options['lazy_load_src'] = '';
|
121 |
+
$accordions_options['hide_edit'] = '';
|
122 |
+
$accordions_options['accordion']['collapsible'] = ($enable_toggle == 'yes') ? 'true' :'false';
|
123 |
+
$accordions_options['accordion']['expanded_other'] = ($enable_toggle == 'yes') ? 'yes' :'no';
|
124 |
+
$accordions_options['accordion']['height_style'] = 'content';
|
125 |
+
$accordions_options['accordion']['active_event'] = 'click';
|
126 |
+
$accordions_options['accordion']['enable_search'] = '';
|
127 |
+
$accordions_options['accordion']['search_placeholder_text'] = '';
|
128 |
+
$accordions_options['accordion']['click_scroll_top'] = '';
|
129 |
+
$accordions_options['accordion']['click_scroll_top_offset'] = '';
|
130 |
+
$accordions_options['accordion']['header_toggle'] = '';
|
131 |
+
$accordions_options['accordion']['animate_style'] = '';
|
132 |
+
$accordions_options['accordion']['animate_delay'] = '';
|
133 |
+
$accordions_options['accordion']['expand_collapse_display'] = '';
|
134 |
+
$accordions_options['accordion']['expand_collapse_bg_color'] = '';
|
135 |
+
$accordions_options['accordion']['expand_collapse_text'] = '';
|
136 |
+
$accordions_options['accordion']['is_child'] = '';
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
|
147 |
+
|
148 |
+
$i = 0;
|
149 |
+
|
150 |
+
if(!empty($wpsm_accordion_data))
|
151 |
+
foreach ($wpsm_accordion_data as $index => $accordion_single_data){
|
152 |
+
|
153 |
+
$accordion_title = $accordion_single_data['accordion_title'];
|
154 |
+
$accordion_title_icon = $accordion_single_data['accordion_title_icon'];
|
155 |
+
$enable_single_icon = $accordion_single_data['enable_single_icon'];
|
156 |
+
$accordion_desc = $accordion_single_data['accordion_desc'];
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
|
161 |
+
$accordions_options['content'][$index]['header'] = ($acc_title_icon =='yes') ? (($enable_single_icon == 'yes') ? '<i class="fa '.$accordion_title_icon.'"></i> '.$accordion_title : $accordion_title) : $accordion_title;
|
162 |
+
|
163 |
+
$accordions_options['content'][$index]['body'] = $accordion_desc;
|
164 |
+
$accordions_options['content'][$index]['hide'] = 'no';
|
165 |
+
$accordions_options['content'][$index]['toggled_text'] = '';
|
166 |
+
|
167 |
+
|
168 |
+
$accordions_options['content'][$index]['is_active'] = ($expand_option == '1' && $i==0) ? 'yes' :'';
|
169 |
+
|
170 |
+
|
171 |
+
$active_icon = !empty($accordions_section_icon_plus[$index]) ? '<i class="fa '.$enable_single_icon.'"></i>' : '';
|
172 |
+
$inactive_icon = !empty($accordions_section_icon_minus[$index]) ? '<i class="fa '.$accordions_section_icon_minus[$index].'"></i>' : '';
|
173 |
+
|
174 |
+
$accordions_options['content'][$index]['active_icon'] = $active_icon;
|
175 |
+
$accordions_options['content'][$index]['inactive_icon'] = $inactive_icon;
|
176 |
+
|
177 |
+
$accordions_options['content'][$index]['background_color'] = '';
|
178 |
+
$accordions_options['content'][$index]['background_img'] = '';
|
179 |
+
|
180 |
+
$i++;
|
181 |
+
}
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
|
186 |
+
|
187 |
+
$accordions_id = wp_insert_post(
|
188 |
+
array(
|
189 |
+
'post_title' => $post_title,
|
190 |
+
'post_content' => '',
|
191 |
+
'post_status' => 'publish',
|
192 |
+
'post_type' => 'accordions',
|
193 |
+
'post_author' => 1,
|
194 |
+
)
|
195 |
+
);
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
+
|
200 |
+
|
201 |
+
|
202 |
+
|
203 |
+
|
204 |
+
|
205 |
+
|
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/>';
|
214 |
+
echo 'import done: '.$post_title;
|
215 |
+
echo '<br/>';
|
216 |
+
|
217 |
+
wp_reset_query();
|
218 |
+
wp_reset_postdata();
|
219 |
+
endwhile;
|
220 |
+
else:
|
221 |
+
|
222 |
+
|
223 |
+
|
224 |
+
//wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
225 |
+
|
226 |
+
|
227 |
+
endif;
|
228 |
+
|
229 |
+
|
230 |
+
}
|
231 |
+
|
232 |
+
|
233 |
+
|
234 |
+
|
includes/class-post-meta-accordions-hook.php
CHANGED
@@ -1087,10 +1087,10 @@ function accordions_metabox_content_content($post_id){
|
|
1087 |
'css_id' => 'body_TIMEINDEX',
|
1088 |
'title' => __('Body','team'),
|
1089 |
'details' => __('Accordion body content.','team'),
|
1090 |
-
'type' => '
|
1091 |
'value' => '',
|
1092 |
'default' => '',
|
1093 |
-
'placeholder' => '
|
1094 |
),
|
1095 |
array(
|
1096 |
'id' => 'hide',
|
1087 |
'css_id' => 'body_TIMEINDEX',
|
1088 |
'title' => __('Body','team'),
|
1089 |
'details' => __('Accordion body content.','team'),
|
1090 |
+
'type' => 'textarea_editor',
|
1091 |
'value' => '',
|
1092 |
'default' => '',
|
1093 |
+
'placeholder' => '',
|
1094 |
),
|
1095 |
array(
|
1096 |
'id' => 'hide',
|
includes/class-post-types.php
CHANGED
@@ -63,7 +63,7 @@ class accordions_post_types{
|
|
63 |
'rewrite' => true,
|
64 |
'query_var' => true,
|
65 |
'supports' => array( 'title', ),
|
66 |
-
'show_in_nav_menus' =>
|
67 |
//'show_in_menu' => 'edit.php?post_type=team',
|
68 |
'menu_icon' => 'dashicons-align-center',
|
69 |
|
63 |
'rewrite' => true,
|
64 |
'query_var' => true,
|
65 |
'supports' => array( 'title', ),
|
66 |
+
'show_in_nav_menus' => true,
|
67 |
//'show_in_menu' => 'edit.php?post_type=team',
|
68 |
'menu_icon' => 'dashicons-align-center',
|
69 |
|
includes/class-settings-hook.php
CHANGED
@@ -312,8 +312,9 @@ if(!function_exists('accordions_settings_content_help_support')) {
|
|
312 |
?>
|
313 |
|
314 |
<p class="">Please click the button bellow to reset migration data, you can start over, Please use with caution, your new migrate data will deleted. you can use default <a href="<?php echo admin_url().'export.php'; ?>">export</a> menu to take your wcps, wcps layouts data saved.</p>
|
|
|
315 |
|
316 |
-
<p class="reset-migration"><a
|
317 |
|
318 |
<script>
|
319 |
jQuery(document).ready(function($){
|
312 |
?>
|
313 |
|
314 |
<p class="">Please click the button bellow to reset migration data, you can start over, Please use with caution, your new migrate data will deleted. you can use default <a href="<?php echo admin_url().'export.php'; ?>">export</a> menu to take your wcps, wcps layouts data saved.</p>
|
315 |
+
<p>Please <a target="_blank" href="https://www.pickplugins.com/question/accordions-latest-version-data-migration-doesnt-work-here-is-the-solution/"><b>read this</b></a> if you have any issue on data migration</p>
|
316 |
|
317 |
+
<p class="reset-migration"><a class="button button-primary" href="<?php echo $actionurl; ?>">Reset migration</a> <span style="display: none; color: #f2433f; margin: 0 5px"> Click again to confirm!</span></p>
|
318 |
|
319 |
<script>
|
320 |
jQuery(document).ready(function($){
|
includes/class-settings-tabs.php
CHANGED
@@ -86,6 +86,7 @@ class settings_tabs_field{
|
|
86 |
elseif( isset($option['type']) && $option['type'] === 'option_group') $this->field_option_group( $option );
|
87 |
elseif( isset($option['type']) && $option['type'] === 'option_group_accordion') $this->field_option_group_accordion( $option );
|
88 |
elseif( isset($option['type']) && $option['type'] === 'wp_editor') $this->field_wp_editor( $option );
|
|
|
89 |
|
90 |
|
91 |
|
@@ -1176,10 +1177,42 @@ class settings_tabs_field{
|
|
1176 |
|
1177 |
echo sprintf($field_template, $title, $input_html, $details);
|
1178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1179 |
|
|
|
1180 |
|
|
|
|
|
|
|
1181 |
|
1182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1183 |
|
1184 |
}
|
1185 |
|
86 |
elseif( isset($option['type']) && $option['type'] === 'option_group') $this->field_option_group( $option );
|
87 |
elseif( isset($option['type']) && $option['type'] === 'option_group_accordion') $this->field_option_group_accordion( $option );
|
88 |
elseif( isset($option['type']) && $option['type'] === 'wp_editor') $this->field_wp_editor( $option );
|
89 |
+
elseif( isset($option['type']) && $option['type'] === 'textarea_editor') $this->field_textarea_editor( $option );
|
90 |
|
91 |
|
92 |
|
1177 |
|
1178 |
echo sprintf($field_template, $title, $input_html, $details);
|
1179 |
|
1180 |
+
}
|
1181 |
+
|
1182 |
+
|
1183 |
+
|
1184 |
+
public function field_textarea_editor( $option ){
|
1185 |
+
|
1186 |
+
$id = isset( $option['id'] ) ? $option['id'] : "";
|
1187 |
+
$css_id = isset( $option['css_id'] ) ? $option['css_id'] : $id;
|
1188 |
+
$parent = isset( $option['parent'] ) ? $option['parent'] : "";
|
1189 |
+
$field_template = isset( $option['field_template'] ) ? $option['field_template'] : $this->field_template($option);
|
1190 |
+
$placeholder = isset( $option['placeholder'] ) ? $option['placeholder'] : "";
|
1191 |
+
$value = isset( $option['value'] ) ? $option['value'] : '';
|
1192 |
+
$default = isset( $option['default'] ) ? $option['default'] : '';
|
1193 |
+
$value = !empty($value) ? $value : $default;
|
1194 |
+
|
1195 |
+
$is_pro = isset( $option['is_pro'] ) ? $option['is_pro'] : false;
|
1196 |
+
$pro_text = isset( $option['pro_text'] ) ? $option['pro_text'] : '';
|
1197 |
+
|
1198 |
+
$title = isset( $option['title'] ) ? $option['title'] : "";
|
1199 |
+
$details = isset( $option['details'] ) ? $option['details'] : "";
|
1200 |
|
1201 |
+
$field_name = !empty($parent) ? $parent.'['.$id.']' : $id;
|
1202 |
|
1203 |
+
if($is_pro == true){
|
1204 |
+
$details = '<span class="pro-feature">'.$pro_text.'</span> '.$details;
|
1205 |
+
}
|
1206 |
|
1207 |
|
1208 |
+
ob_start();
|
1209 |
+
?>
|
1210 |
+
<textarea editor_enabled="no" class="textarea-editor" name="<?php echo $field_name; ?>" id="<?php echo $css_id; ?>" cols="40" rows="5" placeholder="<?php echo $placeholder; ?>"><?php echo $value; ?></textarea>
|
1211 |
+
<?php
|
1212 |
+
|
1213 |
+
$input_html = ob_get_clean();
|
1214 |
+
|
1215 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1216 |
|
1217 |
}
|
1218 |
|
includes/functions-data-upgrade.php
CHANGED
@@ -349,12 +349,12 @@ function accordions_cron_upgrade_accordions(){
|
|
349 |
wp_reset_postdata();
|
350 |
endwhile;
|
351 |
else:
|
352 |
-
wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
353 |
|
354 |
$accordions_plugin_info = get_option('accordions_plugin_info');
|
355 |
$accordions_plugin_info['accordions_upgrade'] = 'done';
|
356 |
update_option('accordions_plugin_info', $accordions_plugin_info);
|
357 |
|
|
|
358 |
|
359 |
|
360 |
endif;
|
349 |
wp_reset_postdata();
|
350 |
endwhile;
|
351 |
else:
|
|
|
352 |
|
353 |
$accordions_plugin_info = get_option('accordions_plugin_info');
|
354 |
$accordions_plugin_info['accordions_upgrade'] = 'done';
|
355 |
update_option('accordions_plugin_info', $accordions_plugin_info);
|
356 |
|
357 |
+
wp_clear_scheduled_hook('accordions_cron_upgrade_accordions');
|
358 |
|
359 |
|
360 |
endif;
|
includes/menu/upgrade-status.php
CHANGED
@@ -6,7 +6,7 @@ $accordions_settings_upgrade = isset($accordions_plugin_info['settings_upgrade']
|
|
6 |
$accordions_upgrade = isset($accordions_plugin_info['accordions_upgrade']) ? $accordions_plugin_info['accordions_upgrade'] : '';
|
7 |
|
8 |
//echo '<pre>'.var_export($accordions_upgrade, true).'</pre>';
|
9 |
-
|
10 |
|
11 |
$url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
|
12 |
|
@@ -24,7 +24,7 @@ $url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
|
|
24 |
<script>
|
25 |
setTimeout(function(){
|
26 |
window.location.href = '<?php echo $url; ?>';
|
27 |
-
}, 1000*
|
28 |
|
29 |
</script>
|
30 |
|
@@ -101,7 +101,7 @@ $url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
|
|
101 |
|
102 |
|
103 |
|
104 |
-
<p><a class="button" href="<?php echo admin_url().'edit.php?post_type=accordions&page=upgrade_status'; ?>">Refresh</a> to check Migration stats
|
105 |
|
106 |
|
107 |
|
6 |
$accordions_upgrade = isset($accordions_plugin_info['accordions_upgrade']) ? $accordions_plugin_info['accordions_upgrade'] : '';
|
7 |
|
8 |
//echo '<pre>'.var_export($accordions_upgrade, true).'</pre>';
|
9 |
+
wp_enqueue_style('font-awesome-5');
|
10 |
|
11 |
$url = admin_url().'edit.php?post_type=accordions&page=upgrade_status';
|
12 |
|
24 |
<script>
|
25 |
setTimeout(function(){
|
26 |
window.location.href = '<?php echo $url; ?>';
|
27 |
+
}, 1000*50);
|
28 |
|
29 |
</script>
|
30 |
|
101 |
|
102 |
|
103 |
|
104 |
+
<p><a class="button" href="<?php echo admin_url().'edit.php?post_type=accordions&page=upgrade_status'; ?>">Refresh</a> to check Migration stats. <i class="fas fa-spin fa-spinner"></i></p>
|
105 |
|
106 |
|
107 |
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -124,11 +124,20 @@ then paste this shortcode anywhere in your page to display accordions<br />
|
|
124 |
2. screenshot-2
|
125 |
3. screenshot-3
|
126 |
4. screenshot-4
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
|
128 |
|
129 |
|
130 |
== Changelog ==
|
131 |
|
|
|
|
|
|
|
132 |
= 2.2.1 =
|
133 |
* 13-03-2020 - fix - minor php issue fixed
|
134 |
* 13-03-2020 - update - readmore text update
|
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 |
|
124 |
2. screenshot-2
|
125 |
3. screenshot-3
|
126 |
4. screenshot-4
|
127 |
+
5. screenshot-5
|
128 |
+
6. screenshot-6
|
129 |
+
7. screenshot-7
|
130 |
+
8. screenshot-8
|
131 |
+
9. screenshot-9
|
132 |
+
10. screenshot-10
|
133 |
|
134 |
|
135 |
|
136 |
== Changelog ==
|
137 |
|
138 |
+
= 2.2.2 =
|
139 |
+
* 13-03-2020 - fix - adding new content conflict with 3rd party plugin.
|
140 |
+
|
141 |
= 2.2.1 =
|
142 |
* 13-03-2020 - fix - minor php issue fixed
|
143 |
* 13-03-2020 - update - readmore text update
|
templates/accordion/accordion-hook.php
CHANGED
@@ -296,6 +296,9 @@ function accordions_main_items($atts){
|
|
296 |
$icon_inactive = !empty($icon['inactive']) ? $icon['inactive'] : '<i class="fas fa-chevron-right"></i>';
|
297 |
$icon_position = !empty($icon['position']) ? $icon['position'] : 'left';
|
298 |
|
|
|
|
|
|
|
299 |
$active_index = array();
|
300 |
?>
|
301 |
<div class="items">
|
@@ -329,15 +332,15 @@ function accordions_main_items($atts){
|
|
329 |
}
|
330 |
|
331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
|
333 |
|
334 |
-
if(has_shortcode($accordion_body, 'accordions') || has_shortcode($accordion_body, 'accordions_pickplguins') || has_shortcode($accordion_body, 'accordions_pplugins') ){
|
335 |
-
$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);
|
336 |
-
$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);
|
337 |
-
$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);
|
338 |
-
|
339 |
-
|
340 |
-
}
|
341 |
|
342 |
|
343 |
$accordion_body = apply_filters( 'accordions_item_body', $accordion_body, $post_id );
|
296 |
$icon_inactive = !empty($icon['inactive']) ? $icon['inactive'] : '<i class="fas fa-chevron-right"></i>';
|
297 |
$icon_position = !empty($icon['position']) ? $icon['position'] : 'left';
|
298 |
|
299 |
+
$active_plugins = get_option('active_plugins');
|
300 |
+
|
301 |
+
|
302 |
$active_index = array();
|
303 |
?>
|
304 |
<div class="items">
|
332 |
}
|
333 |
|
334 |
|
335 |
+
if(!in_array( 'accordions-pro/accordions-pro.php', (array) $active_plugins )){
|
336 |
+
if(has_shortcode($accordion_body, 'accordions') || has_shortcode($accordion_body, 'accordions_pickplguins') || has_shortcode($accordion_body, 'accordions_pplugins') ){
|
337 |
+
$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);
|
338 |
+
$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);
|
339 |
+
$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);
|
340 |
+
}
|
341 |
+
}
|
342 |
|
343 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
|
345 |
|
346 |
$accordion_body = apply_filters( 'accordions_item_body', $accordion_body, $post_id );
|
templates/tabs/tabs-hook.php
CHANGED
@@ -215,6 +215,7 @@ function accordions_tabs_main_items($atts){
|
|
215 |
$icon_inactive = !empty($icon['inactive']) ? $icon['inactive'] : '<i class="fas fa-chevron-right"></i>';
|
216 |
$icon_position = !empty($icon['position']) ? $icon['position'] : 'left';
|
217 |
|
|
|
218 |
|
219 |
//var_dump($icon_position);
|
220 |
|
@@ -250,15 +251,15 @@ function accordions_tabs_main_items($atts){
|
|
250 |
|
251 |
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
}
|
260 |
|
261 |
|
|
|
262 |
$accordion_body = apply_filters( 'accordions_item_body', $accordion_body, $post_id );
|
263 |
|
264 |
|
215 |
$icon_inactive = !empty($icon['inactive']) ? $icon['inactive'] : '<i class="fas fa-chevron-right"></i>';
|
216 |
$icon_position = !empty($icon['position']) ? $icon['position'] : 'left';
|
217 |
|
218 |
+
$active_plugins = get_option('active_plugins');
|
219 |
|
220 |
//var_dump($icon_position);
|
221 |
|
251 |
|
252 |
|
253 |
|
254 |
+
if(!in_array( 'accordions-pro/accordions-pro.php', (array) $active_plugins )){
|
255 |
+
if(has_shortcode($accordion_body, 'accordions_tabs') || has_shortcode($accordion_body, 'accordions_tabs_pplugins') ){
|
256 |
+
$accordion_body = str_replace('[accordions_tabs','**<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 tabs</strong></a>**', $accordion_body);
|
257 |
+
$accordion_body = str_replace('[accordions_tabs_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 tabs</strong></a>**', $accordion_body);
|
258 |
+
}
|
|
|
259 |
}
|
260 |
|
261 |
|
262 |
+
|
263 |
$accordion_body = apply_filters( 'accordions_item_body', $accordion_body, $post_id );
|
264 |
|
265 |
|