Version Description
- 2022-08-25 - fix - Broken HTML issue fixed.
Download this release
Release Info
Developer | pickplugins |
Plugin | Accordion |
Version | 2.2.46 |
Comparing to | |
See all releases |
Code changes from version 2.2.45 to 2.2.46
- accordions.php +2 -2
- includes/class-post-meta-accordions.php +77 -82
- includes/class-settings-tabs.php +23 -23
- readme.txt +5 -1
- templates/accordion/accordion-hook.php +15 -15
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 |
Author: PickPlugins
|
8 |
Author URI: http://pickplugins.com
|
9 |
Text Domain: accordions
|
@@ -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 |
|
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.46
|
7 |
Author: PickPlugins
|
8 |
Author URI: http://pickplugins.com
|
9 |
Text Domain: 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.46');
|
27 |
define('accordions_plugin_name', 'Accordions');
|
28 |
define('accordions_plugin_basename', plugin_basename(__FILE__));
|
29 |
|
includes/class-post-meta-accordions.php
CHANGED
@@ -1,37 +1,37 @@
|
|
1 |
<?php
|
2 |
-
if (
|
3 |
|
4 |
-
class class_accordions_post_meta
|
5 |
-
|
6 |
-
public function __construct(){
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
add_action('save_post', array($this, '_post_meta_accordions_save'));
|
11 |
|
|
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
-
|
|
|
15 |
|
|
|
|
|
16 |
|
17 |
-
public function _post_meta_accordions($post_type){
|
18 |
|
19 |
-
add_meta_box('metabox-accordions',__('Accordions data', 'accordions'), array($this, 'meta_box_accordions_data'), 'accordions', 'normal', 'high');
|
20 |
|
21 |
-
}
|
22 |
|
23 |
|
24 |
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
public function meta_box_accordions_data($post) {
|
29 |
-
|
30 |
// Add an nonce field so we can check for it later.
|
31 |
wp_nonce_field('accordions_nonce_check', 'accordions_nonce_check_value');
|
32 |
-
|
33 |
// Use get_post_meta to retrieve an existing value from the database.
|
34 |
-
|
35 |
|
36 |
$post_id = $post->ID;
|
37 |
|
@@ -40,7 +40,7 @@ class class_accordions_post_meta{
|
|
40 |
$settings_tabs_field = new settings_tabs_field();
|
41 |
|
42 |
$accordion_settings_tab = array();
|
43 |
-
$accordions_options = get_post_meta($post_id,'accordions_options', true);
|
44 |
$current_tab = isset($accordions_options['current_tab']) ? $accordions_options['current_tab'] : 'content';
|
45 |
$view_type = !empty($accordions_options['view_type']) ? $accordions_options['view_type'] : 'accordion';
|
46 |
|
@@ -48,39 +48,39 @@ class class_accordions_post_meta{
|
|
48 |
|
49 |
$accordion_settings_tab[] = array(
|
50 |
'id' => 'shortcode',
|
51 |
-
'title' => sprintf(__('%s Shortcode','accordions'),'<i class="fas fa-laptop-code"></i>'),
|
52 |
'priority' => 1,
|
53 |
'active' => ($current_tab == 'shortcode') ? true : false,
|
54 |
);
|
55 |
|
56 |
$accordion_settings_tab[] = array(
|
57 |
'id' => 'general',
|
58 |
-
'title' => sprintf(__('%s General','accordions'),'<i class="fa fa-cogs"></i>'),
|
59 |
'priority' => 2,
|
60 |
'active' => ($current_tab == 'general') ? true : false,
|
61 |
);
|
62 |
|
63 |
$accordion_settings_tab[] = array(
|
64 |
'id' => 'accordion_options',
|
65 |
-
'title' => sprintf(__('%s Accordion options','accordions'),'<i class="fas fa-bars"></i>'),
|
66 |
'priority' => 2,
|
67 |
'active' => ($current_tab == 'accordion_options') ? true : false,
|
68 |
-
'hidden' => ($view_type == 'tabs')? true : false
|
69 |
'data_visible' => 'accordion',
|
70 |
);
|
71 |
$accordion_settings_tab[] = array(
|
72 |
'id' => 'style',
|
73 |
-
'title' => sprintf(__('%s Style','accordions'),'<i class="fas fa-palette"></i>'),
|
74 |
'priority' => 3,
|
75 |
'active' => ($current_tab == 'style') ? true : false,
|
76 |
);
|
77 |
|
78 |
$accordion_settings_tab[] = array(
|
79 |
'id' => 'tabs_options',
|
80 |
-
'title' => sprintf(__('%s Tabs options','accordions'),'<i class="far fa-folder"></i>'),
|
81 |
'priority' => 2,
|
82 |
'active' => ($current_tab == 'tabs_options') ? true : false,
|
83 |
-
'hidden' => ($view_type == 'accordion')? true : false
|
84 |
'data_visible' => 'tabs',
|
85 |
|
86 |
|
@@ -89,7 +89,7 @@ class class_accordions_post_meta{
|
|
89 |
|
90 |
$accordion_settings_tab[] = array(
|
91 |
'id' => 'content',
|
92 |
-
'title' => sprintf(__('%s Content','accordions'),'<i class="far fa-edit"></i>'),
|
93 |
'priority' => 4,
|
94 |
'active' => ($current_tab == 'content') ? true : false,
|
95 |
);
|
@@ -98,14 +98,14 @@ class class_accordions_post_meta{
|
|
98 |
|
99 |
$accordion_settings_tab[] = array(
|
100 |
'id' => 'custom_scripts',
|
101 |
-
'title' => sprintf(__('%s Custom scripts','accordions'),'<i class="far fa-file-code"></i>'),
|
102 |
'priority' => 6,
|
103 |
'active' => ($current_tab == 'buy_pro') ? true : false,
|
104 |
);
|
105 |
|
106 |
$accordion_settings_tab[] = array(
|
107 |
'id' => 'help_support',
|
108 |
-
'title' => sprintf(__('%s Help support','accordions'),'<i class="fas fa-hands-helping"></i>'),
|
109 |
'priority' => 80,
|
110 |
'active' => ($current_tab == 'help_support') ? true : false,
|
111 |
);
|
@@ -113,7 +113,7 @@ class class_accordions_post_meta{
|
|
113 |
|
114 |
$accordion_settings_tab[] = array(
|
115 |
'id' => 'buy_pro',
|
116 |
-
'title' => sprintf(__('%s Buy pro','accordions'),'<i class="fas fa-store"></i>'),
|
117 |
'priority' => 90,
|
118 |
'active' => ($current_tab == 'buy_pro') ? true : false,
|
119 |
);
|
@@ -123,46 +123,45 @@ class class_accordions_post_meta{
|
|
123 |
|
124 |
$tabs_sorted = array();
|
125 |
|
126 |
-
if(!empty($accordion_settings_tab))
|
127 |
-
|
128 |
array_multisort($tabs_sorted, SORT_ASC, $accordion_settings_tab);
|
129 |
|
130 |
|
131 |
-
|
132 |
|
133 |
<script>
|
134 |
(function($) {
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
|
140 |
-
|
141 |
|
142 |
-
|
143 |
-
|
144 |
|
145 |
-
|
146 |
-
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
|
157 |
|
158 |
-
|
159 |
-
|
160 |
|
161 |
|
|
|
162 |
})
|
163 |
-
})
|
164 |
-
})(jQuery);
|
165 |
-
|
166 |
</script>
|
167 |
|
168 |
<div class="settings-tabs vertical">
|
@@ -171,17 +170,17 @@ class class_accordions_post_meta{
|
|
171 |
|
172 |
<?php
|
173 |
|
174 |
-
$accordions_view_types = apply_filters('accordions_view_types', array('accordion'=>'Accordion', 'tabs'=>'Tabs'));
|
175 |
|
176 |
$args = array(
|
177 |
-
'id'
|
178 |
-
'parent'
|
179 |
-
'title'
|
180 |
-
'details'
|
181 |
-
'type'
|
182 |
-
'value'
|
183 |
-
'default'
|
184 |
-
'args'
|
185 |
);
|
186 |
|
187 |
$settings_tabs_field->generate_field($args);
|
@@ -192,43 +191,44 @@ class class_accordions_post_meta{
|
|
192 |
|
193 |
<ul class="tab-navs">
|
194 |
<?php
|
195 |
-
foreach ($accordion_settings_tab as $tab){
|
196 |
$id = $tab['id'];
|
197 |
$title = $tab['title'];
|
198 |
$active = $tab['active'];
|
199 |
$data_visible = isset($tab['data_visible']) ? $tab['data_visible'] : '';
|
200 |
$hidden = isset($tab['hidden']) ? $tab['hidden'] : false;
|
201 |
-
|
202 |
-
<li <?php if(!empty($data_visible)): ?> data_visible="<?php echo esc_attr($data_visible); ?>" <?php endif; ?> class="tab-nav <?php if($hidden) echo 'hidden'
|
203 |
-
|
204 |
}
|
205 |
?>
|
206 |
</ul>
|
207 |
<?php
|
208 |
-
foreach ($accordion_settings_tab as $tab){
|
209 |
$id = $tab['id'];
|
210 |
$title = $tab['title'];
|
211 |
$active = $tab['active'];
|
212 |
-
|
213 |
|
214 |
-
<div class="tab-content <?php if($active) echo 'active'
|
215 |
<?php
|
216 |
-
do_action('accordions_metabox_content_'
|
217 |
?>
|
218 |
</div>
|
219 |
-
|
220 |
}
|
221 |
?>
|
222 |
</div>
|
223 |
<div class="clear clearfix"></div>
|
224 |
|
225 |
-
|
226 |
-
|
227 |
|
228 |
|
229 |
|
230 |
|
231 |
-
|
|
|
232 |
|
233 |
/*
|
234 |
* We need to verify this came from the our screen and with
|
@@ -256,7 +256,6 @@ class class_accordions_post_meta{
|
|
256 |
|
257 |
if (!current_user_can('edit_page', $post_id))
|
258 |
return $post_id;
|
259 |
-
|
260 |
} else {
|
261 |
|
262 |
if (!current_user_can('edit_post', $post_id))
|
@@ -266,12 +265,8 @@ class class_accordions_post_meta{
|
|
266 |
/* OK, its safe for us to save the data now. */
|
267 |
|
268 |
do_action('accordions_post_meta_save', $post_id);
|
|
|
|
|
269 |
|
270 |
|
271 |
-
|
272 |
-
}
|
273 |
-
|
274 |
-
}
|
275 |
-
|
276 |
-
|
277 |
-
new class_accordions_post_meta();
|
1 |
<?php
|
2 |
+
if (!defined('ABSPATH')) exit; // if direct access
|
3 |
|
4 |
+
class class_accordions_post_meta
|
5 |
+
{
|
|
|
6 |
|
7 |
+
public function __construct()
|
8 |
+
{
|
|
|
9 |
|
10 |
+
//meta box action for "accordions"
|
11 |
+
add_action('add_meta_boxes', array($this, '_post_meta_accordions'));
|
12 |
+
add_action('save_post', array($this, '_post_meta_accordions_save'));
|
13 |
+
}
|
14 |
|
15 |
|
16 |
+
public function _post_meta_accordions($post_type)
|
17 |
+
{
|
18 |
|
19 |
+
add_meta_box('metabox-accordions', __('Accordions data', 'accordions'), array($this, 'meta_box_accordions_data'), 'accordions', 'normal', 'high');
|
20 |
+
}
|
21 |
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
|
25 |
|
26 |
|
27 |
+
public function meta_box_accordions_data($post)
|
28 |
+
{
|
29 |
|
|
|
|
|
|
|
|
|
30 |
// Add an nonce field so we can check for it later.
|
31 |
wp_nonce_field('accordions_nonce_check', 'accordions_nonce_check_value');
|
32 |
+
|
33 |
// Use get_post_meta to retrieve an existing value from the database.
|
34 |
+
// $accordions_data = get_post_meta($post -> ID, 'accordions_data', true);
|
35 |
|
36 |
$post_id = $post->ID;
|
37 |
|
40 |
$settings_tabs_field = new settings_tabs_field();
|
41 |
|
42 |
$accordion_settings_tab = array();
|
43 |
+
$accordions_options = get_post_meta($post_id, 'accordions_options', true);
|
44 |
$current_tab = isset($accordions_options['current_tab']) ? $accordions_options['current_tab'] : 'content';
|
45 |
$view_type = !empty($accordions_options['view_type']) ? $accordions_options['view_type'] : 'accordion';
|
46 |
|
48 |
|
49 |
$accordion_settings_tab[] = array(
|
50 |
'id' => 'shortcode',
|
51 |
+
'title' => sprintf(__('%s Shortcode', 'accordions'), '<i class="fas fa-laptop-code"></i>'),
|
52 |
'priority' => 1,
|
53 |
'active' => ($current_tab == 'shortcode') ? true : false,
|
54 |
);
|
55 |
|
56 |
$accordion_settings_tab[] = array(
|
57 |
'id' => 'general',
|
58 |
+
'title' => sprintf(__('%s General', 'accordions'), '<i class="fa fa-cogs"></i>'),
|
59 |
'priority' => 2,
|
60 |
'active' => ($current_tab == 'general') ? true : false,
|
61 |
);
|
62 |
|
63 |
$accordion_settings_tab[] = array(
|
64 |
'id' => 'accordion_options',
|
65 |
+
'title' => sprintf(__('%s Accordion options', 'accordions'), '<i class="fas fa-bars"></i>'),
|
66 |
'priority' => 2,
|
67 |
'active' => ($current_tab == 'accordion_options') ? true : false,
|
68 |
+
'hidden' => ($view_type == 'tabs') ? true : false,
|
69 |
'data_visible' => 'accordion',
|
70 |
);
|
71 |
$accordion_settings_tab[] = array(
|
72 |
'id' => 'style',
|
73 |
+
'title' => sprintf(__('%s Style', 'accordions'), '<i class="fas fa-palette"></i>'),
|
74 |
'priority' => 3,
|
75 |
'active' => ($current_tab == 'style') ? true : false,
|
76 |
);
|
77 |
|
78 |
$accordion_settings_tab[] = array(
|
79 |
'id' => 'tabs_options',
|
80 |
+
'title' => sprintf(__('%s Tabs options', 'accordions'), '<i class="far fa-folder"></i>'),
|
81 |
'priority' => 2,
|
82 |
'active' => ($current_tab == 'tabs_options') ? true : false,
|
83 |
+
'hidden' => ($view_type == 'accordion') ? true : false,
|
84 |
'data_visible' => 'tabs',
|
85 |
|
86 |
|
89 |
|
90 |
$accordion_settings_tab[] = array(
|
91 |
'id' => 'content',
|
92 |
+
'title' => sprintf(__('%s Content', 'accordions'), '<i class="far fa-edit"></i>'),
|
93 |
'priority' => 4,
|
94 |
'active' => ($current_tab == 'content') ? true : false,
|
95 |
);
|
98 |
|
99 |
$accordion_settings_tab[] = array(
|
100 |
'id' => 'custom_scripts',
|
101 |
+
'title' => sprintf(__('%s Custom scripts', 'accordions'), '<i class="far fa-file-code"></i>'),
|
102 |
'priority' => 6,
|
103 |
'active' => ($current_tab == 'buy_pro') ? true : false,
|
104 |
);
|
105 |
|
106 |
$accordion_settings_tab[] = array(
|
107 |
'id' => 'help_support',
|
108 |
+
'title' => sprintf(__('%s Help support', 'accordions'), '<i class="fas fa-hands-helping"></i>'),
|
109 |
'priority' => 80,
|
110 |
'active' => ($current_tab == 'help_support') ? true : false,
|
111 |
);
|
113 |
|
114 |
$accordion_settings_tab[] = array(
|
115 |
'id' => 'buy_pro',
|
116 |
+
'title' => sprintf(__('%s Buy pro', 'accordions'), '<i class="fas fa-store"></i>'),
|
117 |
'priority' => 90,
|
118 |
'active' => ($current_tab == 'buy_pro') ? true : false,
|
119 |
);
|
123 |
|
124 |
$tabs_sorted = array();
|
125 |
|
126 |
+
if (!empty($accordion_settings_tab))
|
127 |
+
foreach ($accordion_settings_tab as $page_key => $tab) $tabs_sorted[$page_key] = isset($tab['priority']) ? $tab['priority'] : 0;
|
128 |
array_multisort($tabs_sorted, SORT_ASC, $accordion_settings_tab);
|
129 |
|
130 |
|
131 |
+
?>
|
132 |
|
133 |
<script>
|
134 |
(function($) {
|
135 |
|
136 |
+
$(document).ready(function() {
|
137 |
+
$(document).on('click', '.settings-tabs input[name="accordions_options[view_type]"]', function() {
|
138 |
+
var val = $(this).val();
|
139 |
|
140 |
+
//console.log( val );
|
141 |
|
142 |
+
$('.settings-tabs .tab-navs li').each(function(index) {
|
143 |
+
data_visible = $(this).attr('data_visible');
|
144 |
|
145 |
+
if (typeof data_visible != 'undefined') {
|
146 |
+
//console.log('undefined '+ data_visible );
|
147 |
|
148 |
+
n = data_visible.indexOf(val);
|
149 |
+
if (n < 0) {
|
150 |
+
$(this).hide();
|
151 |
+
} else {
|
152 |
+
$(this).show();
|
153 |
+
}
|
154 |
+
} else {
|
155 |
+
//console.log('Not matched: '+ data_visible );
|
156 |
|
157 |
|
158 |
+
}
|
159 |
+
});
|
160 |
|
161 |
|
162 |
+
})
|
163 |
})
|
164 |
+
})(jQuery);
|
|
|
|
|
165 |
</script>
|
166 |
|
167 |
<div class="settings-tabs vertical">
|
170 |
|
171 |
<?php
|
172 |
|
173 |
+
$accordions_view_types = apply_filters('accordions_view_types', array('accordion' => 'Accordion', 'tabs' => 'Tabs'));
|
174 |
|
175 |
$args = array(
|
176 |
+
'id' => 'view_type',
|
177 |
+
'parent' => 'accordions_options',
|
178 |
+
'title' => __('View type', 'accordions'),
|
179 |
+
'details' => '',
|
180 |
+
'type' => 'radio',
|
181 |
+
'value' => $view_type,
|
182 |
+
'default' => '',
|
183 |
+
'args' => $accordions_view_types,
|
184 |
);
|
185 |
|
186 |
$settings_tabs_field->generate_field($args);
|
191 |
|
192 |
<ul class="tab-navs">
|
193 |
<?php
|
194 |
+
foreach ($accordion_settings_tab as $tab) {
|
195 |
$id = $tab['id'];
|
196 |
$title = $tab['title'];
|
197 |
$active = $tab['active'];
|
198 |
$data_visible = isset($tab['data_visible']) ? $tab['data_visible'] : '';
|
199 |
$hidden = isset($tab['hidden']) ? $tab['hidden'] : false;
|
200 |
+
?>
|
201 |
+
<li <?php if (!empty($data_visible)) : ?> data_visible="<?php echo esc_attr($data_visible); ?>" <?php endif; ?> class="tab-nav <?php if ($hidden) echo 'hidden'; ?> <?php if ($active) echo 'active'; ?>" data-id="<?php echo esc_attr($id); ?>"><?php echo ($title); ?></li>
|
202 |
+
<?php
|
203 |
}
|
204 |
?>
|
205 |
</ul>
|
206 |
<?php
|
207 |
+
foreach ($accordion_settings_tab as $tab) {
|
208 |
$id = $tab['id'];
|
209 |
$title = $tab['title'];
|
210 |
$active = $tab['active'];
|
211 |
+
?>
|
212 |
|
213 |
+
<div class="tab-content <?php if ($active) echo 'active'; ?>" id="<?php echo esc_attr($id); ?>">
|
214 |
<?php
|
215 |
+
do_action('accordions_metabox_content_' . $id, $post_id);
|
216 |
?>
|
217 |
</div>
|
218 |
+
<?php
|
219 |
}
|
220 |
?>
|
221 |
</div>
|
222 |
<div class="clear clearfix"></div>
|
223 |
|
224 |
+
<?php
|
225 |
+
}
|
226 |
|
227 |
|
228 |
|
229 |
|
230 |
+
public function _post_meta_accordions_save($post_id)
|
231 |
+
{
|
232 |
|
233 |
/*
|
234 |
* We need to verify this came from the our screen and with
|
256 |
|
257 |
if (!current_user_can('edit_page', $post_id))
|
258 |
return $post_id;
|
|
|
259 |
} else {
|
260 |
|
261 |
if (!current_user_can('edit_post', $post_id))
|
265 |
/* OK, its safe for us to save the data now. */
|
266 |
|
267 |
do_action('accordions_post_meta_save', $post_id);
|
268 |
+
}
|
269 |
+
}
|
270 |
|
271 |
|
272 |
+
new class_accordions_post_meta();
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-settings-tabs.php
CHANGED
@@ -331,7 +331,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
331 |
|
332 |
$input_html = ob_get_clean();
|
333 |
|
334 |
-
echo
|
335 |
}
|
336 |
|
337 |
|
@@ -401,7 +401,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
401 |
|
402 |
$input_html = ob_get_clean();
|
403 |
|
404 |
-
echo
|
405 |
}
|
406 |
|
407 |
|
@@ -494,7 +494,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
494 |
|
495 |
$input_html = ob_get_clean();
|
496 |
|
497 |
-
echo
|
498 |
}
|
499 |
|
500 |
|
@@ -577,7 +577,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
577 |
|
578 |
$input_html = ob_get_clean();
|
579 |
|
580 |
-
echo
|
581 |
}
|
582 |
|
583 |
|
@@ -743,7 +743,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
743 |
|
744 |
$input_html = ob_get_clean();
|
745 |
|
746 |
-
echo
|
747 |
}
|
748 |
|
749 |
|
@@ -823,7 +823,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
823 |
|
824 |
$input_html = ob_get_clean();
|
825 |
|
826 |
-
echo
|
827 |
}
|
828 |
|
829 |
public function field_select2($option)
|
@@ -890,7 +890,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
890 |
|
891 |
$input_html = ob_get_clean();
|
892 |
|
893 |
-
echo
|
894 |
}
|
895 |
|
896 |
|
@@ -991,7 +991,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
991 |
|
992 |
$input_html = ob_get_clean();
|
993 |
|
994 |
-
echo
|
995 |
}
|
996 |
|
997 |
public function field_hidden($option)
|
@@ -1027,7 +1027,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1027 |
|
1028 |
$input_html = ob_get_clean();
|
1029 |
|
1030 |
-
echo
|
1031 |
}
|
1032 |
|
1033 |
|
@@ -1064,7 +1064,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1064 |
|
1065 |
$input_html = ob_get_clean();
|
1066 |
|
1067 |
-
echo
|
1068 |
}
|
1069 |
|
1070 |
|
@@ -1116,7 +1116,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1116 |
|
1117 |
$input_html = ob_get_clean();
|
1118 |
|
1119 |
-
echo
|
1120 |
}
|
1121 |
|
1122 |
|
@@ -1186,7 +1186,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1186 |
|
1187 |
$input_html = ob_get_clean();
|
1188 |
|
1189 |
-
echo
|
1190 |
}
|
1191 |
|
1192 |
|
@@ -1252,7 +1252,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1252 |
<?php
|
1253 |
|
1254 |
$input_html = ob_get_clean();
|
1255 |
-
echo
|
1256 |
}
|
1257 |
|
1258 |
|
@@ -1289,7 +1289,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1289 |
|
1290 |
$input_html = ob_get_clean();
|
1291 |
|
1292 |
-
echo
|
1293 |
}
|
1294 |
|
1295 |
|
@@ -1326,7 +1326,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1326 |
|
1327 |
$input_html = ob_get_clean();
|
1328 |
|
1329 |
-
echo
|
1330 |
}
|
1331 |
|
1332 |
|
@@ -1371,7 +1371,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1371 |
|
1372 |
$input_html = ob_get_clean();
|
1373 |
|
1374 |
-
echo
|
1375 |
}
|
1376 |
|
1377 |
|
@@ -1420,7 +1420,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1420 |
|
1421 |
$input_html = ob_get_clean();
|
1422 |
|
1423 |
-
echo
|
1424 |
}
|
1425 |
|
1426 |
|
@@ -1527,7 +1527,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1527 |
|
1528 |
$input_html = ob_get_clean();
|
1529 |
|
1530 |
-
echo
|
1531 |
}
|
1532 |
|
1533 |
|
@@ -1672,7 +1672,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1672 |
|
1673 |
$input_html = ob_get_clean();
|
1674 |
|
1675 |
-
echo
|
1676 |
}
|
1677 |
|
1678 |
public function field_datepicker($option)
|
@@ -1718,7 +1718,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1718 |
|
1719 |
$input_html = ob_get_clean();
|
1720 |
|
1721 |
-
echo
|
1722 |
}
|
1723 |
|
1724 |
|
@@ -1751,7 +1751,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1751 |
|
1752 |
$input_html = ob_get_clean();
|
1753 |
|
1754 |
-
echo
|
1755 |
}
|
1756 |
|
1757 |
|
@@ -1811,7 +1811,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1811 |
|
1812 |
$input_html = ob_get_clean();
|
1813 |
|
1814 |
-
echo
|
1815 |
}
|
1816 |
|
1817 |
|
@@ -1832,7 +1832,7 @@ if (!class_exists('settings_tabs_field')) {
|
|
1832 |
$details = isset($option['details']) ? $option['details'] : "";
|
1833 |
|
1834 |
|
1835 |
-
echo
|
1836 |
}
|
1837 |
}
|
1838 |
}
|
331 |
|
332 |
$input_html = ob_get_clean();
|
333 |
|
334 |
+
echo sprintf($field_template, $title, $input_html, $group_details);
|
335 |
}
|
336 |
|
337 |
|
401 |
|
402 |
$input_html = ob_get_clean();
|
403 |
|
404 |
+
echo sprintf($field_template, $title, $input_html, $group_details);
|
405 |
}
|
406 |
|
407 |
|
494 |
|
495 |
$input_html = ob_get_clean();
|
496 |
|
497 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
498 |
}
|
499 |
|
500 |
|
577 |
|
578 |
$input_html = ob_get_clean();
|
579 |
|
580 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
581 |
}
|
582 |
|
583 |
|
743 |
|
744 |
$input_html = ob_get_clean();
|
745 |
|
746 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
747 |
}
|
748 |
|
749 |
|
823 |
|
824 |
$input_html = ob_get_clean();
|
825 |
|
826 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
827 |
}
|
828 |
|
829 |
public function field_select2($option)
|
890 |
|
891 |
$input_html = ob_get_clean();
|
892 |
|
893 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
894 |
}
|
895 |
|
896 |
|
991 |
|
992 |
$input_html = ob_get_clean();
|
993 |
|
994 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
995 |
}
|
996 |
|
997 |
public function field_hidden($option)
|
1027 |
|
1028 |
$input_html = ob_get_clean();
|
1029 |
|
1030 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1031 |
}
|
1032 |
|
1033 |
|
1064 |
|
1065 |
$input_html = ob_get_clean();
|
1066 |
|
1067 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1068 |
}
|
1069 |
|
1070 |
|
1116 |
|
1117 |
$input_html = ob_get_clean();
|
1118 |
|
1119 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1120 |
}
|
1121 |
|
1122 |
|
1186 |
|
1187 |
$input_html = ob_get_clean();
|
1188 |
|
1189 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1190 |
}
|
1191 |
|
1192 |
|
1252 |
<?php
|
1253 |
|
1254 |
$input_html = ob_get_clean();
|
1255 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1256 |
}
|
1257 |
|
1258 |
|
1289 |
|
1290 |
$input_html = ob_get_clean();
|
1291 |
|
1292 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1293 |
}
|
1294 |
|
1295 |
|
1326 |
|
1327 |
$input_html = ob_get_clean();
|
1328 |
|
1329 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1330 |
}
|
1331 |
|
1332 |
|
1371 |
|
1372 |
$input_html = ob_get_clean();
|
1373 |
|
1374 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1375 |
}
|
1376 |
|
1377 |
|
1420 |
|
1421 |
$input_html = ob_get_clean();
|
1422 |
|
1423 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1424 |
}
|
1425 |
|
1426 |
|
1527 |
|
1528 |
$input_html = ob_get_clean();
|
1529 |
|
1530 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1531 |
}
|
1532 |
|
1533 |
|
1672 |
|
1673 |
$input_html = ob_get_clean();
|
1674 |
|
1675 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1676 |
}
|
1677 |
|
1678 |
public function field_datepicker($option)
|
1718 |
|
1719 |
$input_html = ob_get_clean();
|
1720 |
|
1721 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1722 |
}
|
1723 |
|
1724 |
|
1751 |
|
1752 |
$input_html = ob_get_clean();
|
1753 |
|
1754 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1755 |
}
|
1756 |
|
1757 |
|
1811 |
|
1812 |
$input_html = ob_get_clean();
|
1813 |
|
1814 |
+
echo sprintf($field_template, $title, $input_html, $details);
|
1815 |
}
|
1816 |
|
1817 |
|
1832 |
$details = isset($option['details']) ? $option['details'] : "";
|
1833 |
|
1834 |
|
1835 |
+
echo sprintf($field_template, $title, $html, $details);
|
1836 |
}
|
1837 |
}
|
1838 |
}
|
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: 6.0
|
7 |
-
Stable tag: 2.2.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -139,6 +139,10 @@ then paste this shortcode anywhere in your page to display accordions<br />
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
142 |
= 2.2.45 =
|
143 |
* 2022-08-24 - fix - remove unnecessary file codemirror.js file.
|
144 |
* 2022-08-24 - fix - custom script escape issue fixed.
|
4 |
Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 6.0
|
7 |
+
Stable tag: 2.2.46
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
= 2.2.46 =
|
143 |
+
* 2022-08-25 - fix - Broken HTML issue fixed.
|
144 |
+
|
145 |
+
|
146 |
= 2.2.45 =
|
147 |
* 2022-08-24 - fix - remove unnecessary file codemirror.js file.
|
148 |
* 2022-08-24 - fix - custom script escape issue fixed.
|
templates/accordion/accordion-hook.php
CHANGED
@@ -143,11 +143,11 @@ function accordions_main_top($atts)
|
|
143 |
|
144 |
<?php
|
145 |
if ($lazy_load == 'yes') {
|
146 |
-
?>#accordions-<?php echo esc_attr($post_id);
|
147 |
display: none;
|
148 |
}
|
149 |
|
150 |
-
#accordions-<?php echo esc_attr($post_id);
|
151 |
text-align: center;
|
152 |
position: absolute;
|
153 |
top: 50%;
|
@@ -164,37 +164,37 @@ function accordions_main_top($atts)
|
|
164 |
<?php endif; ?>position: relative;
|
165 |
}
|
166 |
|
167 |
-
#accordions-<?php echo esc_attr($post_id);
|
168 |
<?php if (!empty($header_background_color)) : ?>background: <?php echo esc_attr($header_background_color); ?> none repeat scroll 0 0;
|
169 |
<?php endif; ?><?php if (!empty($header_margin)) : ?>margin: <?php echo esc_attr($header_margin); ?>;
|
170 |
<?php endif; ?><?php if (!empty($header_padding)) : ?>padding: <?php echo esc_attr($header_padding); ?>;
|
171 |
<?php endif; ?>outline: none;
|
172 |
}
|
173 |
|
174 |
-
#accordions-<?php echo esc_attr($post_id);
|
175 |
<?php if (!empty($header_font_family)) : ?>font-family: <?php echo esc_attr($header_font_family); ?>;
|
176 |
<?php endif; ?><?php if (!empty($header_color)) : ?>color: <?php echo esc_attr($header_color); ?>;
|
177 |
<?php endif; ?><?php if (!empty($header_font_size)) : ?>font-size: <?php echo esc_attr($header_font_size); ?>;
|
178 |
<?php endif; ?>
|
179 |
}
|
180 |
|
181 |
-
#accordions-<?php echo esc_attr($post_id);
|
182 |
<?php if (!empty($header_color)) : ?>color: <?php echo esc_attr($header_color); ?>;
|
183 |
<?php endif; ?><?php if (!empty($header_font_size)) : ?>font-size: <?php echo esc_attr($header_font_size); ?>;
|
184 |
<?php endif; ?>
|
185 |
}
|
186 |
|
187 |
-
#accordions-<?php echo esc_attr($post_id);
|
188 |
<?php if (!empty($header_color_hover)) : ?>color: <?php echo esc_attr($header_color_hover); ?>;
|
189 |
<?php endif; ?>
|
190 |
}
|
191 |
|
192 |
-
#accordions-<?php echo esc_attr($post_id);
|
193 |
<?php if (!empty($header_active_background_color)) : ?>background: <?php echo esc_attr($header_active_background_color); ?>;
|
194 |
<?php endif; ?>border: none;
|
195 |
}
|
196 |
|
197 |
-
#accordions-<?php echo esc_attr($post_id);
|
198 |
<?php if (!empty($body_font_family)) : ?>font-family: <?php echo esc_attr($body_font_family); ?>;
|
199 |
<?php endif; ?><?php if (!empty($body_background_color)) : ?>background: <?php echo esc_attr($body_background_color); ?> none repeat scroll 0 0;
|
200 |
<?php endif; ?><?php if (!empty($body_color)) : ?>color: <?php echo esc_attr($body_color); ?>;
|
@@ -204,7 +204,7 @@ function accordions_main_top($atts)
|
|
204 |
<?php endif; ?>border: none;
|
205 |
}
|
206 |
|
207 |
-
#accordions-<?php echo esc_attr($post_id);
|
208 |
<?php if (!empty($icon_color)) : ?>color: <?php echo esc_attr($icon_color); ?>;
|
209 |
<?php endif; ?><?php if (!empty($icon_font_size)) : ?>font-size: <?php echo esc_attr($icon_font_size); ?>;
|
210 |
<?php endif; ?><?php if (!empty($icon_background_color)) : ?>background: <?php echo esc_attr($icon_background_color); ?> none repeat scroll 0 0;
|
@@ -213,7 +213,7 @@ function accordions_main_top($atts)
|
|
213 |
<?php endif; ?>
|
214 |
}
|
215 |
|
216 |
-
#accordions-<?php echo esc_attr($post_id);
|
217 |
<?php if (!empty($icon_color_hover)) : ?>color: <?php echo esc_attr($icon_color_hover); ?>;
|
218 |
<?php endif; ?>
|
219 |
}
|
@@ -232,7 +232,7 @@ function accordions_main_top($atts)
|
|
232 |
$bg_color_css = !empty($background_color) ? $background_color : '';
|
233 |
|
234 |
if (!empty($bg_color_css) || !empty($header_bg_img)) {
|
235 |
-
?>#accordions-<?php echo esc_attr($post_id);
|
236 |
background: <?php echo esc_attr($bg_color_css); ?> <?php echo esc_url_raw($header_bg_img); ?>;
|
237 |
}
|
238 |
|
@@ -346,8 +346,8 @@ function accordions_main_top($atts)
|
|
346 |
if ($icon_position == 'left') :
|
347 |
?>
|
348 |
<span id="accordion-icons-<?php echo esc_attr($index); ?>" class="accordion-icons">
|
349 |
-
<span class="accordion-icon-active accordion-plus"><?php echo
|
350 |
-
<span class="accordion-icon-inactive accordion-minus"><?php echo
|
351 |
</span>
|
352 |
<span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode(htmlspecialchars_decode($accordion_header)); ?></span>
|
353 |
<?php
|
@@ -355,8 +355,8 @@ function accordions_main_top($atts)
|
|
355 |
?>
|
356 |
<span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode(htmlspecialchars_decode($accordion_header)); ?></span>
|
357 |
<span id="accordion-icons-<?php echo esc_attr($index); ?>" class="accordion-icons">
|
358 |
-
<span class="accordion-icon-active accordion-plus"><?php echo
|
359 |
-
<span class="accordion-icon-inactive accordion-minus"><?php echo
|
360 |
</span>
|
361 |
<?php
|
362 |
else :
|
143 |
|
144 |
<?php
|
145 |
if ($lazy_load == 'yes') {
|
146 |
+
?>#accordions-<?php echo esc_attr($post_id); ?> .items {
|
147 |
display: none;
|
148 |
}
|
149 |
|
150 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordions-lazy {
|
151 |
text-align: center;
|
152 |
position: absolute;
|
153 |
top: 50%;
|
164 |
<?php endif; ?>position: relative;
|
165 |
}
|
166 |
|
167 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordions-head {
|
168 |
<?php if (!empty($header_background_color)) : ?>background: <?php echo esc_attr($header_background_color); ?> none repeat scroll 0 0;
|
169 |
<?php endif; ?><?php if (!empty($header_margin)) : ?>margin: <?php echo esc_attr($header_margin); ?>;
|
170 |
<?php endif; ?><?php if (!empty($header_padding)) : ?>padding: <?php echo esc_attr($header_padding); ?>;
|
171 |
<?php endif; ?>outline: none;
|
172 |
}
|
173 |
|
174 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordions-head-title {
|
175 |
<?php if (!empty($header_font_family)) : ?>font-family: <?php echo esc_attr($header_font_family); ?>;
|
176 |
<?php endif; ?><?php if (!empty($header_color)) : ?>color: <?php echo esc_attr($header_color); ?>;
|
177 |
<?php endif; ?><?php if (!empty($header_font_size)) : ?>font-size: <?php echo esc_attr($header_font_size); ?>;
|
178 |
<?php endif; ?>
|
179 |
}
|
180 |
|
181 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordions-head-title-toggle {
|
182 |
<?php if (!empty($header_color)) : ?>color: <?php echo esc_attr($header_color); ?>;
|
183 |
<?php endif; ?><?php if (!empty($header_font_size)) : ?>font-size: <?php echo esc_attr($header_font_size); ?>;
|
184 |
<?php endif; ?>
|
185 |
}
|
186 |
|
187 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordions-head:hover .accordions-head-title {
|
188 |
<?php if (!empty($header_color_hover)) : ?>color: <?php echo esc_attr($header_color_hover); ?>;
|
189 |
<?php endif; ?>
|
190 |
}
|
191 |
|
192 |
+
#accordions-<?php echo esc_attr($post_id); ?> .ui-state-active {
|
193 |
<?php if (!empty($header_active_background_color)) : ?>background: <?php echo esc_attr($header_active_background_color); ?>;
|
194 |
<?php endif; ?>border: none;
|
195 |
}
|
196 |
|
197 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordion-content {
|
198 |
<?php if (!empty($body_font_family)) : ?>font-family: <?php echo esc_attr($body_font_family); ?>;
|
199 |
<?php endif; ?><?php if (!empty($body_background_color)) : ?>background: <?php echo esc_attr($body_background_color); ?> none repeat scroll 0 0;
|
200 |
<?php endif; ?><?php if (!empty($body_color)) : ?>color: <?php echo esc_attr($body_color); ?>;
|
204 |
<?php endif; ?>border: none;
|
205 |
}
|
206 |
|
207 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordion-icons {
|
208 |
<?php if (!empty($icon_color)) : ?>color: <?php echo esc_attr($icon_color); ?>;
|
209 |
<?php endif; ?><?php if (!empty($icon_font_size)) : ?>font-size: <?php echo esc_attr($icon_font_size); ?>;
|
210 |
<?php endif; ?><?php if (!empty($icon_background_color)) : ?>background: <?php echo esc_attr($icon_background_color); ?> none repeat scroll 0 0;
|
213 |
<?php endif; ?>
|
214 |
}
|
215 |
|
216 |
+
#accordions-<?php echo esc_attr($post_id); ?> .accordions-head:hover .accordion-icons span {
|
217 |
<?php if (!empty($icon_color_hover)) : ?>color: <?php echo esc_attr($icon_color_hover); ?>;
|
218 |
<?php endif; ?>
|
219 |
}
|
232 |
$bg_color_css = !empty($background_color) ? $background_color : '';
|
233 |
|
234 |
if (!empty($bg_color_css) || !empty($header_bg_img)) {
|
235 |
+
?>#accordions-<?php echo esc_attr($post_id); ?> #header-<?php echo esc_attr($index); ?> {
|
236 |
background: <?php echo esc_attr($bg_color_css); ?> <?php echo esc_url_raw($header_bg_img); ?>;
|
237 |
}
|
238 |
|
346 |
if ($icon_position == 'left') :
|
347 |
?>
|
348 |
<span id="accordion-icons-<?php echo esc_attr($index); ?>" class="accordion-icons">
|
349 |
+
<span class="accordion-icon-active accordion-plus"><?php echo ($active_icon); ?></span>
|
350 |
+
<span class="accordion-icon-inactive accordion-minus"><?php echo ($inactive_icon); ?></span>
|
351 |
</span>
|
352 |
<span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode(htmlspecialchars_decode($accordion_header)); ?></span>
|
353 |
<?php
|
355 |
?>
|
356 |
<span id="header-text-<?php echo esc_attr($index); ?>" class="accordions-head-title"><?php echo do_shortcode(htmlspecialchars_decode($accordion_header)); ?></span>
|
357 |
<span id="accordion-icons-<?php echo esc_attr($index); ?>" class="accordion-icons">
|
358 |
+
<span class="accordion-icon-active accordion-plus"><?php echo ($active_icon); ?></span>
|
359 |
+
<span class="accordion-icon-inactive accordion-minus"><?php echo ($inactive_icon); ?></span>
|
360 |
</span>
|
361 |
<?php
|
362 |
else :
|