Version Description
- 2022-09-14 - fix - accordions widget raw html issue fixed.
Download this release
Release Info
Developer | pickplugins |
Plugin | Accordion |
Version | 2.2.59 |
Comparing to | |
See all releases |
Code changes from version 2.2.58 to 2.2.59
- accordions.php +2 -2
- includes/class-widget-accordions.php +47 -42
- readme.txt +5 -1
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.59
|
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.59');
|
27 |
define('accordions_plugin_name', 'Accordions');
|
28 |
define('accordions_plugin_basename', plugin_basename(__FILE__));
|
29 |
|
includes/class-widget-accordions.php
CHANGED
@@ -1,64 +1,69 @@
|
|
1 |
<?php
|
2 |
|
3 |
|
4 |
-
if (
|
5 |
|
6 |
-
class WidgetAccordions extends WP_Widget
|
|
|
7 |
|
8 |
-
function __construct()
|
9 |
-
|
10 |
-
|
|
|
11 |
}
|
12 |
|
13 |
-
public function widget(
|
14 |
-
|
15 |
-
|
16 |
-
$
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
20 |
echo do_shortcode("[accordions id='$accordion_id']");
|
21 |
-
echo
|
22 |
}
|
23 |
|
24 |
-
public function form(
|
25 |
-
|
26 |
-
|
27 |
-
$
|
28 |
-
$
|
29 |
-
|
|
|
30 |
?>
|
31 |
|
32 |
<p>
|
33 |
-
|
34 |
-
|
35 |
</p>
|
36 |
-
|
37 |
<p>
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
foreach(
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
<option value=<?php echo esc_html($accordion->ID); ?> <?php echo esc_attr($selected); ?>><?php echo esc_html($accordion->post_title); ?></option>
|
47 |
-
<?php
|
48 |
-
|
49 |
-
?>
|
50 |
-
|
51 |
-
|
52 |
</p>
|
53 |
|
54 |
<?php
|
55 |
}
|
56 |
-
|
57 |
-
public function update(
|
58 |
-
|
|
|
59 |
$instance = array();
|
60 |
-
$instance['title'] = isset(
|
61 |
-
$instance['accordion_id'] = isset(
|
62 |
return $instance;
|
63 |
}
|
64 |
-
}
|
1 |
<?php
|
2 |
|
3 |
|
4 |
+
if (!defined('ABSPATH')) exit; // if direct access
|
5 |
|
6 |
+
class WidgetAccordions extends WP_Widget
|
7 |
+
{
|
8 |
|
9 |
+
function __construct()
|
10 |
+
{
|
11 |
+
|
12 |
+
parent::__construct('widget_accordions', __('Accordions', 'accordions'), array('description' => __('Show Accordions', 'accordions'),));
|
13 |
}
|
14 |
|
15 |
+
public function widget($args, $instance)
|
16 |
+
{
|
17 |
+
|
18 |
+
$title = apply_filters('widget_title', $instance['title']);
|
19 |
+
$accordion_id = isset($instance['accordion_id']) ? $instance['accordion_id'] : '';
|
20 |
+
|
21 |
+
echo wp_kses_post($args['before_widget']);
|
22 |
+
if (!empty($title)) echo $args['before_title'] . $title . $args['after_title'];
|
23 |
echo do_shortcode("[accordions id='$accordion_id']");
|
24 |
+
echo wp_kses_post($args['after_widget']);
|
25 |
}
|
26 |
|
27 |
+
public function form($instance)
|
28 |
+
{
|
29 |
+
|
30 |
+
$title = isset($instance['title']) ? $instance['title'] : __('Accordions', 'accordions');
|
31 |
+
$accordion_id = isset($instance['accordion_id']) ? $instance['accordion_id'] : '';
|
32 |
+
$accordions = get_posts(array('posts_per_page' => -1, 'post_type' => 'accordions'));
|
33 |
+
|
34 |
?>
|
35 |
|
36 |
<p>
|
37 |
+
<label for=<?php echo esc_attr($this->get_field_id('title')); ?>><?php echo __('Title', 'accordions'); ?> : </label>
|
38 |
+
<input class='widefat' id=<?php echo esc_attr($this->get_field_id('title')); ?> name=<?php echo esc_attr($this->get_field_name('title')); ?> type='text' value=<?php echo esc_attr($title); ?> />
|
39 |
</p>
|
40 |
+
|
41 |
<p>
|
42 |
+
<label for=<?php echo esc_attr($this->get_field_id('accordion_id')); ?>><?php echo __('Select Accordion', 'accordions'); ?> : </label>
|
43 |
+
<select name=<?php echo esc_attr($this->get_field_name('accordion_id')); ?> id=<?php echo esc_attr($this->get_field_id('accordion_id')); ?> class='widefat'>
|
44 |
+
|
45 |
+
<?php
|
46 |
+
foreach ($accordions as $accordion) {
|
47 |
+
|
48 |
+
$selected = $accordion_id == $accordion->ID ? 'selected' : '';
|
49 |
+
?>
|
50 |
+
<option value=<?php echo esc_html($accordion->ID); ?> <?php echo esc_attr($selected); ?>><?php echo esc_html($accordion->post_title); ?></option>
|
51 |
+
<?php
|
52 |
+
}
|
53 |
+
?>
|
54 |
+
|
55 |
+
</select>
|
56 |
</p>
|
57 |
|
58 |
<?php
|
59 |
}
|
60 |
+
|
61 |
+
public function update($new_instance, $old_instance)
|
62 |
+
{
|
63 |
+
|
64 |
$instance = array();
|
65 |
+
$instance['title'] = isset($new_instance['title']) ? strip_tags($new_instance['title']) : '';
|
66 |
+
$instance['accordion_id'] = isset($new_instance['accordion_id']) ? strip_tags($new_instance['accordion_id']) : '';
|
67 |
return $instance;
|
68 |
}
|
69 |
+
}
|
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.58 =
|
143 |
* 2022-09-10 - fix - accordions_ajax undefined issue fixed.
|
144 |
* 2022-09-10 - fix - accordion remove 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.59
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
139 |
|
140 |
== Changelog ==
|
141 |
|
142 |
+
|
143 |
+
= 2.2.59 =
|
144 |
+
* 2022-09-14 - fix - accordions widget raw html issue fixed.
|
145 |
+
|
146 |
= 2.2.58 =
|
147 |
* 2022-09-10 - fix - accordions_ajax undefined issue fixed.
|
148 |
* 2022-09-10 - fix - accordion remove issue fixed.
|