Ultimate FAQ - Version 2.1.6

Version Description

(2022-01-05) = - Fixed an issue causing the YouTube block to not output on the front end in an FAQ post.

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Ultimate FAQ
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.5 to 2.1.6

includes/Ajax.class.php CHANGED
@@ -31,7 +31,7 @@ if ( !class_exists( 'ewdufaqAJAX' ) ) {
31
  global $ewd_ufaq_controller;
32
 
33
  if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) {
34
- ewdUfaqHelper::bad_nonce_ajax();
35
  }
36
 
37
  $faq_atts = array(
@@ -100,7 +100,7 @@ if ( !class_exists( 'ewdufaqAJAX' ) ) {
100
  global $wpdb;
101
 
102
  if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) {
103
- ewdUfaqHelper::bad_nonce_ajax();
104
  }
105
 
106
  $post_id = intval( $_POST['post_id'] );
@@ -120,7 +120,7 @@ if ( !class_exists( 'ewdufaqAJAX' ) ) {
120
  public function update_rating() {
121
 
122
  if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) {
123
- ewdUfaqHelper::bad_nonce_ajax();
124
  }
125
 
126
  $faq_id = is_numeric( $_POST['faq_id'] ) ? intval( $_POST['faq_id'] ) : 0;
@@ -159,7 +159,7 @@ if ( !class_exists( 'ewdufaqAJAX' ) ) {
159
  ||
160
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
161
  ) {
162
- ewdUfaqHelper::admin_nopriv_ajax();
163
  }
164
 
165
  if ( ! is_array( $_POST['ewd-ufaq-item'] ) or ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) { return; }
31
  global $ewd_ufaq_controller;
32
 
33
  if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) {
34
+ ewdufaqHelper::bad_nonce_ajax();
35
  }
36
 
37
  $faq_atts = array(
100
  global $wpdb;
101
 
102
  if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) {
103
+ ewdufaqHelper::bad_nonce_ajax();
104
  }
105
 
106
  $post_id = intval( $_POST['post_id'] );
120
  public function update_rating() {
121
 
122
  if ( !check_ajax_referer( 'ewd-ufaq-js', 'nonce' ) ) {
123
+ ewdufaqHelper::bad_nonce_ajax();
124
  }
125
 
126
  $faq_id = is_numeric( $_POST['faq_id'] ) ? intval( $_POST['faq_id'] ) : 0;
159
  ||
160
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
161
  ) {
162
+ ewdufaqHelper::admin_nopriv_ajax();
163
  }
164
 
165
  if ( ! is_array( $_POST['ewd-ufaq-item'] ) or ! $ewd_ufaq_controller->permissions->check_permission( 'ordering' ) ) { return; }
includes/Helper.class.php CHANGED
@@ -1,13 +1,13 @@
1
  <?php
2
  if ( !defined( 'ABSPATH' ) ) exit;
3
 
4
- if ( !class_exists( 'ewdUfaqHelper' ) ) {
5
  /**
6
- * Class to to provide helpe functions
7
  *
8
  * @since 2.1.1
9
  */
10
- class ewdUfaqHelper {
11
 
12
  // Hold the class instance.
13
  private static $instance = null;
@@ -27,7 +27,7 @@ class ewdUfaqHelper {
27
  {
28
  if (self::$instance == null)
29
  {
30
- self::$instance = new ewdUfaqHelper();
31
  }
32
 
33
  return self::$instance;
1
  <?php
2
  if ( !defined( 'ABSPATH' ) ) exit;
3
 
4
+ if ( !class_exists( 'ewdufaqHelper' ) ) {
5
  /**
6
+ * Class to to provide helper functions
7
  *
8
  * @since 2.1.1
9
  */
10
+ class ewdufaqHelper {
11
 
12
  // Hold the class instance.
13
  private static $instance = null;
27
  {
28
  if (self::$instance == null)
29
  {
30
+ self::$instance = new ewdufaqHelper();
31
  }
32
 
33
  return self::$instance;
includes/InstallationWalkthrough.class.php CHANGED
@@ -79,7 +79,7 @@ class ewdufaqInstallationWalkthrough {
79
  ||
80
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
81
  ) {
82
- ewdUfaqHelper::admin_nopriv_ajax();
83
  }
84
 
85
  $category_name = isset( $_POST['category_name'] ) ? sanitize_text_field( $_POST['category_name'] ) : '';
@@ -100,7 +100,7 @@ class ewdufaqInstallationWalkthrough {
100
  ||
101
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
102
  ) {
103
- ewdUfaqHelper::admin_nopriv_ajax();
104
  }
105
 
106
  $args = array(
@@ -136,7 +136,7 @@ class ewdufaqInstallationWalkthrough {
136
  ||
137
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
138
  ) {
139
- ewdUfaqHelper::admin_nopriv_ajax();
140
  }
141
 
142
  $args = array(
@@ -163,7 +163,7 @@ class ewdufaqInstallationWalkthrough {
163
  ||
164
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
165
  ) {
166
- ewdUfaqHelper::admin_nopriv_ajax();
167
  }
168
 
169
  $ewd_ufaq_options = get_option( 'ewd-ufaq-settings' );
79
  ||
80
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
81
  ) {
82
+ ewdufaqHelper::admin_nopriv_ajax();
83
  }
84
 
85
  $category_name = isset( $_POST['category_name'] ) ? sanitize_text_field( $_POST['category_name'] ) : '';
100
  ||
101
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
102
  ) {
103
+ ewdufaqHelper::admin_nopriv_ajax();
104
  }
105
 
106
  $args = array(
136
  ||
137
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
138
  ) {
139
+ ewdufaqHelper::admin_nopriv_ajax();
140
  }
141
 
142
  $args = array(
163
  ||
164
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
165
  ) {
166
+ ewdufaqHelper::admin_nopriv_ajax();
167
  }
168
 
169
  $ewd_ufaq_options = get_option( 'ewd-ufaq-settings' );
includes/ReviewAsk.class.php CHANGED
@@ -91,7 +91,7 @@ class ewdufaqReviewAsk {
91
  ||
92
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
93
  ) {
94
- ewdUfaqHelper::admin_nopriv_ajax();
95
  }
96
 
97
  $ask_review_time = sanitize_text_field($_POST['ask_review_time']);
@@ -111,7 +111,7 @@ class ewdufaqReviewAsk {
111
  ||
112
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
113
  ) {
114
- ewdUfaqHelper::admin_nopriv_ajax();
115
  }
116
 
117
  $headers = 'Content-type: text/html;charset=utf-8' . "\r\n";
91
  ||
92
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
93
  ) {
94
+ ewdufaqHelper::admin_nopriv_ajax();
95
  }
96
 
97
  $ask_review_time = sanitize_text_field($_POST['ask_review_time']);
111
  ||
112
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
113
  ) {
114
+ ewdufaqHelper::admin_nopriv_ajax();
115
  }
116
 
117
  $headers = 'Content-type: text/html;charset=utf-8' . "\r\n";
includes/WooCommerce.class.php CHANGED
@@ -229,7 +229,7 @@ if ( !class_exists( 'ewdufaqWooCommerce' ) ) {
229
  ||
230
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
231
  ) {
232
- ewdUfaqHelper::admin_nopriv_ajax();
233
  }
234
 
235
  $post_id = intval( $_POST['Post_ID'] );
@@ -265,7 +265,7 @@ if ( !class_exists( 'ewdufaqWooCommerce' ) ) {
265
  ||
266
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
267
  ) {
268
- ewdUfaqHelper::admin_nopriv_ajax();
269
  }
270
 
271
  $post_id = intval( $_POST['Post_ID'] );
@@ -290,7 +290,7 @@ if ( !class_exists( 'ewdufaqWooCommerce' ) ) {
290
  ||
291
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
292
  ) {
293
- ewdUfaqHelper::admin_nopriv_ajax();
294
  }
295
 
296
  $cat_id = intval( $_POST['Cat_ID'] );
229
  ||
230
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
231
  ) {
232
+ ewdufaqHelper::admin_nopriv_ajax();
233
  }
234
 
235
  $post_id = intval( $_POST['Post_ID'] );
265
  ||
266
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
267
  ) {
268
+ ewdufaqHelper::admin_nopriv_ajax();
269
  }
270
 
271
  $post_id = intval( $_POST['Post_ID'] );
290
  ||
291
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
292
  ) {
293
+ ewdufaqHelper::admin_nopriv_ajax();
294
  }
295
 
296
  $cat_id = intval( $_POST['Cat_ID'] );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: Rustaurius, EtoileWebDesign
3
  Tags: faq, faqs, accordion, woocommerce faq, gutenberg faq, faq block
4
  Requires at least: 5.0
5
  Tested up to: 5.8
6
- Stable tag: 2.1.5
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -267,6 +267,9 @@ Video 3 - FAQs Ordering
267
 
268
  == Changelog ==
269
 
 
 
 
270
  = 2.1.5 (2022-01-04) =
271
  - Updated class naming issues.
272
  - Fixed a few styling issues with the walk-through.
3
  Tags: faq, faqs, accordion, woocommerce faq, gutenberg faq, faq block
4
  Requires at least: 5.0
5
  Tested up to: 5.8
6
+ Stable tag: 2.1.6
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
267
 
268
  == Changelog ==
269
 
270
+ = 2.1.6 (2022-01-05) =
271
+ - Fixed an issue causing the YouTube block to not output on the front end in an FAQ post.
272
+
273
  = 2.1.5 (2022-01-04) =
274
  - Updated class naming issues.
275
  - Fixed a few styling issues with the walk-through.
ultimate-faqs.php CHANGED
@@ -6,7 +6,7 @@ Description: FAQ and accordion plugin with easy to use Gutenberg blocks, shortco
6
  Author URI: https://www.etoilewebdesign.com/
7
  Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/
8
  Text Domain: ultimate-faqs
9
- Version: 2.1.5
10
  WC requires at least: 3.0
11
  WC tested up to: 6.0
12
  */
@@ -43,7 +43,7 @@ class ewdufaqInit {
43
  define( 'EWD_UFAQ_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
44
  define( 'EWD_UFAQ_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
45
  define( 'EWD_UFAQ_TEMPLATE_DIR', 'ewd-ufaq-templates' );
46
- define( 'EWD_UFAQ_VERSION', '2.1.5' );
47
 
48
  define( 'EWD_UFAQ_FAQ_POST_TYPE', 'ufaq' );
49
  define( 'EWD_UFAQ_FAQ_CATEGORY_TAXONOMY', 'ufaq-category' );
@@ -65,6 +65,7 @@ class ewdufaqInit {
65
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Dashboard.class.php' );
66
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/DeactivationSurvey.class.php' );
67
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/FAQ.class.php' );
 
68
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/InstallationWalkthrough.class.php' );
69
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Notifications.class.php' );
70
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/OrderingTable.class.php' );
@@ -538,7 +539,7 @@ class ewdufaqInit {
538
  ||
539
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
540
  ) {
541
- ewdUfaqHelper::admin_nopriv_ajax();
542
 
543
  }
544
 
6
  Author URI: https://www.etoilewebdesign.com/
7
  Terms and Conditions: https://www.etoilewebdesign.com/plugin-terms-and-conditions/
8
  Text Domain: ultimate-faqs
9
+ Version: 2.1.6
10
  WC requires at least: 3.0
11
  WC tested up to: 6.0
12
  */
43
  define( 'EWD_UFAQ_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
44
  define( 'EWD_UFAQ_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
45
  define( 'EWD_UFAQ_TEMPLATE_DIR', 'ewd-ufaq-templates' );
46
+ define( 'EWD_UFAQ_VERSION', '2.1.6' );
47
 
48
  define( 'EWD_UFAQ_FAQ_POST_TYPE', 'ufaq' );
49
  define( 'EWD_UFAQ_FAQ_CATEGORY_TAXONOMY', 'ufaq-category' );
65
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Dashboard.class.php' );
66
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/DeactivationSurvey.class.php' );
67
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/FAQ.class.php' );
68
+ require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Helper.class.php' );
69
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/InstallationWalkthrough.class.php' );
70
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/Notifications.class.php' );
71
  require_once( EWD_UFAQ_PLUGIN_DIR . '/includes/OrderingTable.class.php' );
539
  ||
540
  ! current_user_can( $ewd_ufaq_controller->settings->get_setting( 'access-role' ) )
541
  ) {
542
+ ewdufaqHelper::admin_nopriv_ajax();
543
 
544
  }
545
 
views/View.FAQ.class.php CHANGED
@@ -180,10 +180,14 @@ class ewdufaqViewFAQ extends ewdufaqView {
180
  public function print_faq_answer() {
181
 
182
  $template = $this->find_template( 'faq-answer' );
 
 
183
 
184
  if ( $template ) {
185
  include( $template );
186
  }
 
 
187
  }
188
 
189
  /**
@@ -641,6 +645,23 @@ class ewdufaqViewFAQ extends ewdufaqView {
641
  return 'mailto:?subject=' . urlencode( $subject ) . "&amp;body=" . urlencode( $this->post->post_title ) . urlencode( ' | ' ) . urlencode( $this->permalink );
642
  }
643
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
644
  /**
645
  * Get the initial submit faq css classes
646
  * @since 2.0.0
180
  public function print_faq_answer() {
181
 
182
  $template = $this->find_template( 'faq-answer' );
183
+
184
+ add_filter( 'wp_kses_allowed_html', array( $this, 'get_allowed_faq_content_tags' ) );
185
 
186
  if ( $template ) {
187
  include( $template );
188
  }
189
+
190
+ remove_filter( 'wp_kses_allowed_html', array( $this, 'get_allowed_faq_content_tags' ) );
191
  }
192
 
193
  /**
645
  return 'mailto:?subject=' . urlencode( $subject ) . "&amp;body=" . urlencode( $this->post->post_title ) . urlencode( ' | ' ) . urlencode( $this->permalink );
646
  }
647
 
648
+ /**
649
+ * Get the initial submit faq css classes
650
+ * @since 2.1.6
651
+ */
652
+ public function get_allowed_faq_content_tags( $tags ) {
653
+
654
+ $tags['iframe'] = array(
655
+ 'src' => true,
656
+ 'height' => true,
657
+ 'width' => true,
658
+ 'frameborder' => true,
659
+ 'allowfullscreen' => true,
660
+ );
661
+
662
+ return $tags;
663
+ }
664
+
665
  /**
666
  * Get the initial submit faq css classes
667
  * @since 2.0.0