Version Description
- Added a "Category Toggle" options for users who group their FAQs by category
- Cleaned up some of the code dealing with options
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 1.1.9 |
Comparing to | |
See all releases |
Code changes from version 1.1.8 to 1.1.9
- Functions/EWD_UFAQ_Version_Update.php +50 -0
- Functions/Update_Admin_Databases.php +21 -36
- Main.php +31 -18
- Shortcodes/DisplayFAQs.php +20 -14
- css/ewd-ufaq-styles.css +8 -0
- html/OptionsPage.php +39 -28
- js/ewd-ufaq-js.js +11 -0
- readme.txt +4 -0
Functions/EWD_UFAQ_Version_Update.php
CHANGED
@@ -27,4 +27,54 @@ function EWD_UFAQ_Version_Update() {
|
|
27 |
update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
|
28 |
}
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
?>
|
27 |
update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
|
28 |
}
|
29 |
|
30 |
+
add_filter('upgrader_pre_install', 'EWD_UFAQ_SetUpdateOption');
|
31 |
+
function EWD_UFAQ_SetUpdateOption() {
|
32 |
+
update_option('EWD_UFAQ_Update_Flag', "Yes");
|
33 |
+
}
|
34 |
+
|
35 |
+
if (isset($_GET['post_type']) and $_GET['post_type'] == 'ufaq' and get_option('EWD_UFAQ_Update_Flag') != "Yes") {add_action("admin_notices", "EWD_UFAQ_Version_Update_Box");}
|
36 |
+
|
37 |
+
function EWD_UFAQ_Version_Update_Box() {
|
38 |
+
?>
|
39 |
+
<div id="side-sortables" class="metabox-holder ">
|
40 |
+
<div id="EWD_UFAQ_pro" class="postbox " >
|
41 |
+
<div class="handlediv" title="Click to toggle"></div>
|
42 |
+
<h3 class='hndle'><span><?php _e("Thank You!", 'EWD_UFAQ') ?></span></h3>
|
43 |
+
<div class="inside">
|
44 |
+
<?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>
|
45 |
+
<?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 1.1.9!", "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 } ?>
|
46 |
+
|
47 |
+
<?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>
|
48 |
+
<?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 } */ ?>
|
49 |
+
|
50 |
+
<?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>
|
51 |
+
<?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 3.0.16!", "EWD_UFAQ"); ?><br> <a href='http://wordpress.org/support/view/plugin-reviews/ultimate-product-catalogue'><?php _e("Please rate our plugin", "EWD_UFAQ"); ?></a> <?php _e("if you find the Ultimate Product Catalogue Plugin useful!", "EWD_UFAQ");?> </li></ul><?php } */ ?>
|
52 |
+
|
53 |
+
<?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>
|
54 |
+
<?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 3.4.8!", "EWD_UFAQ"); ?><br> <a href='http://wordpress.org/plugins/order-tracking/'><?php _e("Try out order tracking plugin ", "EWD_UFAQ"); ?></a> <?php _e("if you ship orders and find the Ultimate Product Catalogue Plugin useful!", "EWD_UFAQ");?> </li></ul><?php } */ ?>
|
55 |
+
|
56 |
+
<?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>
|
57 |
+
<?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 2.3.9!", "EWD_UFAQ"); ?><br> <a href='http://wordpress.org/support/topic/error-hunt'><?php _e("Please let us know about any small display/functionality errors. ", "EWD_UFAQ"); ?></a> <?php _e("We've noticed a couple, and would like to eliminate as many as possible.", "EWD_UFAQ");?> </li></ul><?php } */ ?>
|
58 |
+
|
59 |
+
<?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("Check out our YouTube channel ", "EWD_UFAQ"); ?></a> <?php _e("for tutorial videos on this and our other plugins!", "EWD_UFAQ");?> </li></ul>
|
60 |
+
<?php } elseif ($Full_Version == "Yes") { ?><ul><li><?php _e("Thanks for upgrading to version 3.5.0!", "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>
|
61 |
+
<?php } else { ?><ul><li><?php _e("Thanks for upgrading to version 3.4!", "EWD_UFAQ"); ?><br> <?php _e("Love the plugin but don't need the premium version? Help us speed up product support and development by donating. Thanks for using the plugin!", "EWD_UFAQ");?>
|
62 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
63 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
64 |
+
<input type="hidden" name="hosted_button_id" value="AQLMJFJ62GEFJ">
|
65 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
66 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
67 |
+
</form>
|
68 |
+
</li></ul>
|
69 |
+
<?php } */ ?>
|
70 |
+
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
|
75 |
+
<?php
|
76 |
+
update_option("EWD_UFAQ_Update_Flag", "No");
|
77 |
+
update_option("EWD_UFAQ_Install_Flag", "No");
|
78 |
+
}
|
79 |
+
|
80 |
?>
|
Functions/Update_Admin_Databases.php
CHANGED
@@ -14,25 +14,8 @@ function EWD_UFAQ_UpdateOptions() {
|
|
14 |
global $UFAQ_Full_Version;
|
15 |
|
16 |
$Custom_CSS = $_POST['custom_css'];
|
17 |
-
$FAQ_Accordion = $_POST['faq_accordion'];
|
18 |
-
$Hide_Categories = $_POST['hide_categories'];
|
19 |
-
$Hide_Tags = $_POST['hide_tags'];
|
20 |
-
$Reveal_Effect = $_POST['reveal_effect'];
|
21 |
-
$Group_By_Category = $_POST['group_by_category'];
|
22 |
-
$Group_By_Order_By = $_POST['group_by_order_by'];
|
23 |
-
$Group_By_Order = $_POST['group_by_order'];
|
24 |
-
$Order_By_Setting = $_POST['order_by_setting'];
|
25 |
-
$Order_Setting = $_POST['order_setting'];
|
26 |
-
$Include_Permalink = $_POST['include_permalink'];
|
27 |
-
$Pretty_Permalinks = $_POST['pretty_permalinks'];
|
28 |
-
$Display_All_Answers = $_POST['display_all_answers'];
|
29 |
-
$Scroll_To_Top = $_POST['scroll_to_top'];
|
30 |
$Social_Media_Array = $_POST['Socialmedia'];
|
31 |
if (is_array($Social_Media_Array)) {$Social_Media = implode(",", $Social_Media_Array);}
|
32 |
-
$Allow_Proposed_Answer = $_POST['allow_proposed_answer'];
|
33 |
-
$Display_Author = $_POST['display_author'];
|
34 |
-
$Display_Date = $_POST['display_date'];
|
35 |
-
$Display_Back_To_Top = $_POST['display_back_to_top'];
|
36 |
|
37 |
$Posted_Label = $_POST['posted_label'];
|
38 |
$By_Label = $_POST['by_label'];
|
@@ -44,30 +27,32 @@ function EWD_UFAQ_UpdateOptions() {
|
|
44 |
|
45 |
if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
|
46 |
if (isset($_POST['faq_toggle'])) {update_option('EWD_UFAQ_Toggle', $_POST['faq_toggle']);}
|
47 |
-
if (isset($_POST['
|
|
|
48 |
if (isset($_POST['faq_auto_complete_titles'])) {update_option('EWD_UFAQ_Auto_Complete_Titles', $_POST['faq_auto_complete_titles']);}
|
49 |
-
if (isset($_POST['hide_categories'])) {update_option('EWD_UFAQ_Hide_Categories', $
|
50 |
-
if (isset($_POST['hide_tags'])) {update_option('EWD_UFAQ_Hide_Tags', $
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
if (isset($_POST['
|
57 |
-
if (isset($_POST['include_permalink'])) {update_option('EWD_UFAQ_Include_Permalink', $Include_Permalink);}
|
58 |
if (isset($_POST['permalink_type'])) {update_option('EWD_UFAQ_Permalink_Type', $_POST['permalink_type']);}
|
59 |
|
60 |
-
if (isset($_POST['pretty_permalinks'])) {update_option('EWD_UFAQ_Pretty_Permalinks', $Pretty_Permalinks);}
|
61 |
-
if (isset($_POST['display_all_answers'])) {update_option('EWD_UFAQ_Display_All_Answers', $Display_All_Answers);}
|
62 |
-
if (isset($_POST['scroll_to_top'])) {update_option('EWD_UFAQ_Scroll_To_Top', $Scroll_To_Top);}
|
63 |
-
if (isset($_POST['Socialmedia'])) {update_option('EWD_UFAQ_Social_Media', $Social_Media);}
|
64 |
-
if (isset($_POST['allow_proposed_answer'])) {update_option('EWD_UFAQ_Allow_Proposed_Answer', $Allow_Proposed_Answer);}
|
65 |
-
if (isset($_POST['display_author'])) {update_option('EWD_UFAQ_Display_Author', $Display_Author);}
|
66 |
-
if (isset($_POST['display_date'])) {update_option('EWD_UFAQ_Display_Date', $Display_Date);}
|
67 |
-
if (isset($_POST['display_back_to_top'])) {update_option('EWD_UFAQ_Display_Back_To_Top', $Display_Back_To_Top);}
|
68 |
-
|
69 |
if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
|
70 |
if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
if (isset($_POST['posted_label'])) {update_option('EWD_UFAQ_Posted_Label', $Posted_Label);}
|
73 |
if (isset($_POST['by_label'])) {update_option('EWD_UFAQ_By_Label', $By_Label);}
|
14 |
global $UFAQ_Full_Version;
|
15 |
|
16 |
$Custom_CSS = $_POST['custom_css'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
$Social_Media_Array = $_POST['Socialmedia'];
|
18 |
if (is_array($Social_Media_Array)) {$Social_Media = implode(",", $Social_Media_Array);}
|
|
|
|
|
|
|
|
|
19 |
|
20 |
$Posted_Label = $_POST['posted_label'];
|
21 |
$By_Label = $_POST['by_label'];
|
27 |
|
28 |
if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
|
29 |
if (isset($_POST['faq_toggle'])) {update_option('EWD_UFAQ_Toggle', $_POST['faq_toggle']);}
|
30 |
+
if (isset($_POST['faq_category_toggle'])) {update_option('EWD_UFAQ_Category_Toggle', $_POST['faq_category_toggle']);}
|
31 |
+
if (isset($_POST['faq_accordion'])) {update_option('EWD_UFAQ_FAQ_Accordion', $_POST['faq_accordion']);}
|
32 |
if (isset($_POST['faq_auto_complete_titles'])) {update_option('EWD_UFAQ_Auto_Complete_Titles', $_POST['faq_auto_complete_titles']);}
|
33 |
+
if (isset($_POST['hide_categories'])) {update_option('EWD_UFAQ_Hide_Categories', $_POST['hide_categories']);}
|
34 |
+
if (isset($_POST['hide_tags'])) {update_option('EWD_UFAQ_Hide_Tags', $_POST['hide_tags']);}
|
35 |
+
if (isset($_POST['scroll_to_top'])) {update_option('EWD_UFAQ_Scroll_To_Top', $_POST['scroll_to_top']);}
|
36 |
+
if (isset($_POST['display_all_answers'])) {update_option('EWD_UFAQ_Display_All_Answers', $_POST['display_all_answers']);}
|
37 |
+
if (isset($_POST['display_author'])) {update_option('EWD_UFAQ_Display_Author', $_POST['display_author']);}
|
38 |
+
if (isset($_POST['display_date'])) {update_option('EWD_UFAQ_Display_Date', $_POST['display_date']);}
|
39 |
+
if (isset($_POST['display_back_to_top'])) {update_option('EWD_UFAQ_Display_Back_To_Top', $_POST['display_back_to_top']);}
|
40 |
+
if (isset($_POST['include_permalink'])) {update_option('EWD_UFAQ_Include_Permalink', $_POST['include_permalink']);}
|
|
|
41 |
if (isset($_POST['permalink_type'])) {update_option('EWD_UFAQ_Permalink_Type', $_POST['permalink_type']);}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
|
44 |
if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
|
45 |
+
if (isset($_POST['reveal_effect'])) {update_option('EWD_UFAQ_Reveal_Effect', $_POST['reveal_effect']);}
|
46 |
+
if (isset($_POST['pretty_permalinks'])) {update_option('EWD_UFAQ_Pretty_Permalinks', $_POST['pretty_permalinks']);}
|
47 |
+
if (isset($_POST['allow_proposed_answer'])) {update_option('EWD_UFAQ_Allow_Proposed_Answer', $_POST['allow_proposed_answer']);}
|
48 |
+
if (isset($_POST['faq_auto_complete_titles'])) {update_option('EWD_UFAQ_Auto_Complete_Titles', $_POST['faq_auto_complete_titles']);}
|
49 |
+
if (isset($_POST['Socialmedia'])) {update_option('EWD_UFAQ_Social_Media', $Social_Media);}
|
50 |
+
|
51 |
+
if (isset($_POST['group_by_category'])) {update_option('EWD_UFAQ_Group_By_Category', $_POST['group_by_category']);}
|
52 |
+
if (isset($_POST['group_by_order_by'])) {update_option('EWD_UFAQ_Group_By_Order_By', $_POST['group_by_order_by']);}
|
53 |
+
if (isset($_POST['group_by_order'])) {update_option('EWD_UFAQ_Group_By_Order', $_POST['group_by_order']);}
|
54 |
+
if (isset($_POST['order_by_setting'])) {update_option('EWD_UFAQ_Order_By', $_POST['order_by_setting']);}
|
55 |
+
if (isset($_POST['order_setting'])) {update_option('EWD_UFAQ_Order', $_POST['order_setting']);}
|
56 |
|
57 |
if (isset($_POST['posted_label'])) {update_option('EWD_UFAQ_Posted_Label', $Posted_Label);}
|
58 |
if (isset($_POST['by_label'])) {update_option('EWD_UFAQ_By_Label', $By_Label);}
|
Main.php
CHANGED
@@ -7,7 +7,7 @@ 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.1.
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
@@ -22,7 +22,7 @@ define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
|
22 |
//define('WP_DEBUG', true);
|
23 |
|
24 |
register_activation_hook(__FILE__,'Set_EWD_UFAQ_Options');
|
25 |
-
add_filter('upgrader_post_install', 'Set_EWD_UFAQ_Options'
|
26 |
|
27 |
/* Hooks neccessary admin tasks */
|
28 |
if ( is_admin() ){
|
@@ -114,22 +114,35 @@ function save_ufaq_error(){
|
|
114 |
}
|
115 |
|
116 |
function Set_EWD_UFAQ_Options() {
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
$UFAQ_Full_Version = get_option("EWD_UFAQ_Full_Version");
|
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.1.9
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
22 |
//define('WP_DEBUG', true);
|
23 |
|
24 |
register_activation_hook(__FILE__,'Set_EWD_UFAQ_Options');
|
25 |
+
add_filter('upgrader_post_install', 'Set_EWD_UFAQ_Options');
|
26 |
|
27 |
/* Hooks neccessary admin tasks */
|
28 |
if ( is_admin() ){
|
114 |
}
|
115 |
|
116 |
function Set_EWD_UFAQ_Options() {
|
117 |
+
if (get_option("EWD_UFAQ_Toggle") == "") {update_option("EWD_UFAQ_Toggle", "Yes");}
|
118 |
+
if (get_option("EWD_UFAQ_Category_Toggle") == "") {update_option("EWD_UFAQ_Category_Toggle", "No");}
|
119 |
+
if (get_option("EWD_UFAQ_FAQ_Accordion") == "") {update_option("EWD_UFAQ_FAQ_Accordion", "No");}
|
120 |
+
if (get_option("EWD_UFAQ_Hide_Categories") == "") {update_option("EWD_UFAQ_Hide_Categories", "No");}
|
121 |
+
if (get_option("EWD_UFAQ_Hide_Tags") == "") {update_option("EWD_UFAQ_Hide_Tags", "No");}
|
122 |
+
if (get_option("EWD_UFAQ_Scroll_To_Top") == "") {update_option("EWD_UFAQ_Scroll_To_Top", "Yes");}
|
123 |
+
if (get_option("EWD_UFAQ_Display_All_Answers") == "") {update_option("EWD_UFAQ_Display_All_Answers", "No");}
|
124 |
+
if (get_option("EWD_UFAQ_Display_Author") == "") {update_option("EWD_UFAQ_Display_Author", "Yes");}
|
125 |
+
if (get_option("EWD_UFAQ_Display_Date") == "") {update_option("EWD_UFAQ_Display_Date", "Yes");}
|
126 |
+
if (get_option("EWD_UFAQ_Display_Back_To_Top") == "") {update_option("EWD_UFAQ_Display_Back_To_Top", "No");}
|
127 |
+
if (get_option("EWD_UFAQ_Include_Permalink") == "") {update_option("EWD_UFAQ_Include_Permalink", "Yes");}
|
128 |
+
if (get_option("EWD_UFAQ_Permalink_Type") == "") {update_option("EWD_UFAQ_Permalink_Type", "SamePage");}
|
129 |
+
|
130 |
+
if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
|
131 |
+
if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
|
132 |
+
if (get_option("EWD_UFAQ_Reveal_Effect") == "") {update_option("EWD_UFAQ_Reveal_Effect", "none");}
|
133 |
+
if (get_option("EWD_UFAQ_Pretty_Permalinks") == "") {update_option("EWD_UFAQ_Pretty_Permalinks", "No");}
|
134 |
+
if (get_option("EWD_UFAQ_Allow_Proposed_Answer") == "") {update_option("EWD_UFAQ_Allow_Proposed_Answer", "No");}
|
135 |
+
if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
|
136 |
+
|
137 |
+
if (get_option("EWD_UFAQ_Group_By_Category") == "") {update_option("EWD_UFAQ_Group_By_Category", "No");}
|
138 |
+
if (get_option("EWD_UFAQ_Group_By_Order_By") == "") {update_option("EWD_UFAQ_Group_By_Order_By", "name");}
|
139 |
+
if (get_option("EWD_UFAQ_Group_By_Order") == "") {update_option("EWD_UFAQ_Group_By_Order", "ASC");}
|
140 |
+
if (get_option("EWD_UFAQ_Order_By") == "") {update_option("EWD_UFAQ_Order_By", "date");}
|
141 |
+
if (get_option("EWD_UFAQ_Order") == "") {update_option("EWD_UFAQ_Order", "DESC");}
|
142 |
+
|
143 |
+
if (get_option("EWD_UFAQ_Full_Version") == "") {update_option("EWD_UFAQ_Full_Version", "No");}
|
144 |
+
if (get_option("EWD_UFAQ_Install_Flag") == "") {update_option("EWD_UFAQ_Update_Flag", "Yes");}
|
145 |
+
if (get_option("EWD_UFAQ_Install_Flag") == "") {update_option("EWD_UFAQ_Install_Flag", "Yes");}
|
146 |
}
|
147 |
|
148 |
$UFAQ_Full_Version = get_option("EWD_UFAQ_Full_Version");
|
Shortcodes/DisplayFAQs.php
CHANGED
@@ -2,32 +2,33 @@
|
|
2 |
/* The function that creates the HTML on the front-end, based on the parameters
|
3 |
* supplied in the product-catalog shortcode */
|
4 |
function Display_FAQs($atts) {
|
5 |
-
global $wp;
|
6 |
-
|
7 |
$current_url = $_SERVER['REQUEST_URI'];
|
8 |
$Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
|
9 |
$FAQ_Toggle = get_option("EWD_UFAQ_Toggle");
|
|
|
10 |
$FAQ_Accordion = get_option("EWD_UFAQ_FAQ_Accordion");
|
11 |
$Hide_Categories = get_option("EWD_UFAQ_Hide_Categories");
|
12 |
$Hide_Tags = get_option("EWD_UFAQ_Hide_Tags");
|
13 |
-
$
|
14 |
-
$
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
$Order_Setting = get_option("EWD_UFAQ_Order");
|
19 |
-
$Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
|
20 |
$Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
|
|
|
21 |
$Display_Style = get_option("EWD_UFAQ_Display_Style");
|
22 |
$Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
|
|
|
23 |
$Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
24 |
$Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
|
25 |
-
$Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
|
26 |
$Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
|
27 |
$Socialmedia = explode(",", $Socialmedia_String);
|
28 |
-
|
29 |
-
$
|
30 |
-
|
|
|
|
|
|
|
31 |
|
32 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
33 |
if ($Posted_Label == "") {$Posted_Label = __("Posted ", 'EWD_UFAQ');}
|
@@ -168,9 +169,14 @@ function Display_FAQs($atts) {
|
|
168 |
|
169 |
if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and sizeOf($faqs) > 0) {
|
170 |
$ReturnString .= "<div class='ufaq-faq-category'>";
|
171 |
-
$ReturnString .= "<div class='ufaq-faq-category-title
|
|
|
|
|
172 |
$ReturnString .= "<h4>" . $Category->name . "</h4>";
|
173 |
$ReturnString .= "</div>";
|
|
|
|
|
|
|
174 |
|
175 |
$HeaderString .= "<div class='ufaq-faq-header-category'>";
|
176 |
$HeaderString .= "<div class='ufaq-faq-header-category-title' data-categoryid='" . $Category->term_id . "'>";
|
2 |
/* The function that creates the HTML on the front-end, based on the parameters
|
3 |
* supplied in the product-catalog shortcode */
|
4 |
function Display_FAQs($atts) {
|
|
|
|
|
5 |
$current_url = $_SERVER['REQUEST_URI'];
|
6 |
$Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
|
7 |
$FAQ_Toggle = get_option("EWD_UFAQ_Toggle");
|
8 |
+
$Category_Toggle = get_option("EWD_UFAQ_Category_Toggle");
|
9 |
$FAQ_Accordion = get_option("EWD_UFAQ_FAQ_Accordion");
|
10 |
$Hide_Categories = get_option("EWD_UFAQ_Hide_Categories");
|
11 |
$Hide_Tags = get_option("EWD_UFAQ_Hide_Tags");
|
12 |
+
$Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
|
13 |
+
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
14 |
+
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
15 |
+
$Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
|
16 |
+
$Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
|
|
|
|
|
17 |
$Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
|
18 |
+
|
19 |
$Display_Style = get_option("EWD_UFAQ_Display_Style");
|
20 |
$Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
|
21 |
+
$Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
|
22 |
$Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
23 |
$Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
|
|
|
24 |
$Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
|
25 |
$Socialmedia = explode(",", $Socialmedia_String);
|
26 |
+
|
27 |
+
$Group_By_Category = get_option("EWD_UFAQ_Group_By_Category");
|
28 |
+
$Group_By_Order_By = get_option("EWD_UFAQ_Group_By_Order_By");
|
29 |
+
$Group_By_Order = get_option("EWD_UFAQ_Group_By_Order");
|
30 |
+
$Order_By_Setting = get_option("EWD_UFAQ_Order_By");
|
31 |
+
$Order_Setting = get_option("EWD_UFAQ_Order");
|
32 |
|
33 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
34 |
if ($Posted_Label == "") {$Posted_Label = __("Posted ", 'EWD_UFAQ');}
|
169 |
|
170 |
if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and sizeOf($faqs) > 0) {
|
171 |
$ReturnString .= "<div class='ufaq-faq-category'>";
|
172 |
+
$ReturnString .= "<div class='ufaq-faq-category-title";
|
173 |
+
if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-title-toggle";}
|
174 |
+
$ReturnString .= "' data-categoryid='" . $Category->term_id . "'>";
|
175 |
$ReturnString .= "<h4>" . $Category->name . "</h4>";
|
176 |
$ReturnString .= "</div>";
|
177 |
+
$ReturnString .= "<div class='ufaq-faq-category-inner";
|
178 |
+
if ($Category_Toggle == "Yes") {$ReturnString .= " ufaq-faq-category-body-hidden";}
|
179 |
+
$ReturnString .= "' id='ufaq-faq-category-body-" . $Category->term_id . "'>";
|
180 |
|
181 |
$HeaderString .= "<div class='ufaq-faq-header-category'>";
|
182 |
$HeaderString .= "<div class='ufaq-faq-header-category-title' data-categoryid='" . $Category->term_id . "'>";
|
css/ewd-ufaq-styles.css
CHANGED
@@ -2,6 +2,14 @@
|
|
2 |
display:none;
|
3 |
}
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
.ewd-ufaq-clear {
|
6 |
clear:both;
|
7 |
}
|
2 |
display:none;
|
3 |
}
|
4 |
|
5 |
+
.ufaq-faq-category-title-toggle {
|
6 |
+
cursor: pointer;
|
7 |
+
}
|
8 |
+
|
9 |
+
.ufaq-faq-category-body-hidden {
|
10 |
+
display: none;
|
11 |
+
}
|
12 |
+
|
13 |
.ewd-ufaq-clear {
|
14 |
clear:both;
|
15 |
}
|
html/OptionsPage.php
CHANGED
@@ -1,31 +1,32 @@
|
|
1 |
<?php
|
2 |
$Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
|
3 |
$FAQ_Toggle = get_option("EWD_UFAQ_Toggle");
|
|
|
4 |
$FAQ_Accordion = get_option("EWD_UFAQ_FAQ_Accordion");
|
5 |
-
$FAQ_Auto_Complete_Titles = get_option("EWD_UFAQ_Auto_Complete_Titles");
|
6 |
$Hide_Categories = get_option("EWD_UFAQ_Hide_Categories");
|
7 |
$Hide_Tags = get_option("EWD_UFAQ_Hide_Tags");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
$Display_Style = get_option("EWD_UFAQ_Display_Style");
|
10 |
$Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
|
11 |
$Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
$Group_By_Category = get_option("EWD_UFAQ_Group_By_Category");
|
14 |
$Group_By_Order_By = get_option("EWD_UFAQ_Group_By_Order_By");
|
15 |
$Group_By_Order = get_option("EWD_UFAQ_Group_By_Order");
|
16 |
$Order_By_Setting = get_option("EWD_UFAQ_Order_By");
|
17 |
$Order_Setting = get_option("EWD_UFAQ_Order");
|
18 |
-
$Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
|
19 |
-
$Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
|
20 |
-
$Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
21 |
-
$Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
|
22 |
-
$Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
|
23 |
-
$Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
|
24 |
-
$Socialmedia = explode(",", $Socialmedia_String);
|
25 |
-
$Allow_Proposed_Answer = get_option("EWD_UFAQ_Allow_Proposed_Answer");
|
26 |
-
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
27 |
-
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
28 |
-
$Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
|
29 |
|
30 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
31 |
$By_Label = get_option("EWD_UFAQ_By_Label");
|
@@ -97,7 +98,7 @@
|
|
97 |
<tr>
|
98 |
<th scope="row">FAQ Toggle</th>
|
99 |
<td>
|
100 |
-
<fieldset><legend class="screen-reader-text"><span>FAQ
|
101 |
<label title='Yes'><input type='radio' name='faq_toggle' value='Yes' <?php if($FAQ_Toggle == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
102 |
<label title='No'><input type='radio' name='faq_toggle' value='No' <?php if($FAQ_Toggle == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
103 |
<p>Should the FAQs hide/open when they are clicked? </p>
|
@@ -105,6 +106,16 @@
|
|
105 |
</td>
|
106 |
</tr>
|
107 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
<th scope="row">FAQ Accordion</th>
|
109 |
<td>
|
110 |
<fieldset><legend class="screen-reader-text"><span>FAQ Accordion</span></legend>
|
@@ -315,8 +326,8 @@
|
|
315 |
<th scope="row">Group FAQs by Category</th>
|
316 |
<td>
|
317 |
<fieldset><legend class="screen-reader-text"><span>Group FAQs by Category</span></legend>
|
318 |
-
<label title='Yes'><input type='radio' name='group_by_category' value='Yes' <?php if($Group_By_Category == "Yes") {echo "checked='checked'";} ?>
|
319 |
-
<label title='No'><input type='radio' name='group_by_category' value='No' <?php if($Group_By_Category == "No") {echo "checked='checked'";} ?>
|
320 |
<p>Should FAQs be grouped by category, or should all categories be mixed together?</p>
|
321 |
</fieldset>
|
322 |
</td>
|
@@ -341,8 +352,8 @@
|
|
341 |
<th scope="row">Sort Categories Ordering</th>
|
342 |
<td>
|
343 |
<fieldset><legend class="screen-reader-text"><span>Sort Categories Ordering</span></legend>
|
344 |
-
<label title='Ascending'><input type='radio' name='group_by_order' value='ASC' <?php if($Group_By_Order == "ASC") {echo "checked='checked'";} ?>
|
345 |
-
<label title='Descending'><input type='radio' name='group_by_order' value='DESC' <?php if($Group_By_Category == "DESC") {echo "checked='checked'";} ?>
|
346 |
<p>How should FAQ categories be ordered? (Only used if "Group FAQs by Category" above is set to "Yes")</p>
|
347 |
</fieldset>
|
348 |
</td>
|
@@ -357,7 +368,7 @@
|
|
357 |
<option value="date" <?php if($Order_By_Setting == "date") {echo "selected=selected";} ?> >Created Date</option>
|
358 |
<option value="title" <?php if($Order_By_Setting == "title") {echo "selected=selected";} ?> >Title</option>
|
359 |
<option value="modified" <?php if($Order_By_Setting == "modified") {echo "selected=selected";} ?> >Modified Date</option>
|
360 |
-
<option value="set_order" <?php if($Order_By_Setting == "set_order") {echo "selected=selected";} ?> >Selected Order (using Order table)</option>
|
361 |
</select>
|
362 |
|
363 |
<p>How should individual FAQs be ordered?</p>
|
@@ -368,8 +379,8 @@
|
|
368 |
<th scope="row">FAQ Order Setting</th>
|
369 |
<td>
|
370 |
<fieldset><legend class="screen-reader-text"><span>Sort Categories Ordering</span></legend>
|
371 |
-
<label title='Yes'><input type='radio' name='order_setting' value='ASC' <?php if($Order_Setting == "ASC") {echo "checked='checked'";} ?>
|
372 |
-
<label title='No'><input type='radio' name='order_setting' value='DESC' <?php if($Order_Setting == "DESC") {echo "checked='checked'";} ?>
|
373 |
<p>Should FAQ be ascending or descending order, based on the ordering criteria above?</p>
|
374 |
</fieldset>
|
375 |
</td>
|
@@ -440,7 +451,7 @@
|
|
440 |
</div>
|
441 |
|
442 |
<div id='Labelling' class='ufaq-option-set ufaq-hidden'>
|
443 |
-
<h2 id='label-order-options' class='ufaq-options-page-tab-title'>Labelling Options</h2>
|
444 |
<div class="ufaq-label-description"> Replace the default text on the FAQ page </div>
|
445 |
|
446 |
<div id='labelling-view-options' class="ufaq-options-div ufaq-options-flex">
|
@@ -482,7 +493,7 @@
|
|
482 |
</div>
|
483 |
</div>
|
484 |
<div id='Styling' class='ufaq-option-set ufaq-hidden'>
|
485 |
-
<h2 id='label-order-options' class='ufaq-options-page-tab-title'>Styling Options</h2>
|
486 |
|
487 |
<div id='ufaq-styling-options' class="ufaq-options-div ufaq-options-flex">
|
488 |
<div class='ufaq-subsection'>
|
@@ -490,19 +501,19 @@
|
|
490 |
<div class='ufaq-subsection-content'>
|
491 |
<div class='ufaq-option ufaq-styling-option'>
|
492 |
<div class='ufaq-option-label'>Icon Background Color</div>
|
493 |
-
<div class='ufaq-color-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_default_bg_color' value='<?php echo $UFAQ_Styling_Default_Bg_Color; ?>' /></div>
|
494 |
</div>
|
495 |
<div class='ufaq-option ufaq-styling-option'>
|
496 |
<div class='ufaq-option-label'>Icon Font Color</div>
|
497 |
-
<div class='ufaq-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_default_font_color' value='<?php echo $UFAQ_Styling_Default_Font_Color; ?>' /></div>
|
498 |
</div>
|
499 |
<div class='ufaq-option ufaq-styling-option'>
|
500 |
<div class='ufaq-option-label'>Icon Border Color</div>
|
501 |
-
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_border' value='<?php echo $UFAQ_Styling_Default_Border_Color; ?>' /></div>
|
502 |
</div>
|
503 |
<div class='ufaq-option ufaq-styling-option'>
|
504 |
<div class='ufaq-option-label'>Icon Border Radius</div>
|
505 |
-
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_border_radius' value='<?php echo $UFAQ_Styling_Default_Border_Radius; ?>' /></div>
|
506 |
</div>
|
507 |
</div>
|
508 |
</div>
|
@@ -511,11 +522,11 @@
|
|
511 |
<div class='ufaq-subsection-content'>
|
512 |
<div class='ufaq-option ufaq-styling-option'>
|
513 |
<div class='ufaq-option-label'>Hover Background Color</div>
|
514 |
-
<div class='ufaq-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_block_bg_color' value='<?php echo $UFAQ_Styling_Block_Bg_Color; ?>' /></div>
|
515 |
</div>
|
516 |
<div class='ufaq-option ufaq-styling-option'>
|
517 |
<div class='ufaq-option-label'>Hover Font Color</div>
|
518 |
-
<div class='ufaq-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_block_font_color' value='<?php echo $UFAQ_Styling_Block_Font_Color; ?>' /></div>
|
519 |
</div>
|
520 |
</div>
|
521 |
</div>
|
1 |
<?php
|
2 |
$Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
|
3 |
$FAQ_Toggle = get_option("EWD_UFAQ_Toggle");
|
4 |
+
$FAQ_Category_Toggle = get_option("EWD_UFAQ_Category_Toggle");
|
5 |
$FAQ_Accordion = get_option("EWD_UFAQ_FAQ_Accordion");
|
|
|
6 |
$Hide_Categories = get_option("EWD_UFAQ_Hide_Categories");
|
7 |
$Hide_Tags = get_option("EWD_UFAQ_Hide_Tags");
|
8 |
+
$Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
|
9 |
+
$Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
|
10 |
+
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
11 |
+
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
12 |
+
$Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
|
13 |
+
$Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
|
14 |
+
$Permalink_Type = get_option("EWD_UFAQ_Permalink_Type");
|
15 |
|
16 |
$Display_Style = get_option("EWD_UFAQ_Display_Style");
|
17 |
$Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
|
18 |
$Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
|
19 |
+
$Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
20 |
+
$Allow_Proposed_Answer = get_option("EWD_UFAQ_Allow_Proposed_Answer");
|
21 |
+
$FAQ_Auto_Complete_Titles = get_option("EWD_UFAQ_Auto_Complete_Titles");
|
22 |
+
$Socialmedia_String = get_option("EWD_UFAQ_Social_Media");
|
23 |
+
$Socialmedia = explode(",", $Socialmedia_String);
|
24 |
|
25 |
$Group_By_Category = get_option("EWD_UFAQ_Group_By_Category");
|
26 |
$Group_By_Order_By = get_option("EWD_UFAQ_Group_By_Order_By");
|
27 |
$Group_By_Order = get_option("EWD_UFAQ_Group_By_Order");
|
28 |
$Order_By_Setting = get_option("EWD_UFAQ_Order_By");
|
29 |
$Order_Setting = get_option("EWD_UFAQ_Order");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
32 |
$By_Label = get_option("EWD_UFAQ_By_Label");
|
98 |
<tr>
|
99 |
<th scope="row">FAQ Toggle</th>
|
100 |
<td>
|
101 |
+
<fieldset><legend class="screen-reader-text"><span>FAQ Toggle</span></legend>
|
102 |
<label title='Yes'><input type='radio' name='faq_toggle' value='Yes' <?php if($FAQ_Toggle == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
103 |
<label title='No'><input type='radio' name='faq_toggle' value='No' <?php if($FAQ_Toggle == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
104 |
<p>Should the FAQs hide/open when they are clicked? </p>
|
106 |
</td>
|
107 |
</tr>
|
108 |
<tr>
|
109 |
+
<th scope="row">FAQ Category Toggle</th>
|
110 |
+
<td>
|
111 |
+
<fieldset><legend class="screen-reader-text"><span>FAQ Category Toggle</span></legend>
|
112 |
+
<label title='Yes'><input type='radio' name='faq_category_toggle' value='Yes' <?php if($FAQ_Category_Toggle == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
113 |
+
<label title='No'><input type='radio' name='faq_category_toggle' value='No' <?php if($FAQ_Category_Toggle == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
114 |
+
<p>Should the FAQ categories hide/open when they are clicked, if FAQs are being grouped by category ("Group FAQs by Category" in the "Ordering" area)? </p>
|
115 |
+
</fieldset>
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
<tr>
|
119 |
<th scope="row">FAQ Accordion</th>
|
120 |
<td>
|
121 |
<fieldset><legend class="screen-reader-text"><span>FAQ Accordion</span></legend>
|
326 |
<th scope="row">Group FAQs by Category</th>
|
327 |
<td>
|
328 |
<fieldset><legend class="screen-reader-text"><span>Group FAQs by Category</span></legend>
|
329 |
+
<label title='Yes'><input type='radio' name='group_by_category' value='Yes' <?php if($Group_By_Category == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
330 |
+
<label title='No'><input type='radio' name='group_by_category' value='No' <?php if($Group_By_Category == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
331 |
<p>Should FAQs be grouped by category, or should all categories be mixed together?</p>
|
332 |
</fieldset>
|
333 |
</td>
|
352 |
<th scope="row">Sort Categories Ordering</th>
|
353 |
<td>
|
354 |
<fieldset><legend class="screen-reader-text"><span>Sort Categories Ordering</span></legend>
|
355 |
+
<label title='Ascending'><input type='radio' name='group_by_order' value='ASC' <?php if($Group_By_Order == "ASC") {echo "checked='checked'";} ?> /> <span>Ascending</span></label><br />
|
356 |
+
<label title='Descending'><input type='radio' name='group_by_order' value='DESC' <?php if($Group_By_Category == "DESC") {echo "checked='checked'";} ?> /> <span>Descending</span></label><br />
|
357 |
<p>How should FAQ categories be ordered? (Only used if "Group FAQs by Category" above is set to "Yes")</p>
|
358 |
</fieldset>
|
359 |
</td>
|
368 |
<option value="date" <?php if($Order_By_Setting == "date") {echo "selected=selected";} ?> >Created Date</option>
|
369 |
<option value="title" <?php if($Order_By_Setting == "title") {echo "selected=selected";} ?> >Title</option>
|
370 |
<option value="modified" <?php if($Order_By_Setting == "modified") {echo "selected=selected";} ?> >Modified Date</option>
|
371 |
+
<option value="set_order" <?php if($Order_By_Setting == "set_order") {echo "selected=selected";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> >Selected Order (using Order table)</option>
|
372 |
</select>
|
373 |
|
374 |
<p>How should individual FAQs be ordered?</p>
|
379 |
<th scope="row">FAQ Order Setting</th>
|
380 |
<td>
|
381 |
<fieldset><legend class="screen-reader-text"><span>Sort Categories Ordering</span></legend>
|
382 |
+
<label title='Yes'><input type='radio' name='order_setting' value='ASC' <?php if($Order_Setting == "ASC") {echo "checked='checked'";} ?> /> <span>Ascending</span></label><br />
|
383 |
+
<label title='No'><input type='radio' name='order_setting' value='DESC' <?php if($Order_Setting == "DESC") {echo "checked='checked'";} ?> /> <span>Descending</span></label><br />
|
384 |
<p>Should FAQ be ascending or descending order, based on the ordering criteria above?</p>
|
385 |
</fieldset>
|
386 |
</td>
|
451 |
</div>
|
452 |
|
453 |
<div id='Labelling' class='ufaq-option-set ufaq-hidden'>
|
454 |
+
<h2 id='label-order-options' class='ufaq-options-page-tab-title'>Labelling Options (Premium)</h2>
|
455 |
<div class="ufaq-label-description"> Replace the default text on the FAQ page </div>
|
456 |
|
457 |
<div id='labelling-view-options' class="ufaq-options-div ufaq-options-flex">
|
493 |
</div>
|
494 |
</div>
|
495 |
<div id='Styling' class='ufaq-option-set ufaq-hidden'>
|
496 |
+
<h2 id='label-order-options' class='ufaq-options-page-tab-title'>Styling Options (Premium)</h2>
|
497 |
|
498 |
<div id='ufaq-styling-options' class="ufaq-options-div ufaq-options-flex">
|
499 |
<div class='ufaq-subsection'>
|
501 |
<div class='ufaq-subsection-content'>
|
502 |
<div class='ufaq-option ufaq-styling-option'>
|
503 |
<div class='ufaq-option-label'>Icon Background Color</div>
|
504 |
+
<div class='ufaq-color-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_default_bg_color' value='<?php echo $UFAQ_Styling_Default_Bg_Color; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
505 |
</div>
|
506 |
<div class='ufaq-option ufaq-styling-option'>
|
507 |
<div class='ufaq-option-label'>Icon Font Color</div>
|
508 |
+
<div class='ufaq-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_default_font_color' value='<?php echo $UFAQ_Styling_Default_Font_Color; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
509 |
</div>
|
510 |
<div class='ufaq-option ufaq-styling-option'>
|
511 |
<div class='ufaq-option-label'>Icon Border Color</div>
|
512 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_border' value='<?php echo $UFAQ_Styling_Default_Border_Color; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
513 |
</div>
|
514 |
<div class='ufaq-option ufaq-styling-option'>
|
515 |
<div class='ufaq-option-label'>Icon Border Radius</div>
|
516 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_border_radius' value='<?php echo $UFAQ_Styling_Default_Border_Radius; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
517 |
</div>
|
518 |
</div>
|
519 |
</div>
|
522 |
<div class='ufaq-subsection-content'>
|
523 |
<div class='ufaq-option ufaq-styling-option'>
|
524 |
<div class='ufaq-option-label'>Hover Background Color</div>
|
525 |
+
<div class='ufaq-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_block_bg_color' value='<?php echo $UFAQ_Styling_Block_Bg_Color; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
526 |
</div>
|
527 |
<div class='ufaq-option ufaq-styling-option'>
|
528 |
<div class='ufaq-option-label'>Hover Font Color</div>
|
529 |
+
<div class='ufaq-option-input'><input type='text' class='ewd-ufaq-spectrum' name='ufaq_styling_block_font_color' value='<?php echo $UFAQ_Styling_Block_Font_Color; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
530 |
</div>
|
531 |
</div>
|
532 |
</div>
|
js/ewd-ufaq-js.js
CHANGED
@@ -38,6 +38,17 @@ function ufaqSetClickHandlers() {
|
|
38 |
}
|
39 |
});
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
jQuery('.ufaq-back-to-top-link').on('click', function(event) {
|
42 |
event.preventDefault();
|
43 |
|
38 |
}
|
39 |
});
|
40 |
|
41 |
+
jQuery('.ufaq-faq-category-title-toggle').on('click', function(event) {
|
42 |
+
var category_id = jQuery(this).attr("data-categoryid");
|
43 |
+
|
44 |
+
if (jQuery('#ufaq-faq-category-body-'+category_id).hasClass("ufaq-faq-category-body-hidden")) {
|
45 |
+
jQuery('#ufaq-faq-category-body-'+category_id).removeClass("ufaq-faq-category-body-hidden");
|
46 |
+
}
|
47 |
+
else {
|
48 |
+
jQuery('#ufaq-faq-category-body-'+category_id).addClass("ufaq-faq-category-body-hidden");
|
49 |
+
}
|
50 |
+
});
|
51 |
+
|
52 |
jQuery('.ufaq-back-to-top-link').on('click', function(event) {
|
53 |
event.preventDefault();
|
54 |
|
readme.txt
CHANGED
@@ -126,6 +126,10 @@ For more questions and support you can post in the support forum:
|
|
126 |
9. All answers displayed in the 'list' FAQ mode
|
127 |
|
128 |
== Changelog ==
|
|
|
|
|
|
|
|
|
129 |
= 1.1.8 =
|
130 |
- Fixed a scrolling error with non-FAQ links
|
131 |
|
126 |
9. All answers displayed in the 'list' FAQ mode
|
127 |
|
128 |
== Changelog ==
|
129 |
+
= 1.1.9 =
|
130 |
+
- Added a "Category Toggle" options for users who group their FAQs by category
|
131 |
+
- Cleaned up some of the code dealing with options
|
132 |
+
|
133 |
= 1.1.8 =
|
134 |
- Fixed a scrolling error with non-FAQ links
|
135 |
|