Ultimate FAQ - Version 2.0.10

Version Description

(2021-04-19) = - Corrected console JS error on admin Dashboard page. - Updated admin enqueuing conditions.

Download this release

Release Info

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

Code changes from version 2.0.9 to 2.0.10

includes/Dashboard.class.php CHANGED
@@ -62,8 +62,16 @@ class ewdufaqDashboard {
62
 
63
  $currentScreen = get_current_screen();
64
  if ( $currentScreen->id == $admin_page_hooks['edit.php?post_type=ufaq'] . '_page_ewd-ufaq-dashboard' ) {
 
65
  wp_enqueue_style( 'ewd-ufaq-admin-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), EWD_UFAQ_VERSION );
66
- wp_enqueue_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery' ), EWD_UFAQ_VERSION, true );
 
 
 
 
 
 
 
67
  }
68
  }
69
 
62
 
63
  $currentScreen = get_current_screen();
64
  if ( $currentScreen->id == $admin_page_hooks['edit.php?post_type=ufaq'] . '_page_ewd-ufaq-dashboard' ) {
65
+
66
  wp_enqueue_style( 'ewd-ufaq-admin-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), EWD_UFAQ_VERSION );
67
+
68
+ wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery', 'jquery-ui-sortable' ), EWD_UFAQ_VERSION, true );
69
+
70
+ $args = array();
71
+
72
+ wp_localize_script( 'ewd-ufaq-admin-js', 'ewd_ufaq_php_data', $args );
73
+
74
+ wp_enqueue_script( 'ewd-ufaq-admin-js' );
75
  }
76
  }
77
 
includes/Export.class.php CHANGED
@@ -233,10 +233,17 @@ class ewdufaqExport {
233
 
234
  $screen = get_current_screen();
235
 
236
- if ( $screen->id == 'urp_review_page_fdm-export' ) {
237
 
238
- wp_enqueue_style( 'ewd-ufaq-admin', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), EWD_UFAQ_VERSION );
239
- wp_enqueue_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery' ), EWD_UFAQ_VERSION, true );
 
 
 
 
 
 
 
240
  }
241
  }
242
 
233
 
234
  $screen = get_current_screen();
235
 
236
+ if ( $screen->id == 'ufaq_page_ewd-ufaq-export' ) {
237
 
238
+ wp_enqueue_style( 'ewd-ufaq-admin-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), EWD_UFAQ_VERSION );
239
+
240
+ wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery', 'jquery-ui-sortable' ), EWD_UFAQ_VERSION, true );
241
+
242
+ $args = array();
243
+
244
+ wp_localize_script( 'ewd-ufaq-admin-js', 'ewd_ufaq_php_data', $args );
245
+
246
+ wp_enqueue_script( 'ewd-ufaq-admin-js' );
247
  }
248
  }
249
 
includes/Import.class.php CHANGED
@@ -277,10 +277,17 @@ class ewdufaqImport {
277
 
278
  $screen = get_current_screen();
279
 
280
- if ( $screen->id == 'fdm-menu_page_fdm-import' ) {
281
 
282
- wp_enqueue_style( 'fdm-admin', EWD_UFAQ_PLUGIN_URL . '/assets/css/admin.css', array(), '2.0.0' );
283
- wp_enqueue_script( 'fdm-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/admin.js', array( 'jquery' ), '2.0.0', true );
 
 
 
 
 
 
 
284
  }
285
  }
286
 
277
 
278
  $screen = get_current_screen();
279
 
280
+ if ( $screen->id == 'ufaq_page_ewd-ufaq-import' ) {
281
 
282
+ wp_enqueue_style( 'ewd-ufaq-admin-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), '2.0.0' );
283
+
284
+ wp_register_script( 'ewd-ufaq-admin-js', EWD_UFAQ_PLUGIN_URL . '/assets/js/ewd-ufaq-admin.js', array( 'jquery', 'jquery-ui-sortable' ), EWD_UFAQ_VERSION, true );
285
+
286
+ $args = array();
287
+
288
+ wp_localize_script( 'ewd-ufaq-admin-js', 'ewd_ufaq_php_data', $args );
289
+
290
+ wp_enqueue_script( 'ewd-ufaq-admin-js' );
291
  }
292
  }
293
 
readme.txt CHANGED
@@ -264,6 +264,10 @@ Video 3 - FAQs Ordering
264
 
265
  == Changelog ==
266
 
 
 
 
 
267
  = 2.0.9 (2021-04-15) =
268
  - Fix for fatal error happening on plugin update.
269
  - <strong>If you are updating from a pre-2.0.0 version of the plugin, you may have to manually re-activate the plugin after running the update.</strong>
264
 
265
  == Changelog ==
266
 
267
+ = 2.0.10 (2021-04-19) =
268
+ - Corrected console JS error on admin Dashboard page.
269
+ - Updated admin enqueuing conditions.
270
+
271
  = 2.0.9 (2021-04-15) =
272
  - Fix for fatal error happening on plugin update.
273
  - <strong>If you are updating from a pre-2.0.0 version of the plugin, you may have to manually re-activate the plugin after running the update.</strong>
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.9
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) )
@@ -253,7 +253,7 @@ class ewdufaqInit {
253
  $screen = get_current_screen();
254
 
255
  // Return if not ufaq post_type, we're not on a post-type page, or we're not on the settings or widget pages
256
- if ( ( $post_type != EWD_UFAQ_FAQ_POST_TYPE or ( $hook != 'edit.php' and $hook != 'post-new.php' and $hook != 'post.php' ) ) and $hook != 'ufaq_page_ewd-ufaq-settings' and $hook != 'ufaq_page_ewd-ufaq-import' and $hook != 'ufaq_page_ewd-ufaq-ordering-table' and $hook != 'ufaq_page_ewd-ufaq-export' and $hook != 'widgets.php' and $screen->id != 'edit-ufaq-category' and $screen->id != 'edit-ufaq-tag' ) { return; }
257
 
258
  wp_enqueue_style( 'ewd-ufaq-admin-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), EWD_UFAQ_VERSION );
259
 
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.10
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) )
253
  $screen = get_current_screen();
254
 
255
  // Return if not ufaq post_type, we're not on a post-type page, or we're not on the settings or widget pages
256
+ if ( ( $post_type != EWD_UFAQ_FAQ_POST_TYPE or ( $hook != 'edit.php' and $hook != 'post-new.php' and $hook != 'post.php' ) ) and $hook != 'ufaq_page_ewd-ufaq-settings' and $hook != 'ufaq_page_ewd-ufaq-ordering-table' and $hook != 'widgets.php' and $screen->id != 'edit-ufaq-category' and $screen->id != 'edit-ufaq-tag' ) { return; }
257
 
258
  wp_enqueue_style( 'ewd-ufaq-admin-css', EWD_UFAQ_PLUGIN_URL . '/assets/css/ewd-ufaq-admin.css', array(), EWD_UFAQ_VERSION );
259