Ultimate FAQ - Version 2.0.7

Version Description

(2021-04-14) = - Fixed the duplicate entry on the Plugins screen - Fixed an issue with the FAQ Elements Order setting/table that was causing a warning and for it to sometimes not display the correct order

Download this release

Release Info

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

Code changes from version 2.0.6 to 2.0.7

Main.php CHANGED
@@ -1,14 +1,4 @@
1
  <?php
2
- /*
3
- Plugin Name: Ultimate FAQs
4
- Plugin URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
5
- Description: Easily create and add FAQs to your WordPress site with a Gutenberg block, shortcode or widget. Includes FAQ schema, search, accordion toggle and more.
6
- Author: Etoile Web Design
7
- Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
8
- Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
- Text Domain: ultimate-faqs
10
- Version: 2.0.6
11
- */
12
 
13
  //Main file has been re-named, so activate that instead and then exit
14
 
1
  <?php
 
 
 
 
 
 
 
 
 
 
2
 
3
  //Main file has been re-named, so activate that instead and then exit
4
 
includes/Settings.class.php CHANGED
@@ -865,7 +865,7 @@ class ewdufaqSettings {
865
  'id' => 'faq-elements-order',
866
  'title' => __( 'FAQ Elements Order', 'ultimate-faqs' ),
867
  'description' => __( 'You can use this table to drag-and-drop the elements of an FAQ into a different order.', 'ultimate-faqs' ),
868
- 'items' => json_decode( $this->get_setting( 'faq-elements-order' ), true )
869
  )
870
  );
871
 
865
  'id' => 'faq-elements-order',
866
  'title' => __( 'FAQ Elements Order', 'ultimate-faqs' ),
867
  'description' => __( 'You can use this table to drag-and-drop the elements of an FAQ into a different order.', 'ultimate-faqs' ),
868
+ 'items' => $this->get_setting( 'faq-elements-order' )
869
  )
870
  );
871
 
lib/simple-admin-pages/classes/AdminPageSetting.Ordering.class.php CHANGED
@@ -55,13 +55,13 @@ class sapAdminPageSettingOrdering_2_5_0 extends sapAdminPageSetting_2_5_0 {
55
  public function display_setting() {
56
 
57
  $input_name = $this->get_input_name();
58
- $values = json_decode( html_entity_decode( $this->value ), true );
59
 
60
  if ( ! is_array( $values ) )
61
  $values = array();
62
 
63
- if ( empty( $values ) )
64
- $values = array_merge( $values, $this->items );
65
 
66
  ?>
67
 
55
  public function display_setting() {
56
 
57
  $input_name = $this->get_input_name();
58
+ $values = is_array( $this->value ) ? $this->value : json_decode( html_entity_decode( $this->value ), true );
59
 
60
  if ( ! is_array( $values ) )
61
  $values = array();
62
 
63
+ if ( empty( $values ) and is_string( $this->items ) )
64
+ $values = array_merge( $values, json_decode( $this->items, true ) );
65
 
66
  ?>
67
 
readme.txt CHANGED
@@ -264,6 +264,10 @@ Video 3 - FAQs Ordering
264
 
265
  == Changelog ==
266
 
 
 
 
 
267
  = 2.0.6 (2021-04-14) =
268
  - Fix for the plugin deactivating when updating from pre-2.0.0
269
 
264
 
265
  == Changelog ==
266
 
267
+ = 2.0.7 (2021-04-14) =
268
+ - Fixed the duplicate entry on the Plugins screen
269
+ - Fixed an issue with the FAQ Elements Order setting/table that was causing a warning and for it to sometimes not display the correct order
270
+
271
  = 2.0.6 (2021-04-14) =
272
  - Fix for the plugin deactivating when updating from pre-2.0.0
273
 
ultimate-faqs.php CHANGED
@@ -7,7 +7,7 @@ Author: Etoile Web Design
7
  Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: ultimate-faqs
10
- Version: 2.0.6
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) )
7
  Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: ultimate-faqs
10
+ Version: 2.0.7
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) )
views/View.FAQ.class.php CHANGED
@@ -432,7 +432,7 @@ class ewdufaqViewFAQ extends ewdufaqView {
432
  public function get_order_elements() {
433
  global $ewd_ufaq_controller;
434
 
435
- return json_decode( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) );
436
  }
437
 
438
  /**
432
  public function get_order_elements() {
433
  global $ewd_ufaq_controller;
434
 
435
+ return is_array( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) ) ? $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) : json_decode( $ewd_ufaq_controller->settings->get_setting( 'faq-elements-order' ) );
436
  }
437
 
438
  /**