Ultimate FAQ - Version 1.2.5

Version Description

  • Fixed a broken link
  • Added extra information about the premium version
Download this release

Release Info

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

Code changes from version 1.2.4 to 1.2.5

Functions/EWD_UFAQ_Import.php CHANGED
@@ -6,12 +6,14 @@ function EWD_UFAQ_Import(){
6
 
7
  $Posts_Table_Name = $wpdb->prefix . "posts";
8
  $Sql = "SELECT ID FROM $Posts_Table_Name WHERE post_type='qa_faqs'";
 
9
  $Results = $wpdb->get_results($Sql);
10
  if (is_array($Results)){
11
 
12
  foreach($Results as $Result){
13
 
14
  $data_array = array('post_type' => 'ufaq');
 
15
  $where = array('ID' => $Result->ID);
16
  $wpdb->update($Posts_Table_Name, $data_array, $where);
17
  }
@@ -20,6 +22,8 @@ function EWD_UFAQ_Import(){
20
  $Terms_Table_Name = $wpdb->prefix . "term_taxonomy";
21
  $data_array = array('taxonomy' => 'ufaq-category');
22
  $where = array('taxonomy' => 'faq_category');
 
 
23
  $wpdb->update($Terms_Table_Name, $data_array, $where);
24
  echo $wpdb->last_query;
25
  }
6
 
7
  $Posts_Table_Name = $wpdb->prefix . "posts";
8
  $Sql = "SELECT ID FROM $Posts_Table_Name WHERE post_type='qa_faqs'";
9
+ //$Sql = "SELECT ID FROM $Posts_Table_Name WHERE post_type='ufaq'";
10
  $Results = $wpdb->get_results($Sql);
11
  if (is_array($Results)){
12
 
13
  foreach($Results as $Result){
14
 
15
  $data_array = array('post_type' => 'ufaq');
16
+ //$data_array = array('post_type' => 'qa_faqs');
17
  $where = array('ID' => $Result->ID);
18
  $wpdb->update($Posts_Table_Name, $data_array, $where);
19
  }
22
  $Terms_Table_Name = $wpdb->prefix . "term_taxonomy";
23
  $data_array = array('taxonomy' => 'ufaq-category');
24
  $where = array('taxonomy' => 'faq_category');
25
+ //$data_array = array('taxonomy' => 'faq_category');
26
+ //$where = array('taxonomy' => 'ufaq-category');
27
  $wpdb->update($Terms_Table_Name, $data_array, $where);
28
  echo $wpdb->last_query;
29
  }
Functions/EWD_UFAQ_Upgrade_Box.php CHANGED
@@ -6,7 +6,14 @@ function EWD_UFAQ_Upgrade_Box() {
6
  <div id="upcp_pro" class="postbox " >
7
  <div class="handlediv" title="Click to toggle"></div><h3 class='hndle'><span><?php _e("Full Version", 'EWD_UFAQ') ?></span></h3>
8
  <div class="inside">
9
- <ul><li><a href="http://www.etoilewebdesign.com/ultimate-faq/"><?php _e("Upgrade to the full version ", "EWD_UFAQ"); ?></a><?php _e("to take advantage of all the available features of the Ultimate FAQs for Wordpress!", 'EWD_UFAQ'); ?></li></ul>
 
 
 
 
 
 
 
10
  <div class="full-version-form-div">
11
  <form action="edit.php?post_type=ufaq" method="post">
12
  <div class="form-field form-required">
6
  <div id="upcp_pro" class="postbox " >
7
  <div class="handlediv" title="Click to toggle"></div><h3 class='hndle'><span><?php _e("Full Version", 'EWD_UFAQ') ?></span></h3>
8
  <div class="inside">
9
+ <ul><li><a href="http://www.etoilewebdesign.com/plugins/ultimate-faq/"><?php _e("Upgrade to the full version ", "EWD_UFAQ"); ?></a><?php _e("to take advantage of all the available features of the Ultimate FAQs for Wordpress!", 'EWD_UFAQ'); ?></li></ul>
10
+ <h3 class='hndle'><span><?php _e("What you get by upgrading:", 'EWD_URP') ?></span></h3>
11
+ <ul>
12
+ <li>Ability to add a unique FAQ tab to each WooCommerce product page.</li>
13
+ <li>Premium shortcodes to accept questions from users and insert an AJAX FAQ search.</li>
14
+ <li>Additional FAQ style skins, dozens of styling and labeling options and much more!</li>
15
+ <li>Access to e-mail support.</li>
16
+ </ul>
17
  <div class="full-version-form-div">
18
  <form action="edit.php?post_type=ufaq" method="post">
19
  <div class="form-field form-required">
Functions/EWD_UFAQ_Version_Update.php CHANGED
@@ -24,6 +24,7 @@ function EWD_UFAQ_Version_Update() {
24
  if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
25
  if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
26
  if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
 
27
 
28
  update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
29
  }
@@ -42,8 +43,8 @@ function EWD_UFAQ_Version_Update_Box() {
42
  <div class="handlediv" title="Click to toggle"></div>
43
  <h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
44
  <div class="inside">
45
- <?php if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate Product Catalogue Plugin.", "EWD_UFAQ"); ?><br> <a href='https://www.youtube.com/channel/UCZPuaoetCJB1vZOmpnMxJNw'><?php _e("Subscribe to our YouTube channel ", "EWD_UFAQ"); ?></a> <?php _e("for tutorial videos on this and our other plugins!", "EWD_UFAQ");?> </li></ul>
46
- <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.2.4!", "EWD_UFAQ"); ?><br> <a href='https://wordpress.org/support/view/plugin-reviews/ultimate-faqs?filter=5'><?php _e("Please rate our plugin", "EWD_UFAQ"); ?></a> <?php _e("if you find Ultimate FAQs useful!", "EWD_UFAQ");?> </li></ul><?php } ?>
47
 
48
  <?php /* if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate Product Catalogue Plugin.", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul>
49
  <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 2.2.9!", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul><?php } */ ?>
24
  if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
25
  if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
26
  if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
27
+ if (get_option("EWD_UFAQ_Slug_Base") == "") {update_option("EWD_UFAQ_Slug_Base", "ufaqs");}
28
 
29
  update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
30
  }
43
  <div class="handlediv" title="Click to toggle"></div>
44
  <h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
45
  <div class="inside">
46
+ <?php if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate FAQs plugin.", "EWD_UFAQ"); ?><br> <a href='https://www.youtube.com/channel/UCZPuaoetCJB1vZOmpnMxJNw'><?php _e("Subscribe to our YouTube channel ", "EWD_UFAQ"); ?></a> <?php _e("for tutorial videos on this and our other plugins!", "EWD_UFAQ");?> </li></ul>
47
+ <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.2.5!", "EWD_UFAQ"); ?><br> <a href='https://wordpress.org/support/view/plugin-reviews/ultimate-faqs?filter=5'><?php _e("Please rate our plugin", "EWD_UFAQ"); ?></a> <?php _e("if you find Ultimate FAQs useful!", "EWD_UFAQ");?> </li></ul><?php } ?>
48
 
49
  <?php /* if (get_option("EWD_UFAQ_Install_Flag") == "Yes") { ?><ul><li><?php _e("Thanks for installing the Ultimate Product Catalogue Plugin.", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul>
50
  <?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 2.2.9!", "EWD_UFAQ"); ?><br> <a href='http://www.facebook.com/EtoileWebDesign'><?php _e("Follow us on Facebook", "EWD_UFAQ"); ?></a> <?php _e("to suggest new features or hear about upcoming ones!", "EWD_UFAQ");?> </li></ul><?php } */ ?>
Functions/Register_EWD_UFAQ_Posts_Taxonomies.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  add_action( 'init', 'EWD_UFAQ_Create_Posttype' );
3
  function EWD_UFAQ_Create_Posttype() {
 
 
4
  $labels = array(
5
  'name' => __('FAQs', 'EWD_UFAQ'),
6
  'singular_name' => __('FAQ', 'EWD_UFAQ'),
@@ -24,7 +26,7 @@ function EWD_UFAQ_Create_Posttype() {
24
  'query_var' => true,
25
  'has_archive' => true,
26
  'menu_icon' => null,
27
- 'rewrite' => array('slug' => 'ufaqs'),
28
  'capability_type' => 'post',
29
  'menu_position' => null,
30
  'menu_icon' => 'dashicons-format-status',
1
  <?php
2
  add_action( 'init', 'EWD_UFAQ_Create_Posttype' );
3
  function EWD_UFAQ_Create_Posttype() {
4
+ $Slug_Base = get_option("EWD_UFAQ_Slug_Base");
5
+
6
  $labels = array(
7
  'name' => __('FAQs', 'EWD_UFAQ'),
8
  'singular_name' => __('FAQ', 'EWD_UFAQ'),
26
  'query_var' => true,
27
  'has_archive' => true,
28
  'menu_icon' => null,
29
+ 'rewrite' => array('slug' => $Slug_Base),
30
  'capability_type' => 'post',
31
  'menu_position' => null,
32
  'menu_icon' => 'dashicons-format-status',
Functions/Update_Admin_Databases.php CHANGED
@@ -47,11 +47,12 @@ function EWD_UFAQ_UpdateOptions() {
47
 
48
  if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
49
  if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
50
- if (isset($_POST['woocommerce_faqs']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_WooCommerce_FAQs', $_POST['woocommerce_faqs']);}
51
  if (isset($_POST['reveal_effect']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Reveal_Effect', $_POST['reveal_effect']);}
52
  if (isset($_POST['pretty_permalinks']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Pretty_Permalinks', $_POST['pretty_permalinks']);}
53
  if (isset($_POST['allow_proposed_answer']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Allow_Proposed_Answer', $_POST['allow_proposed_answer']);}
54
  if (isset($_POST['faq_auto_complete_titles']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Auto_Complete_Titles', $_POST['faq_auto_complete_titles']);}
 
55
  if (isset($_POST['Socialmedia']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Social_Media', $Social_Media);}
56
 
57
  if (isset($_POST['group_by_category'])) {update_option('EWD_UFAQ_Group_By_Category', $_POST['group_by_category']);}
47
 
48
  if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
49
  if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
50
+ if (isset($_POST['woocommerce_faqs']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_WooCommerce_FAQs', $_POST['woocommerce_faqs']);}
51
  if (isset($_POST['reveal_effect']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Reveal_Effect', $_POST['reveal_effect']);}
52
  if (isset($_POST['pretty_permalinks']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Pretty_Permalinks', $_POST['pretty_permalinks']);}
53
  if (isset($_POST['allow_proposed_answer']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Allow_Proposed_Answer', $_POST['allow_proposed_answer']);}
54
  if (isset($_POST['faq_auto_complete_titles']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Auto_Complete_Titles', $_POST['faq_auto_complete_titles']);}
55
+ if (isset($_POST['slug_base']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Slug_Base', $_POST['slug_base']);}
56
  if (isset($_POST['Socialmedia']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Social_Media', $Social_Media);}
57
 
58
  if (isset($_POST['group_by_category'])) {update_option('EWD_UFAQ_Group_By_Category', $_POST['group_by_category']);}
Main.php CHANGED
@@ -7,14 +7,14 @@ Author: Etoile Web Design
7
  Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: EWD_UFAQ
10
- Version: 1.2.4
11
  */
12
 
13
  global $ewd_ufaq_message;
14
  global $UFAQ_Full_Version;
15
  global $EWD_UFAQ_Version;
16
 
17
- $EWD_UFAQ_Version = '1.2.0';
18
 
19
  define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
20
  define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
@@ -134,6 +134,7 @@ function Set_EWD_UFAQ_Options() {
134
  if (get_option("EWD_UFAQ_Pretty_Permalinks") == "") {update_option("EWD_UFAQ_Pretty_Permalinks", "No");}
135
  if (get_option("EWD_UFAQ_Allow_Proposed_Answer") == "") {update_option("EWD_UFAQ_Allow_Proposed_Answer", "No");}
136
  if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
 
137
 
138
  if (get_option("EWD_UFAQ_Group_By_Category") == "") {update_option("EWD_UFAQ_Group_By_Category", "No");}
139
  if (get_option("EWD_UFAQ_Group_By_Order_By") == "") {update_option("EWD_UFAQ_Group_By_Order_By", "name");}
7
  Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
8
  Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
9
  Text Domain: EWD_UFAQ
10
+ Version: 1.2.5
11
  */
12
 
13
  global $ewd_ufaq_message;
14
  global $UFAQ_Full_Version;
15
  global $EWD_UFAQ_Version;
16
 
17
+ $EWD_UFAQ_Version = '1.2.5';
18
 
19
  define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
20
  define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
134
  if (get_option("EWD_UFAQ_Pretty_Permalinks") == "") {update_option("EWD_UFAQ_Pretty_Permalinks", "No");}
135
  if (get_option("EWD_UFAQ_Allow_Proposed_Answer") == "") {update_option("EWD_UFAQ_Allow_Proposed_Answer", "No");}
136
  if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
137
+ if (get_option("EWD_UFAQ_Slug_Base") == "") {update_option("EWD_UFAQ_Slug_Base", "ufaqs");}
138
 
139
  if (get_option("EWD_UFAQ_Group_By_Category") == "") {update_option("EWD_UFAQ_Group_By_Category", "No");}
140
  if (get_option("EWD_UFAQ_Group_By_Order_By") == "") {update_option("EWD_UFAQ_Group_By_Order_By", "name");}
html/OptionsPage.php CHANGED
@@ -20,6 +20,7 @@
20
  $Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
21
  $Allow_Proposed_Answer = get_option("EWD_UFAQ_Allow_Proposed_Answer");
22
  $FAQ_Auto_Complete_Titles = get_option("EWD_UFAQ_Auto_Complete_Titles");
 
23
  $Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
24
  $Socialmedia = explode(",", $Socialmedia_String);
25
 
@@ -329,6 +330,15 @@
329
  </td>
330
  </tr>
331
  <tr>
 
 
 
 
 
 
 
 
 
332
  <th scope="row">Social Media Option</th>
333
  <td>
334
  <fieldset><legend class="screen-reader-text"><span>Social Media Option</span></legend>
20
  $Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
21
  $Allow_Proposed_Answer = get_option("EWD_UFAQ_Allow_Proposed_Answer");
22
  $FAQ_Auto_Complete_Titles = get_option("EWD_UFAQ_Auto_Complete_Titles");
23
+ $Slug_Base = get_option("EWD_UFAQ_Slug_Base");
24
  $Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
25
  $Socialmedia = explode(",", $Socialmedia_String);
26
 
330
  </td>
331
  </tr>
332
  <tr>
333
+ <th scope="row">FAQ Slug Base</th>
334
+ <td>
335
+ <fieldset><legend class="screen-reader-text"><span>FAQ Slug Base</span></legend>
336
+ <input type='text' name='slug_base' value='<?php echo $Slug_Base; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> size='60'/>
337
+ <p>This option can be used to change the slug base for all FAQ posts. Be sure to go to "Settings" -> "Permalinks" in the WordPress sidebar and hit "Save Changes" to avoid 404 errors.</p>
338
+ </fieldset>
339
+ </td>
340
+ </tr>
341
+ <tr>
342
  <th scope="row">Social Media Option</th>
343
  <td>
344
  <fieldset><legend class="screen-reader-text"><span>Social Media Option</span></legend>
readme.txt CHANGED
@@ -22,7 +22,6 @@ Using WooCommerce to sell your products? Easily add an "FAQ" tab to each product
22
 
23
  Great for combining with our <a href='https://wordpress.org/plugins/front-end-only-users/'>user management plugin </a> to create a member's only FAQ area.
24
 
25
-
26
  = Key Features =
27
 
28
  * Create FAQ categories
@@ -34,6 +33,7 @@ Great for combining with our <a href='https://wordpress.org/plugins/front-end-on
34
  * Toggle accordion (close open FAQ when a new one is opened) behaviour on/off
35
  * Share on social media
36
 
 
37
  = Premium features include =
38
  * WooCommerce FAQ tab on product page
39
  * Different display styles
@@ -142,6 +142,10 @@ Video 3 - FAQs Ordering
142
  9. All answers displayed in the 'list' FAQ mode
143
 
144
  == Changelog ==
 
 
 
 
145
  = 1.2.4 =
146
  - Fixed an error where FAQs on the same page as the search shortcode couldn't be clicked at times
147
 
22
 
23
  Great for combining with our <a href='https://wordpress.org/plugins/front-end-only-users/'>user management plugin </a> to create a member's only FAQ area.
24
 
 
25
  = Key Features =
26
 
27
  * Create FAQ categories
33
  * Toggle accordion (close open FAQ when a new one is opened) behaviour on/off
34
  * Share on social media
35
 
36
+
37
  = Premium features include =
38
  * WooCommerce FAQ tab on product page
39
  * Different display styles
142
  9. All answers displayed in the 'list' FAQ mode
143
 
144
  == Changelog ==
145
+ = 1.2.5 =
146
+ - Fixed a broken link
147
+ - Added extra information about the premium version
148
+
149
  = 1.2.4 =
150
  - Fixed an error where FAQs on the same page as the search shortcode couldn't be clicked at times
151