Version Description
Download this release
Release Info
Developer | pickplugins |
Plugin | Accordion |
Version | 2.2.14 |
Comparing to | |
See all releases |
Code changes from version 2.2.13 to 2.2.14
- accordions.php +2 -2
- includes/class-post-meta-accordions-hook.php +4 -4
- includes/class-shortcodes.php +4 -8
- readme.txt +7 -1
- templates/accordion/accordion-hook.php +27 -42
accordions.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Accordions by PickPlugins
|
4 |
Plugin URI: https://www.pickplugins.com/item/accordions-html-css3-responsive-accordion-grid-for-wordpress/?ref=dashboard
|
5 |
Description: Fully responsive and mobile ready accordion grid for wordpress.
|
6 |
-
Version: 2.2.
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 4.0
|
9 |
Author: PickPlugins
|
@@ -23,7 +23,7 @@ class Accordions{
|
|
23 |
|
24 |
define('accordions_plugin_url', plugins_url('/', __FILE__) );
|
25 |
define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
|
26 |
-
define('accordions_version', '2.2.
|
27 |
define('accordions_plugin_name', 'Accordions' );
|
28 |
define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
|
29 |
|
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.14
|
7 |
WC requires at least: 3.0.0
|
8 |
WC tested up to: 4.0
|
9 |
Author: PickPlugins
|
23 |
|
24 |
define('accordions_plugin_url', plugins_url('/', __FILE__) );
|
25 |
define('accordions_plugin_dir', plugin_dir_path( __FILE__ ) );
|
26 |
+
define('accordions_version', '2.2.14' );
|
27 |
define('accordions_plugin_name', 'Accordions' );
|
28 |
define('accordions_plugin_basename', plugin_basename( __FILE__ ) );
|
29 |
|
includes/class-post-meta-accordions-hook.php
CHANGED
@@ -238,7 +238,7 @@ function accordions_metabox_content_general($post_id){
|
|
238 |
'details' => __('Enable autoembed for content.','accordions'),
|
239 |
'type' => 'select',
|
240 |
'value' => $enable_autoembed,
|
241 |
-
'default' => '
|
242 |
'args' => array(
|
243 |
'no' => __('No','accordions'),
|
244 |
'yes' => __('Yes','accordions'),
|
@@ -254,7 +254,7 @@ function accordions_metabox_content_general($post_id){
|
|
254 |
'details' => __('Enable shortcode for content.','accordions'),
|
255 |
'type' => 'select',
|
256 |
'value' => $enable_shortcode,
|
257 |
-
'default' => '
|
258 |
'args' => array(
|
259 |
'no' => __('No','accordions'),
|
260 |
'yes' => __('Yes','accordions'),
|
@@ -270,7 +270,7 @@ function accordions_metabox_content_general($post_id){
|
|
270 |
'details' => __('Enable wpautop for content.','accordions'),
|
271 |
'type' => 'select',
|
272 |
'value' => $enable_wpautop,
|
273 |
-
'default' => '
|
274 |
'args' => array(
|
275 |
'no' => __('No','accordions'),
|
276 |
'yes' => __('Yes','accordions'),
|
@@ -286,7 +286,7 @@ function accordions_metabox_content_general($post_id){
|
|
286 |
'details' => __('Enable schema for accordion or tabs.','accordions'),
|
287 |
'type' => 'select',
|
288 |
'value' => $enable_schema,
|
289 |
-
'default' => '
|
290 |
'args' => array(
|
291 |
'no' => __('No','accordions'),
|
292 |
'yes' => __('Yes','accordions'),
|
238 |
'details' => __('Enable autoembed for content.','accordions'),
|
239 |
'type' => 'select',
|
240 |
'value' => $enable_autoembed,
|
241 |
+
'default' => 'no',
|
242 |
'args' => array(
|
243 |
'no' => __('No','accordions'),
|
244 |
'yes' => __('Yes','accordions'),
|
254 |
'details' => __('Enable shortcode for content.','accordions'),
|
255 |
'type' => 'select',
|
256 |
'value' => $enable_shortcode,
|
257 |
+
'default' => 'no',
|
258 |
'args' => array(
|
259 |
'no' => __('No','accordions'),
|
260 |
'yes' => __('Yes','accordions'),
|
270 |
'details' => __('Enable wpautop for content.','accordions'),
|
271 |
'type' => 'select',
|
272 |
'value' => $enable_wpautop,
|
273 |
+
'default' => 'no',
|
274 |
'args' => array(
|
275 |
'no' => __('No','accordions'),
|
276 |
'yes' => __('Yes','accordions'),
|
286 |
'details' => __('Enable schema for accordion or tabs.','accordions'),
|
287 |
'type' => 'select',
|
288 |
'value' => $enable_schema,
|
289 |
+
'default' => 'no',
|
290 |
'args' => array(
|
291 |
'no' => __('No','accordions'),
|
292 |
'yes' => __('Yes','accordions'),
|
includes/class-shortcodes.php
CHANGED
@@ -42,21 +42,17 @@ class class_accordions_shortcodes {
|
|
42 |
ob_start();
|
43 |
|
44 |
if ($view_type == 'tabs'):
|
45 |
-
?>
|
46 |
-
<div id="accordions-tabs-<?php echo $post_id; ?>" class="accordions-tabs-<?php echo $post_id; ?> accordions-tabs accordions">
|
47 |
<?php
|
48 |
do_action('accordions_tabs_main', $atts);
|
49 |
?>
|
50 |
-
</div
|
51 |
-
<?php
|
52 |
else:
|
53 |
-
?>
|
54 |
-
<div id="accordions-<?php echo $post_id; ?>" class="accordions-<?php echo $post_id; ?> accordions">
|
55 |
<?php
|
56 |
do_action('accordions_main', $atts);
|
57 |
?>
|
58 |
-
</div
|
59 |
-
<?php
|
60 |
endif;
|
61 |
|
62 |
return ob_get_clean();
|
42 |
ob_start();
|
43 |
|
44 |
if ($view_type == 'tabs'):
|
45 |
+
?><div id="accordions-tabs-<?php echo $post_id; ?>" class="accordions-tabs-<?php echo $post_id; ?> accordions-tabs accordions">
|
|
|
46 |
<?php
|
47 |
do_action('accordions_tabs_main', $atts);
|
48 |
?>
|
49 |
+
</div><?php
|
|
|
50 |
else:
|
51 |
+
?><div id="accordions-<?php echo $post_id; ?>" class="accordions-<?php echo $post_id; ?> accordions">
|
|
|
52 |
<?php
|
53 |
do_action('accordions_main', $atts);
|
54 |
?>
|
55 |
+
</div><?php
|
|
|
56 |
endif;
|
57 |
|
58 |
return ob_get_clean();
|
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.4
|
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,12 @@ then paste this shortcode anywhere in your page to display accordions<br />
|
|
139 |
|
140 |
== Changelog ==
|
141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
= 2.2.13=
|
143 |
* 2020-04-04 - fix - minor script issue fixed.
|
144 |
* 2020-04-04 - remove - remove data migration, load old option if new options not saved.
|
4 |
Tags: accordion, tabs, FAQ, WooCommerce FAQ Tab, accordion short-code, accordions widget, tab
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 5.4
|
7 |
+
Stable tag: 2.2.14
|
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.14=
|
143 |
+
* 2020-04-08 - fix - schema error issue fixed.
|
144 |
+
* 2020-04-08 - remove - remove shortcode from schema content.
|
145 |
+
* 2020-04-08 - remove - remove html from schema content.
|
146 |
+
|
147 |
+
|
148 |
= 2.2.13=
|
149 |
* 2020-04-04 - fix - minor script issue fixed.
|
150 |
* 2020-04-04 - remove - remove data migration, load old option if new options not saved.
|
templates/accordion/accordion-hook.php
CHANGED
@@ -14,8 +14,7 @@ function accordions_main_top($atts){
|
|
14 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
15 |
|
16 |
if($lazy_load=='yes'):
|
17 |
-
?>
|
18 |
-
<div id="accordions-lazy-<?php echo $post_id; ?>" class="accordions-lazy">
|
19 |
<?php if(!empty($lazy_load_src)):?>
|
20 |
<img src="<?php echo $lazy_load_src; ?>" />
|
21 |
<?php endif; ?>
|
@@ -25,19 +24,12 @@ function accordions_main_top($atts){
|
|
25 |
jQuery('#accordions-lazy-<?php echo $post_id; ?>').fadeOut();
|
26 |
jQuery('#accordions-<?php echo $post_id; ?> .items').fadeIn();
|
27 |
});
|
28 |
-
</script
|
29 |
-
<?php
|
30 |
endif;
|
31 |
}
|
32 |
|
33 |
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
add_action('accordions_main', 'accordions_main_style', 20);
|
42 |
|
43 |
function accordions_main_style($atts){
|
@@ -122,8 +114,7 @@ function accordions_main_style($atts){
|
|
122 |
wp_enqueue_script('jquery-effects-core');
|
123 |
|
124 |
|
125 |
-
|
126 |
-
<style type='text/css'>
|
127 |
@media only screen and (min-width: 1024px ){
|
128 |
#accordions-<?php echo $post_id; ?> {
|
129 |
<?php if(!empty($width_large)):?>
|
@@ -158,8 +149,7 @@ function accordions_main_style($atts){
|
|
158 |
}
|
159 |
<?php
|
160 |
}
|
161 |
-
?>
|
162 |
-
#accordions-<?php echo $post_id; ?> {
|
163 |
<?php if(!empty($container_text_align)):?>
|
164 |
text-align: <?php echo $container_text_align; ?>;
|
165 |
<?php endif; ?>
|
@@ -311,8 +301,7 @@ function accordions_main_items($atts){
|
|
311 |
$accordions_upgrade = isset($accordions_plugin_info['accordions_upgrade']) ? $accordions_plugin_info['accordions_upgrade'] : '';
|
312 |
|
313 |
$active_index = array();
|
314 |
-
|
315 |
-
<div class="items">
|
316 |
<?php
|
317 |
|
318 |
if(!empty($accordions_content)):
|
@@ -404,8 +393,7 @@ function accordions_main_items($atts){
|
|
404 |
?>
|
405 |
</div>
|
406 |
<script>
|
407 |
-
jQuery(document).ready(function($){
|
408 |
-
<?php
|
409 |
if(isset($_GET['active_index'])):
|
410 |
$accordion_index = isset($_GET['active_index']) ? sanitize_text_field($_GET['active_index']) : '';
|
411 |
|
@@ -421,55 +409,51 @@ function accordions_main_items($atts){
|
|
421 |
foreach ($active_index as $ind){
|
422 |
$active_index_new[] = (int)$ind;
|
423 |
}
|
424 |
-
?>
|
425 |
-
accordions_active_index_<?php echo $accordion_id; ?> = <?php echo json_encode($active_index_new); ?>;
|
426 |
-
<?php
|
427 |
}
|
428 |
else:
|
429 |
-
?>
|
430 |
-
accordions_active_index_<?php echo $post_id; ?> = <?php echo json_encode($active_index); ?>;
|
431 |
-
<?php
|
432 |
endif;
|
433 |
?>
|
434 |
})
|
435 |
-
</script
|
436 |
-
<?php
|
437 |
|
438 |
|
439 |
$enable_schema = isset($accordions_options['enable_schema']) ? $accordions_options['enable_schema'] : 'yes';
|
|
|
440 |
if($enable_schema == 'no') return;
|
441 |
$accordions_count = count($accordions_content);
|
442 |
|
443 |
ob_start();
|
444 |
$i = 1;
|
445 |
-
foreach ($accordions_content as $index => $accordion)
|
446 |
$accordion_hide = isset($accordion['hide']) ? $accordion['hide'] : '';
|
447 |
if ($accordion_hide == 'true') continue;
|
448 |
-
|
449 |
-
$
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
}
|
|
|
459 |
|
460 |
$i++;
|
461 |
}
|
462 |
|
463 |
$html = ob_get_clean();
|
464 |
-
|
465 |
-
<script type="application/ld+json">
|
466 |
{
|
467 |
"@context": "https://schema.org",
|
468 |
"@type": "FAQPage",
|
469 |
"mainEntity": [<?php echo $html; ?>]
|
470 |
}
|
471 |
-
</script
|
472 |
-
|
473 |
}
|
474 |
|
475 |
|
@@ -584,6 +568,7 @@ function accordions_main_scripts($atts){
|
|
584 |
}
|
585 |
|
586 |
|
|
|
587 |
add_action('accordions_main_no_content', 'accordions_main_no_content', 50);
|
588 |
function accordions_main_no_content(){
|
589 |
|
14 |
$lazy_load_src = isset($accordions_options['lazy_load_src']) ? $accordions_options['lazy_load_src'] : '';
|
15 |
|
16 |
if($lazy_load=='yes'):
|
17 |
+
?><div id="accordions-lazy-<?php echo $post_id; ?>" class="accordions-lazy">
|
|
|
18 |
<?php if(!empty($lazy_load_src)):?>
|
19 |
<img src="<?php echo $lazy_load_src; ?>" />
|
20 |
<?php endif; ?>
|
24 |
jQuery('#accordions-lazy-<?php echo $post_id; ?>').fadeOut();
|
25 |
jQuery('#accordions-<?php echo $post_id; ?> .items').fadeIn();
|
26 |
});
|
27 |
+
</script><?php
|
|
|
28 |
endif;
|
29 |
}
|
30 |
|
31 |
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
add_action('accordions_main', 'accordions_main_style', 20);
|
34 |
|
35 |
function accordions_main_style($atts){
|
114 |
wp_enqueue_script('jquery-effects-core');
|
115 |
|
116 |
|
117 |
+
?><style type='text/css'>
|
|
|
118 |
@media only screen and (min-width: 1024px ){
|
119 |
#accordions-<?php echo $post_id; ?> {
|
120 |
<?php if(!empty($width_large)):?>
|
149 |
}
|
150 |
<?php
|
151 |
}
|
152 |
+
?>#accordions-<?php echo $post_id; ?> {
|
|
|
153 |
<?php if(!empty($container_text_align)):?>
|
154 |
text-align: <?php echo $container_text_align; ?>;
|
155 |
<?php endif; ?>
|
301 |
$accordions_upgrade = isset($accordions_plugin_info['accordions_upgrade']) ? $accordions_plugin_info['accordions_upgrade'] : '';
|
302 |
|
303 |
$active_index = array();
|
304 |
+
?><div class="items">
|
|
|
305 |
<?php
|
306 |
|
307 |
if(!empty($accordions_content)):
|
393 |
?>
|
394 |
</div>
|
395 |
<script>
|
396 |
+
jQuery(document).ready(function($){<?php
|
|
|
397 |
if(isset($_GET['active_index'])):
|
398 |
$accordion_index = isset($_GET['active_index']) ? sanitize_text_field($_GET['active_index']) : '';
|
399 |
|
409 |
foreach ($active_index as $ind){
|
410 |
$active_index_new[] = (int)$ind;
|
411 |
}
|
412 |
+
?>accordions_active_index_<?php echo $accordion_id; ?> = <?php echo json_encode($active_index_new); ?>;<?php
|
|
|
|
|
413 |
}
|
414 |
else:
|
415 |
+
?>accordions_active_index_<?php echo $post_id; ?> = <?php echo json_encode($active_index); ?>;<?php
|
|
|
|
|
416 |
endif;
|
417 |
?>
|
418 |
})
|
419 |
+
</script><?php
|
|
|
420 |
|
421 |
|
422 |
$enable_schema = isset($accordions_options['enable_schema']) ? $accordions_options['enable_schema'] : 'yes';
|
423 |
+
|
424 |
if($enable_schema == 'no') return;
|
425 |
$accordions_count = count($accordions_content);
|
426 |
|
427 |
ob_start();
|
428 |
$i = 1;
|
429 |
+
foreach ($accordions_content as $index => $accordion){
|
430 |
$accordion_hide = isset($accordion['hide']) ? $accordion['hide'] : '';
|
431 |
if ($accordion_hide == 'true') continue;
|
432 |
+
|
433 |
+
$accordion_header = isset($accordion['header']) ? wp_strip_all_tags(strip_shortcodes($accordion['header'])) : '';
|
434 |
+
$accordion_body = isset($accordion['body']) ? wp_strip_all_tags(strip_shortcodes($accordion['body'])) : '';
|
435 |
+
|
436 |
+
?>{
|
437 |
+
"@type": "Question",
|
438 |
+
"name": "<?php echo $accordion_header; ?>",
|
439 |
+
"acceptedAnswer":{
|
440 |
+
"@type": "Answer",
|
441 |
+
"text": "<?php echo $accordion_body; ?>"
|
442 |
+
}
|
443 |
+
}<?php echo ($accordions_count > $i ) ? ',' :'';
|
444 |
|
445 |
$i++;
|
446 |
}
|
447 |
|
448 |
$html = ob_get_clean();
|
449 |
+
?><script type="application/ld+json">
|
|
|
450 |
{
|
451 |
"@context": "https://schema.org",
|
452 |
"@type": "FAQPage",
|
453 |
"mainEntity": [<?php echo $html; ?>]
|
454 |
}
|
455 |
+
</script><?php
|
456 |
+
|
457 |
}
|
458 |
|
459 |
|
568 |
}
|
569 |
|
570 |
|
571 |
+
|
572 |
add_action('accordions_main_no_content', 'accordions_main_no_content', 50);
|
573 |
function accordions_main_no_content(){
|
574 |
|