Accordion - Version 2.2.64

Version Description

  • 2022-11-01 - add - Option added to enable/disable iframe on accordion content.
Download this release

Release Info

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

Code changes from version 2.2.63 to 2.2.64

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.63
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.63');
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.64
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.64');
27
  define('accordions_plugin_name', 'Accordions');
28
  define('accordions_plugin_basename', plugin_basename(__FILE__));
29
 
includes/class-settings-hook.php CHANGED
@@ -10,6 +10,7 @@ function accordions_settings_content_general(){
10
 
11
  $font_aw_version = isset($accordions_settings['font_aw_version']) ? $accordions_settings['font_aw_version'] : 'none';
12
  $accordions_preview = isset($accordions_settings['accordions_preview']) ? $accordions_settings['accordions_preview'] : 'yes';
 
13
 
14
 
15
  ?>
@@ -34,6 +35,21 @@ function accordions_settings_content_general(){
34
 
35
  $settings_tabs_field->generate_field($args);
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  $args = array(
38
  'id' => 'accordions_preview',
39
  'parent' => 'accordions_settings',
10
 
11
  $font_aw_version = isset($accordions_settings['font_aw_version']) ? $accordions_settings['font_aw_version'] : 'none';
12
  $accordions_preview = isset($accordions_settings['accordions_preview']) ? $accordions_settings['accordions_preview'] : 'yes';
13
+ $allow_iframe = isset($accordions_settings['allow_iframe']) ? $accordions_settings['allow_iframe'] : 'yes';
14
 
15
 
16
  ?>
35
 
36
  $settings_tabs_field->generate_field($args);
37
 
38
+
39
+ $args = array(
40
+ 'id' => 'allow_iframe',
41
+ 'parent' => 'accordions_settings',
42
+ 'title' => __('Allow Iframe on accordion','accordions'),
43
+ 'details' => __('Allow accordion on accordion content.','accordions'),
44
+ 'type' => 'select',
45
+ 'value' => $allow_iframe,
46
+ 'default' => 'yes',
47
+ 'args' => array('yes'=>__('Yes','accordions'), 'no'=>__('No','accordions') ),
48
+ );
49
+
50
+ $settings_tabs_field->generate_field($args);
51
+
52
+
53
  $args = array(
54
  'id' => 'accordions_preview',
55
  'parent' => 'accordions_settings',
includes/functions.php CHANGED
@@ -536,6 +536,56 @@ function accordions_youtube($atts, $content = null)
536
  return $html;
537
  }
538
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
 
540
 
541
 
536
  return $html;
537
  }
538
 
539
+ add_shortcode('accordions_vimeo', 'accordions_vimeo');
540
+
541
+
542
+ function accordions_vimeo($atts, $content = null)
543
+ {
544
+
545
+ $atts = shortcode_atts(
546
+ array(
547
+ 'video_id' => "",
548
+ 'width' => "560",
549
+ 'height' => "315",
550
+
551
+ ),
552
+ $atts
553
+ );
554
+
555
+ $video_id = $atts['video_id'];
556
+ $width = $atts['width'];
557
+ $height = $atts['height'];
558
+
559
+ $html = '';
560
+ $html .= '<iframe title="vimeo-player" src="https://player.vimeo.com/video/' . esc_attr($video_id) . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" frameborder="0" allowfullscreen></iframe>';
561
+
562
+ return $html;
563
+ }
564
+
565
+
566
+ function accordions_wpkses_post_tags( $tags, $context ) {
567
+ $accordions_settings = get_option('accordions_settings');
568
+ $allow_iframe = isset($accordions_settings['allow_iframe']) ? $accordions_settings['allow_iframe'] : 'yes';
569
+
570
+ if ( 'post' === $context && $allow_iframe == 'yes' ) {
571
+ $tags['iframe'] = array(
572
+ 'src' => true,
573
+ 'height' => true,
574
+ 'width' => true,
575
+ 'frameborder' => true,
576
+ 'allowfullscreen' => true,
577
+ );
578
+ }
579
+
580
+ return $tags;
581
+ }
582
+
583
+ add_filter( 'wp_kses_allowed_html', 'accordions_wpkses_post_tags', 10, 2 );
584
+
585
+
586
+
587
+
588
+
589
 
590
 
591
 
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.63
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -140,6 +140,9 @@ then paste this shortcode anywhere in your page to display accordions<br />
140
  == Changelog ==
141
 
142
 
 
 
 
143
  = 2.2.63 =
144
  * 2022-10-06 - fix - Missing “}” character issue for schema fixed.
145
 
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.64
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
140
  == Changelog ==
141
 
142
 
143
+ = 2.2.64 =
144
+ * 2022-11-01 - add - Option added to enable/disable iframe on accordion content.
145
+
146
  = 2.2.63 =
147
  * 2022-10-06 - fix - Missing “}” character issue for schema fixed.
148
 
templates/accordion/accordion-hook.php CHANGED
@@ -331,6 +331,9 @@ function accordions_main_top($atts)
331
  if ($enable_autoembed == 'yes') {
332
  $WP_Embed = new WP_Embed();
333
  $accordion_body = $WP_Embed->autoembed($accordion_body);
 
 
 
334
  }
335
 
336
  if ($enable_wpautop == 'yes') {
331
  if ($enable_autoembed == 'yes') {
332
  $WP_Embed = new WP_Embed();
333
  $accordion_body = $WP_Embed->autoembed($accordion_body);
334
+
335
+ //var_dump($accordion_body);
336
+
337
  }
338
 
339
  if ($enable_wpautop == 'yes') {