Version Description
- Added new premium display styles
- Added an autocomplete titles option for the AJAX search shortcode
- Added more styling options to customize new display styles
- Added an option to add a 'Back to Top' link to each FAQ post
- Fixed a reveal error with non-accordion display and no effect selected
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.0.9 to 1.1.0
- Functions/EWD_UFAQ_Styling.php +17 -0
- Functions/EWD_UFAQ_Version_Update.php +6 -0
- Functions/Update_Admin_Databases.php +25 -5
- Main.php +9 -2
- Shortcodes/DisplayFAQs.php +53 -6
- Shortcodes/Display_FAQ_Search.php +17 -3
- css/Admin.css +1 -2
- css/ewd-ufaq-styles.css +102 -5
- html/OptionsPage.php +123 -18
- js/ewd-ufaq-js.js +79 -17
- readme.txt +7 -0
Functions/EWD_UFAQ_Styling.php
CHANGED
@@ -1,6 +1,23 @@
|
|
1 |
<?php
|
2 |
function EWD_UFAQ_Add_Modified_Styles() {
|
3 |
$StylesString = "<style>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
$StylesString .="div.ufaq-faq-title h4 { ";
|
5 |
if (get_option("EWD_UFAQ_Styling_Question_Font") != "") {$StylesString .= "font:" . get_option("EWD_UFAQ_Styling_Question_Font") . " !important;";}
|
6 |
if (get_option("EWD_UFAQ_Styling_Question_Font_Size") != "") {$StylesString .="font-size:" . get_option("EWD_UFAQ_Styling_Question_Font_Size") . " !important;";}
|
1 |
<?php
|
2 |
function EWD_UFAQ_Add_Modified_Styles() {
|
3 |
$StylesString = "<style>";
|
4 |
+
$StylesString .=".ufaq-faq-display-style-Default .ewd-ufaq-post-margin-symbol { ";
|
5 |
+
if (get_option("EWD_UFAQ_Styling_Default_Bg_Color") != "") {$StylesString .= "background-color:" . get_option("EWD_UFAQ_Styling_Default_Bg_Color") . " !important;";}
|
6 |
+
if (get_option("EWD_UFAQ_Styling_Default_Font_Color") != "") {$StylesString .="color:" . get_option("EWD_UFAQ_Styling_Default_Font_Color") . " !important;";}
|
7 |
+
if (get_option("EWD_UFAQ_Styling_Default_Border") != "") {$StylesString .= "border:" . get_option("EWD_UFAQ_Styling_Default_Border") . " !important;";}
|
8 |
+
if (get_option("EWD_UFAQ_Styling_Default_Border_Radius") != "") {$StylesString .= "border-radius:" . get_option("EWD_UFAQ_Styling_Default_Border_Radius") . " !important;";}
|
9 |
+
$StylesString .="}\n";
|
10 |
+
$StylesString .=".ufaq-faq-display-style-Block.ewd-ufaq-post-active, .ufaq-faq-display-style-Block.ewd-ufaq-post-active a,.ufaq-faq-display-style-Block:hover, .ufaq-faq-display-style-Block:hover a, .ufaq-faq-display-style-Block:hover h4 { ";
|
11 |
+
if (get_option("EWD_UFAQ_Styling_Block_Bg_Color") != "") {$StylesString .= "background-color:" . get_option("EWD_UFAQ_Styling_Block_Bg_Color") . " !important;";}
|
12 |
+
if (get_option("EWD_UFAQ_Styling_Block_Font_Color") != "") {$StylesString .="color:" . get_option("EWD_UFAQ_Styling_Block_Font_Color") . " !important;";}
|
13 |
+
$StylesString .="}\n";
|
14 |
+
$StylesString .=".ufaq-faq-header-title a{ ";
|
15 |
+
if (get_option("EWD_UFAQ_Styling_List_Font") != "") {$StylesString .= "font:" . get_option("EWD_UFAQ_Styling_List_Font") . " !important;";}
|
16 |
+
if (get_option("EWD_UFAQ_Styling_List_Font_Size") != "") {$StylesString .="font-size:" . get_option("EWD_UFAQ_Styling_List_Font_Size") . " !important;";}
|
17 |
+
if (get_option("EWD_UFAQ_Styling_List_Font_Color") != "") {$StylesString .= "color:" . get_option("EWD_UFAQ_Styling_List_Font_Color") . " !important;";}
|
18 |
+
if (get_option("EWD_UFAQ_Styling_List_Margin") != "") {$StylesString .= "margin:" . get_option("EWD_UFAQ_Styling_List_Margin") . " !important;";}
|
19 |
+
if (get_option("EWD_UFAQ_Styling_List_Padding") != "") {$StylesString .= "padding:" . get_option("EWD_UFAQ_Styling_List_Padding") . " !important;";}
|
20 |
+
$StylesString .="}\n";
|
21 |
$StylesString .="div.ufaq-faq-title h4 { ";
|
22 |
if (get_option("EWD_UFAQ_Styling_Question_Font") != "") {$StylesString .= "font:" . get_option("EWD_UFAQ_Styling_Question_Font") . " !important;";}
|
23 |
if (get_option("EWD_UFAQ_Styling_Question_Font_Size") != "") {$StylesString .="font-size:" . get_option("EWD_UFAQ_Styling_Question_Font_Size") . " !important;";}
|
Functions/EWD_UFAQ_Version_Update.php
CHANGED
@@ -17,6 +17,12 @@ function EWD_UFAQ_Version_Update() {
|
|
17 |
}
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
|
21 |
}
|
22 |
|
17 |
}
|
18 |
}
|
19 |
|
20 |
+
if (get_option("EWD_UFAQ_Toggle") == "") {update_option("EWD_UFAQ_Toggle", "Yes");}
|
21 |
+
if (get_option("EWD_UFAQ_Display_Back_To_Top") == "") {update_option("EWD_UFAQ_Display_Back_To_Top", "No");}
|
22 |
+
if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
|
23 |
+
if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
|
24 |
+
if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
|
25 |
+
|
26 |
update_option('EWD_UFAQ_Version', $EWD_UFAQ_Version);
|
27 |
}
|
28 |
|
Functions/Update_Admin_Databases.php
CHANGED
@@ -11,7 +11,9 @@ function EWD_UFAQ_Add_Post_Order_Meta($post_id) {
|
|
11 |
add_action('save_post_ufaq', 'EWD_UFAQ_Add_Post_Order_Meta');
|
12 |
|
13 |
function EWD_UFAQ_UpdateOptions() {
|
14 |
-
|
|
|
|
|
15 |
$FAQ_Accordion = $_POST['faq_accordion'];
|
16 |
$Hide_Categories = $_POST['hide_categories'];
|
17 |
$Hide_Tags = $_POST['hide_tags'];
|
@@ -30,6 +32,7 @@ function EWD_UFAQ_UpdateOptions() {
|
|
30 |
$Allow_Proposed_Answer = $_POST['allow_proposed_answer'];
|
31 |
$Display_Author = $_POST['display_author'];
|
32 |
$Display_Date = $_POST['display_date'];
|
|
|
33 |
|
34 |
$Posted_Label = $_POST['posted_label'];
|
35 |
$By_Label = $_POST['by_label'];
|
@@ -40,9 +43,11 @@ function EWD_UFAQ_UpdateOptions() {
|
|
40 |
$Custom_CSS = stripslashes_deep($Custom_CSS);
|
41 |
|
42 |
if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
46 |
if (isset($_POST['reveal_effect'])) {update_option('EWD_UFAQ_Reveal_Effect', $Reveal_Effect);}
|
47 |
if (isset($_POST['group_by_category'])) {update_option('EWD_UFAQ_Group_By_Category', $Group_By_Category);}
|
48 |
if (isset($_POST['group_by_order_by'])) {update_option('EWD_UFAQ_Group_By_Order_By', $Group_By_Order_By);}
|
@@ -57,6 +62,10 @@ function EWD_UFAQ_UpdateOptions() {
|
|
57 |
if (isset($_POST['allow_proposed_answer'])) {update_option('EWD_UFAQ_Allow_Proposed_Answer', $Allow_Proposed_Answer);}
|
58 |
if (isset($_POST['display_author'])) {update_option('EWD_UFAQ_Display_Author', $Display_Author);}
|
59 |
if (isset($_POST['display_date'])) {update_option('EWD_UFAQ_Display_Date', $Display_Date);}
|
|
|
|
|
|
|
|
|
60 |
|
61 |
if (isset($_POST['posted_label'])) {update_option('EWD_UFAQ_Posted_Label', $Posted_Label);}
|
62 |
if (isset($_POST['by_label'])) {update_option('EWD_UFAQ_By_Label', $By_Label);}
|
@@ -64,6 +73,18 @@ function EWD_UFAQ_UpdateOptions() {
|
|
64 |
if (isset($_POST['category_label'])) {update_option('EWD_UFAQ_Category_Label', $Category_Label);}
|
65 |
if (isset($_POST['tag_label'])) {update_option('EWD_UFAQ_Tag_Label', $Tag_Label);}
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
if (isset($_POST['ufaq_styling_question_font'])) {update_option('EWD_UFAQ_Styling_Question_Font', $_POST['ufaq_styling_question_font']);}
|
68 |
if (isset($_POST['ufaq_styling_question_font_size'])) {update_option('EWD_UFAQ_Styling_Question_Font_Size', $_POST['ufaq_styling_question_font_size']);}
|
69 |
if (isset($_POST['ufaq_styling_question_font_color'])) {update_option('EWD_UFAQ_Styling_Question_Font_Color', $_POST['ufaq_styling_question_font_color']);}
|
@@ -85,7 +106,6 @@ function EWD_UFAQ_UpdateOptions() {
|
|
85 |
if (isset($_POST['ufaq_styling_category_margin'])) {update_option('EWD_UFAQ_Styling_Category_Margin', $_POST['ufaq_styling_category_margin']);}
|
86 |
if (isset($_POST['ufaq_styling_category_padding'])) {update_option('EWD_UFAQ_Styling_Category_Padding', $_POST['ufaq_styling_category_padding']);}
|
87 |
|
88 |
-
|
89 |
if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
|
90 |
|
91 |
if ($_POST['Pretty_Permalinks'] == "Yes") {
|
11 |
add_action('save_post_ufaq', 'EWD_UFAQ_Add_Post_Order_Meta');
|
12 |
|
13 |
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'];
|
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'];
|
43 |
$Custom_CSS = stripslashes_deep($Custom_CSS);
|
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['faq_accordion'])) {update_option('EWD_UFAQ_FAQ_Accordion', $FAQ_Accordion);}
|
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', $Hide_Categories);}
|
50 |
+
if (isset($_POST['hide_tags'])) {update_option('EWD_UFAQ_Hide_Tags', $Hide_Tags);}
|
51 |
if (isset($_POST['reveal_effect'])) {update_option('EWD_UFAQ_Reveal_Effect', $Reveal_Effect);}
|
52 |
if (isset($_POST['group_by_category'])) {update_option('EWD_UFAQ_Group_By_Category', $Group_By_Category);}
|
53 |
if (isset($_POST['group_by_order_by'])) {update_option('EWD_UFAQ_Group_By_Order_By', $Group_By_Order_By);}
|
62 |
if (isset($_POST['allow_proposed_answer'])) {update_option('EWD_UFAQ_Allow_Proposed_Answer', $Allow_Proposed_Answer);}
|
63 |
if (isset($_POST['display_author'])) {update_option('EWD_UFAQ_Display_Author', $Display_Author);}
|
64 |
if (isset($_POST['display_date'])) {update_option('EWD_UFAQ_Display_Date', $Display_Date);}
|
65 |
+
if (isset($_POST['display_back_to_top'])) {update_option('EWD_UFAQ_Display_Back_To_Top', $Display_Back_To_Top);}
|
66 |
+
|
67 |
+
if (isset($_POST['display_style']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Display_Style', $_POST['display_style']);}
|
68 |
+
if (isset($_POST['color_block_shape']) and $UFAQ_Full_Version == "Yes") {update_option('EWD_UFAQ_Color_Block_Shape', $_POST['color_block_shape']);}
|
69 |
|
70 |
if (isset($_POST['posted_label'])) {update_option('EWD_UFAQ_Posted_Label', $Posted_Label);}
|
71 |
if (isset($_POST['by_label'])) {update_option('EWD_UFAQ_By_Label', $By_Label);}
|
73 |
if (isset($_POST['category_label'])) {update_option('EWD_UFAQ_Category_Label', $Category_Label);}
|
74 |
if (isset($_POST['tag_label'])) {update_option('EWD_UFAQ_Tag_Label', $Tag_Label);}
|
75 |
|
76 |
+
if (isset($_POST['ufaq_styling_default_bg_color'])) {update_option('EWD_UFAQ_Styling_Default_Bg_Color', $_POST['ufaq_styling_default_bg_color']);}
|
77 |
+
if (isset($_POST['ufaq_styling_default_font_color'])) {update_option('EWD_UFAQ_Styling_Default_Font_Color', $_POST['ufaq_styling_default_font_color']);}
|
78 |
+
if (isset($_POST['ufaq_styling_default_border'])) {update_option('EWD_UFAQ_Styling_Default_Border', $_POST['ufaq_styling_default_border']);}
|
79 |
+
if (isset($_POST['ufaq_styling_default_border_radius'])) {update_option('EWD_UFAQ_Styling_Default_Border_Radius', $_POST['ufaq_styling_default_border_radius']);}
|
80 |
+
if (isset($_POST['ufaq_styling_block_bg_color'])) {update_option('EWD_UFAQ_Styling_Block_Bg_Color', $_POST['ufaq_styling_block_bg_color']);}
|
81 |
+
if (isset($_POST['ufaq_styling_block_font_color'])) {update_option('EWD_UFAQ_Styling_Block_Font_Color', $_POST['ufaq_styling_block_font_color']);}
|
82 |
+
if (isset($_POST['ufaq_styling_list_font'])) {update_option('EWD_UFAQ_Styling_List_Font', $_POST['ufaq_styling_list_font']);}
|
83 |
+
if (isset($_POST['ufaq_styling_list_font_size'])) {update_option('EWD_UFAQ_Styling_List_Font_Size', $_POST['ufaq_styling_list_font_size']);}
|
84 |
+
if (isset($_POST['ufaq_styling_list_font_color'])) {update_option('EWD_UFAQ_Styling_List_Font_Color', $_POST['ufaq_styling_list_font_color']);}
|
85 |
+
if (isset($_POST['ufaq_styling_list_margin'])) {update_option('EWD_UFAQ_Styling_List_Margin', $_POST['ufaq_styling_list_margin']);}
|
86 |
+
if (isset($_POST['ufaq_styling_list_padding'])) {update_option('EWD_UFAQ_Styling_List_Padding', $_POST['ufaq_styling_list_padding']);}
|
87 |
+
|
88 |
if (isset($_POST['ufaq_styling_question_font'])) {update_option('EWD_UFAQ_Styling_Question_Font', $_POST['ufaq_styling_question_font']);}
|
89 |
if (isset($_POST['ufaq_styling_question_font_size'])) {update_option('EWD_UFAQ_Styling_Question_Font_Size', $_POST['ufaq_styling_question_font_size']);}
|
90 |
if (isset($_POST['ufaq_styling_question_font_color'])) {update_option('EWD_UFAQ_Styling_Question_Font_Color', $_POST['ufaq_styling_question_font_color']);}
|
106 |
if (isset($_POST['ufaq_styling_category_margin'])) {update_option('EWD_UFAQ_Styling_Category_Margin', $_POST['ufaq_styling_category_margin']);}
|
107 |
if (isset($_POST['ufaq_styling_category_padding'])) {update_option('EWD_UFAQ_Styling_Category_Padding', $_POST['ufaq_styling_category_padding']);}
|
108 |
|
|
|
109 |
if (isset($_POST['custom_css'])) {update_option('EWD_UFAQ_Custom_CSS', $Custom_CSS);}
|
110 |
|
111 |
if ($_POST['Pretty_Permalinks'] == "Yes") {
|
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.0
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
14 |
global $UFAQ_Full_Version;
|
15 |
global $EWD_UFAQ_Version;
|
16 |
|
17 |
-
$EWD_UFAQ_Version = '1.0
|
18 |
|
19 |
define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
20 |
define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
@@ -77,6 +77,7 @@ function Add_EWD_UFAQ_FrontEnd_Scripts() {
|
|
77 |
|
78 |
wp_enqueue_script("jquery-ui-core");
|
79 |
wp_enqueue_script("jquery-effects-core");
|
|
|
80 |
|
81 |
wp_enqueue_script("jquery-effects-blind");
|
82 |
wp_enqueue_script("jquery-effects-bounce");
|
@@ -119,6 +120,12 @@ function Set_EWD_UFAQ_Options() {
|
|
119 |
if (get_option("EWD_UFAQ_Group_By_Order") == "") {update_option("EWD_UFAQ_Group_By_Order", "ASC");}
|
120 |
if (get_option("EWD_UFAQ_Order_By") == "") {update_option("EWD_UFAQ_Order_By", "date");}
|
121 |
if (get_option("EWD_UFAQ_Order") == "") {update_option("EWD_UFAQ_Order", "DESC");}
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
}
|
123 |
|
124 |
$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.0
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
14 |
global $UFAQ_Full_Version;
|
15 |
global $EWD_UFAQ_Version;
|
16 |
|
17 |
+
$EWD_UFAQ_Version = '1.1.0';
|
18 |
|
19 |
define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
20 |
define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
77 |
|
78 |
wp_enqueue_script("jquery-ui-core");
|
79 |
wp_enqueue_script("jquery-effects-core");
|
80 |
+
wp_enqueue_script('jquery-ui-autocomplete');
|
81 |
|
82 |
wp_enqueue_script("jquery-effects-blind");
|
83 |
wp_enqueue_script("jquery-effects-bounce");
|
120 |
if (get_option("EWD_UFAQ_Group_By_Order") == "") {update_option("EWD_UFAQ_Group_By_Order", "ASC");}
|
121 |
if (get_option("EWD_UFAQ_Order_By") == "") {update_option("EWD_UFAQ_Order_By", "date");}
|
122 |
if (get_option("EWD_UFAQ_Order") == "") {update_option("EWD_UFAQ_Order", "DESC");}
|
123 |
+
|
124 |
+
if (get_option("EWD_UFAQ_Toggle") == "") {update_option("EWD_UFAQ_Toggle", "Yes");}
|
125 |
+
if (get_option("EWD_UFAQ_Display_Back_To_Top") == "") {update_option("EWD_UFAQ_Display_Back_To_Top", "No");}
|
126 |
+
if (get_option("EWD_UFAQ_Display_Style") == "") {update_option("EWD_UFAQ_Display_Style", "Default");}
|
127 |
+
if (get_option("EWD_UFAQ_Color_Block_Shape") == "") {update_option("EWD_UFAQ_Color_Block_Shape", "Square");}
|
128 |
+
if (get_option("FAQ_Auto_Complete_Titles") == "") {update_option("FAQ_Auto_Complete_Titles", "Yes");}
|
129 |
}
|
130 |
|
131 |
$UFAQ_Full_Version = get_option("EWD_UFAQ_Full_Version");
|
Shortcodes/DisplayFAQs.php
CHANGED
@@ -6,6 +6,7 @@ function Display_FAQs($atts) {
|
|
6 |
|
7 |
$current_url = $_SERVER['REQUEST_URI'];
|
8 |
$Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
|
|
|
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");
|
@@ -16,6 +17,8 @@ function Display_FAQs($atts) {
|
|
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 |
$Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
20 |
$Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
|
21 |
$Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
|
@@ -23,6 +26,7 @@ function Display_FAQs($atts) {
|
|
23 |
$Socialmedia = explode(",", $Socialmedia_String);
|
24 |
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
25 |
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
|
|
26 |
|
27 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
28 |
if ($Posted_Label == "") {$Posted_Label = __("Posted ", 'EWD_UFAQ');}
|
@@ -32,8 +36,13 @@ function Display_FAQs($atts) {
|
|
32 |
if ($On_Label == "") {$On_Label = __("on ", 'EWD_UFAQ');}
|
33 |
$Category_Label = get_option("EWD_UFAQ_Category_Label");
|
34 |
$Tag_Label = get_option("EWD_UFAQ_Tag_Label");
|
|
|
|
|
|
|
35 |
|
36 |
$ReturnString = "";
|
|
|
|
|
37 |
|
38 |
// Get the attributes passed by the shortcode, and store them in new variables for processing
|
39 |
extract( shortcode_atts( array(
|
@@ -43,6 +52,7 @@ function Display_FAQs($atts) {
|
|
43 |
'orderby' => "",
|
44 |
'order' => "",
|
45 |
'ajax' => "No",
|
|
|
46 |
'post_count'=>-1),
|
47 |
$atts
|
48 |
)
|
@@ -99,6 +109,7 @@ function Display_FAQs($atts) {
|
|
99 |
}
|
100 |
|
101 |
$ReturnString .= "<div class='ufaq-faq-list' id='ufaq-faq-list'>";
|
|
|
102 |
|
103 |
if (get_query_var('single_faq') != "") {
|
104 |
$FAQ = get_page_by_path(get_query_var('single_faq'),OBJECT,'ufaq');
|
@@ -117,6 +128,10 @@ function Display_FAQs($atts) {
|
|
117 |
$ReturnString .= "var reveal_effect = '" . $Reveal_Effect . "';";
|
118 |
$ReturnString .= "</script>";
|
119 |
|
|
|
|
|
|
|
|
|
120 |
$Counter = 0;
|
121 |
foreach ($Category_Array as $Category) {
|
122 |
|
@@ -146,6 +161,11 @@ function Display_FAQs($atts) {
|
|
146 |
$ReturnString .= "<div class='ufaq-faq-category-title'>";
|
147 |
$ReturnString .= "<h4>" . $Category->name . "</h4>";
|
148 |
$ReturnString .= "</div>";
|
|
|
|
|
|
|
|
|
|
|
149 |
}
|
150 |
|
151 |
foreach ($faqs as $faq) {
|
@@ -155,15 +175,20 @@ function Display_FAQs($atts) {
|
|
155 |
|
156 |
if ($Pretty_Permalinks == "Yes") {$FAQ_Permalink = get_the_permalink() . "single-faq/" . $faq->post_name;}
|
157 |
else {$FAQ_Permalink = get_the_permalink() . "?Display_FAQ=" . $faq->ID;}
|
|
|
|
|
|
|
158 |
|
159 |
-
$ReturnString .= "<div class='ufaq-faq-div
|
160 |
-
|
|
|
|
|
161 |
|
162 |
-
$ReturnString .= "<div class='ufaq-faq-title' id='ufaq-title-" . $faq->ID . "' data-postid='" . $faq->ID . "-" . $Counter . "'
|
163 |
-
$ReturnString .= "<
|
164 |
-
$ReturnString .= "<
|
165 |
$ReturnString .= "</div>";
|
166 |
-
|
167 |
if (strlen($faq->post_excerpt) > 0) {$ReturnString .= "<div class='ufaq-faq-excerpt' id='ufaq-excerpt-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_excerpt)) . "</div>";}
|
168 |
$ReturnString .= "<div class='ufaq-faq-body ";
|
169 |
if ($Display_All_Answers != "Yes") {$ReturnString .= "ewd-ufaq-hidden";}
|
@@ -233,6 +258,14 @@ function Display_FAQs($atts) {
|
|
233 |
$ReturnString .= "</a>";
|
234 |
$ReturnString .= "</div>";
|
235 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
|
237 |
$ReturnString .= "</div>";
|
238 |
$ReturnString .= "</div>";
|
@@ -243,9 +276,23 @@ function Display_FAQs($atts) {
|
|
243 |
|
244 |
if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and sizeOf($faqs) > 0) {
|
245 |
$ReturnString .= "</div>";
|
|
|
246 |
}
|
247 |
}
|
248 |
$ReturnString .= "</div>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
|
250 |
return $ReturnString;
|
251 |
}
|
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");
|
17 |
$Order_By_Setting = get_option("EWD_UFAQ_Order_By");
|
18 |
$Order_Setting = get_option("EWD_UFAQ_Order");
|
19 |
$Include_Permalink = get_option("EWD_UFAQ_Include_Permalink");
|
20 |
+
$Display_Style = get_option("EWD_UFAQ_Display_Style");
|
21 |
+
$Color_Block_Shape = get_option("EWD_UFAQ_Color_Block_Shape");
|
22 |
$Pretty_Permalinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
23 |
$Display_All_Answers = get_option("EWD_UFAQ_Display_All_Answers");
|
24 |
$Scroll_To_Top = get_option("EWD_UFAQ_Scroll_To_Top");
|
26 |
$Socialmedia = explode(",", $Socialmedia_String);
|
27 |
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
28 |
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
29 |
+
$Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
|
30 |
|
31 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
32 |
if ($Posted_Label == "") {$Posted_Label = __("Posted ", 'EWD_UFAQ');}
|
36 |
if ($On_Label == "") {$On_Label = __("on ", 'EWD_UFAQ');}
|
37 |
$Category_Label = get_option("EWD_UFAQ_Category_Label");
|
38 |
$Tag_Label = get_option("EWD_UFAQ_Tag_Label");
|
39 |
+
|
40 |
+
if ($Display_Style != "Color_Block") {$Color_Block_Shape = "";}
|
41 |
+
else {$Color_Block_Shape = "ewd-ufaq-" . $Color_Block_Shape;}
|
42 |
|
43 |
$ReturnString = "";
|
44 |
+
$HeaderString = "";
|
45 |
+
$TitlesArray = array();
|
46 |
|
47 |
// Get the attributes passed by the shortcode, and store them in new variables for processing
|
48 |
extract( shortcode_atts( array(
|
52 |
'orderby' => "",
|
53 |
'order' => "",
|
54 |
'ajax' => "No",
|
55 |
+
'only_titles' => "No",
|
56 |
'post_count'=>-1),
|
57 |
$atts
|
58 |
)
|
109 |
}
|
110 |
|
111 |
$ReturnString .= "<div class='ufaq-faq-list' id='ufaq-faq-list'>";
|
112 |
+
$HeaderString .= "<div class='ufaq-faq-header'>";
|
113 |
|
114 |
if (get_query_var('single_faq') != "") {
|
115 |
$FAQ = get_page_by_path(get_query_var('single_faq'),OBJECT,'ufaq');
|
128 |
$ReturnString .= "var reveal_effect = '" . $Reveal_Effect . "';";
|
129 |
$ReturnString .= "</script>";
|
130 |
|
131 |
+
if ($Display_Style == "List") {
|
132 |
+
$ReturnString .= "%LIST_HEADER_PLACEHOLDER%";
|
133 |
+
}
|
134 |
+
|
135 |
$Counter = 0;
|
136 |
foreach ($Category_Array as $Category) {
|
137 |
|
161 |
$ReturnString .= "<div class='ufaq-faq-category-title'>";
|
162 |
$ReturnString .= "<h4>" . $Category->name . "</h4>";
|
163 |
$ReturnString .= "</div>";
|
164 |
+
|
165 |
+
$HeaderString .= "<div class='ufaq-faq-header-category'>";
|
166 |
+
$HeaderString .= "<div class='ufaq-faq-header-category-title' data-categoryid='" . $Category->term_id . "'>";
|
167 |
+
$HeaderString .= "<h4>" . $Category->name . "</h4>";
|
168 |
+
$HeaderString .= "</div>";
|
169 |
}
|
170 |
|
171 |
foreach ($faqs as $faq) {
|
175 |
|
176 |
if ($Pretty_Permalinks == "Yes") {$FAQ_Permalink = get_the_permalink() . "single-faq/" . $faq->post_name;}
|
177 |
else {$FAQ_Permalink = get_the_permalink() . "?Display_FAQ=" . $faq->ID;}
|
178 |
+
|
179 |
+
$TitlesArray[] = json_encode($faq->post_title);
|
180 |
+
$HeaderString .= "<div class='ufaq-faq-header-title'><a href='' class='ufaq-faq-header-link' data-postid='" . $faq->ID . "-" . $Counter . "'>" . $faq->post_title . "</a></div>";
|
181 |
|
182 |
+
$ReturnString .= "<div class='ufaq-faq-div ufaq-faq-display-style-" . $Display_Style;
|
183 |
+
if($FAQ_Toggle != "No"){$ReturnString .= " ufaq-faq-toggle'";}
|
184 |
+
else {$ReturnString .= "'";}
|
185 |
+
$ReturnString .= " id='ufaq-post-" . $faq->ID . "-" . $Counter . "' data-postid='" . $faq->ID . "-" . $Counter . "'>";
|
186 |
|
187 |
+
$ReturnString .= "<div class='ufaq-faq-title' id='ufaq-title-" . $faq->ID . "' data-postid='" . $faq->ID . "-" . $Counter . "'>";
|
188 |
+
$ReturnString .= "<a class='ewd-ufaq-post-margin' href='" . get_permalink($faq->ID) . "'><div class='ewd-ufaq-post-margin-symbol " . $Color_Block_Shape . "' id='ewd-ufaq-post-margin-symbol-" . $faq->ID . "-" . $Counter . "'><span id='ewd-ufaq-post-symbol-" . $faq->ID . "-" . $Counter . "'> + </span></div>";
|
189 |
+
$ReturnString .= "<div class='ufaq-faq-title-text'><h4>" .$faq->post_title . "</h4></div><div class='ewd-ufaq-clear'></div></a>";
|
190 |
$ReturnString .= "</div>";
|
191 |
+
|
192 |
if (strlen($faq->post_excerpt) > 0) {$ReturnString .= "<div class='ufaq-faq-excerpt' id='ufaq-excerpt-" . $faq->ID . "'>" . apply_filters('the_content', html_entity_decode($faq->post_excerpt)) . "</div>";}
|
193 |
$ReturnString .= "<div class='ufaq-faq-body ";
|
194 |
if ($Display_All_Answers != "Yes") {$ReturnString .= "ewd-ufaq-hidden";}
|
258 |
$ReturnString .= "</a>";
|
259 |
$ReturnString .= "</div>";
|
260 |
}
|
261 |
+
|
262 |
+
if ($Display_Back_To_Top == "Yes") {
|
263 |
+
$ReturnString .= "<div class='ufaq-back-to-top'>";
|
264 |
+
$ReturnString .= "<a class='ufaq-back-to-top-link'>";
|
265 |
+
$ReturnString .= __("Back to Top", 'EWD_UFAQ');
|
266 |
+
$ReturnString .= "</a>";
|
267 |
+
$ReturnString .= "</div>";
|
268 |
+
}
|
269 |
|
270 |
$ReturnString .= "</div>";
|
271 |
$ReturnString .= "</div>";
|
276 |
|
277 |
if ($Category != "EWD_UFAQ_ALL_CATEGORIES" and sizeOf($faqs) > 0) {
|
278 |
$ReturnString .= "</div>";
|
279 |
+
$HeaderString .= "</div>";
|
280 |
}
|
281 |
}
|
282 |
$ReturnString .= "</div>";
|
283 |
+
$HeaderString .= "</div>";
|
284 |
+
|
285 |
+
$ReturnString = str_replace("%LIST_HEADER_PLACEHOLDER%", $HeaderString, $ReturnString);
|
286 |
+
|
287 |
+
if ($only_titles == "Yes") {
|
288 |
+
$UniqueTitles = array_unique($TitlesArray);
|
289 |
+
$TitlesString = "";
|
290 |
+
foreach ($UniqueTitles as $Title) {
|
291 |
+
$TitlesString .= $Title . ",";
|
292 |
+
}
|
293 |
+
if ($TitlesString != "") {$TitlesString = substr($TitlesString, 0, -1);}
|
294 |
+
return $TitlesString;
|
295 |
+
}
|
296 |
|
297 |
return $ReturnString;
|
298 |
}
|
Shortcodes/Display_FAQ_Search.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
function UFAQ_AJAX_Search($atts) {
|
4 |
global $wp;
|
5 |
-
|
6 |
$current_url = $_SERVER['REQUEST_URI'];
|
7 |
$ReturnString = "";
|
8 |
|
@@ -17,9 +17,23 @@ function UFAQ_AJAX_Search($atts) {
|
|
17 |
)
|
18 |
);
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$ReturnString .= "<form action='#' method='post' id='ufaq-ajax-form' class='pure-form pure-form-aligned'>";
|
21 |
$ReturnString .= "<input type='hidden' name='ufaq-input' value='Search'>";
|
22 |
-
$ReturnString .= "<div class='pure-control-group'>";
|
23 |
$ReturnString .= "<label id='ufaq-ajax-search-lbl' class='ewd-otp-field-label ewd-otp-bold'>" . __('Enter your question:', "EWD_UFAQ") . "</label>";
|
24 |
$ReturnString .= "<input type='hidden' name'include_category' value='" . $include_category . "' id='ufaq-include-category' />";
|
25 |
$ReturnString .= "<input type='hidden' name'exclude_category' value='" . $exclude_category . "' id='ufaq-exclude-category' />";
|
@@ -28,7 +42,7 @@ function UFAQ_AJAX_Search($atts) {
|
|
28 |
$ReturnString .= "<input type='hidden' name'post_count' value='" . $post_count . "' id='ufaq-post-count' />";
|
29 |
$ReturnString .= "<input type='text' id='ufaq-ajax-text-input' class='ufaq-text-input' name='Question ' placeholder='" . __('Enter your question...', "EWD_UFAQ") . "'>";
|
30 |
$ReturnString .= "</div>";
|
31 |
-
$ReturnString .= "<label for='Submit'></label><input type='button' id='ufaq-ajax-search-btn' class='ewd-otp-submit pure-button pure-button-primary' name='Search' value='" . __('Search', "EWD_UFAQ") . "'>";
|
32 |
$ReturnString .= "</form>";
|
33 |
|
34 |
$ReturnString .= "<div id='ufaq-ajax-results'></div>";
|
2 |
|
3 |
function UFAQ_AJAX_Search($atts) {
|
4 |
global $wp;
|
5 |
+
$Auto_Complete_Titles = get_option("EWD_UFAQ_Auto_Complete_Titles");
|
6 |
$current_url = $_SERVER['REQUEST_URI'];
|
7 |
$ReturnString = "";
|
8 |
|
17 |
)
|
18 |
);
|
19 |
|
20 |
+
$ReturnString .= "<style type='text/css'>";
|
21 |
+
$ReturnString .= ".ui-autocomplete {background:#FFF; border: #000 solid 1px; max-width:400px; max-height:200px; overflow:auto;}";
|
22 |
+
$ReturnString .= $Custom_CSS;
|
23 |
+
$ReturnString .= "</style>";
|
24 |
+
|
25 |
+
if ($Auto_Complete_Titles == "Yes") {
|
26 |
+
$ReturnString .= "<script>";
|
27 |
+
$ReturnString .= "var autocompleteQuestion = 'Yes';\n";
|
28 |
+
$ReturnString .= "var questionTitles = [";
|
29 |
+
$ReturnString .= do_shortcode("[ultimate-faqs include_category='" . $include_category . "' exclude_category='" . $exclude_category . "' orderby='" . $orderby . "' order='" . $order . "' post_count='" . $post_count . "' only_titles='Yes']");
|
30 |
+
$ReturnString .= "];\n";
|
31 |
+
$ReturnString .= "</script>";
|
32 |
+
}
|
33 |
+
|
34 |
$ReturnString .= "<form action='#' method='post' id='ufaq-ajax-form' class='pure-form pure-form-aligned'>";
|
35 |
$ReturnString .= "<input type='hidden' name='ufaq-input' value='Search'>";
|
36 |
+
$ReturnString .= "<div id='ewd-ufaq-jquery-ajax-search' class='pure-control-group ui-front' style='position:relative;'>";
|
37 |
$ReturnString .= "<label id='ufaq-ajax-search-lbl' class='ewd-otp-field-label ewd-otp-bold'>" . __('Enter your question:', "EWD_UFAQ") . "</label>";
|
38 |
$ReturnString .= "<input type='hidden' name'include_category' value='" . $include_category . "' id='ufaq-include-category' />";
|
39 |
$ReturnString .= "<input type='hidden' name'exclude_category' value='" . $exclude_category . "' id='ufaq-exclude-category' />";
|
42 |
$ReturnString .= "<input type='hidden' name'post_count' value='" . $post_count . "' id='ufaq-post-count' />";
|
43 |
$ReturnString .= "<input type='text' id='ufaq-ajax-text-input' class='ufaq-text-input' name='Question ' placeholder='" . __('Enter your question...', "EWD_UFAQ") . "'>";
|
44 |
$ReturnString .= "</div>";
|
45 |
+
if ($Auto_Complete_Titles != "Yes") {$ReturnString .= "<label for='Submit'></label><input type='button' id='ufaq-ajax-search-btn' class='ewd-otp-submit pure-button pure-button-primary' name='Search' value='" . __('Search', "EWD_UFAQ") . "'>";}
|
46 |
$ReturnString .= "</form>";
|
47 |
|
48 |
$ReturnString .= "<div id='ufaq-ajax-results'></div>";
|
css/Admin.css
CHANGED
@@ -139,8 +139,7 @@ FLEXBOX STYLING
|
|
139 |
|
140 |
.ufaq-options-page-tabbed input[type=text],
|
141 |
.ufaq-styling-page-tabbed input[type=text] {
|
142 |
-
|
143 |
-
max-width:130px;
|
144 |
}
|
145 |
.ufaq-options-page-tabbed select,
|
146 |
.ufaq-options-page-tabbed textarea
|
139 |
|
140 |
.ufaq-options-page-tabbed input[type=text],
|
141 |
.ufaq-styling-page-tabbed input[type=text] {
|
142 |
+
|
|
|
143 |
}
|
144 |
.ufaq-options-page-tabbed select,
|
145 |
.ufaq-options-page-tabbed textarea
|
css/ewd-ufaq-styles.css
CHANGED
@@ -6,9 +6,7 @@
|
|
6 |
clear:both;
|
7 |
}
|
8 |
|
9 |
-
|
10 |
.ewd-ufaq-post-margin{
|
11 |
-
margin-left: 10px;
|
12 |
text-decoration: none;
|
13 |
}
|
14 |
|
@@ -28,7 +26,6 @@
|
|
28 |
}
|
29 |
|
30 |
.ewd-ufaq-author-date {
|
31 |
-
margin: 10px;
|
32 |
}
|
33 |
|
34 |
.ewd-ufaq-author {
|
@@ -38,10 +35,110 @@
|
|
38 |
font-weight: 600;
|
39 |
}
|
40 |
.ufaq-faq-categories, .ufaq-faq-tags{
|
41 |
-
margin-left:10px;
|
42 |
}
|
43 |
|
44 |
.ufaq {}
|
45 |
/*.ufaq-faq-title {
|
46 |
cursor:pointer;
|
47 |
-
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
clear:both;
|
7 |
}
|
8 |
|
|
|
9 |
.ewd-ufaq-post-margin{
|
|
|
10 |
text-decoration: none;
|
11 |
}
|
12 |
|
26 |
}
|
27 |
|
28 |
.ewd-ufaq-author-date {
|
|
|
29 |
}
|
30 |
|
31 |
.ewd-ufaq-author {
|
35 |
font-weight: 600;
|
36 |
}
|
37 |
.ufaq-faq-categories, .ufaq-faq-tags{
|
|
|
38 |
}
|
39 |
|
40 |
.ufaq {}
|
41 |
/*.ufaq-faq-title {
|
42 |
cursor:pointer;
|
43 |
+
}*/
|
44 |
+
.ufaq-faq-category-title {
|
45 |
+
width: 100%;
|
46 |
+
clear: both;
|
47 |
+
}
|
48 |
+
.ufaq-faq-body {
|
49 |
+
padding:10px 25px;
|
50 |
+
padding-left: 55px;
|
51 |
+
}
|
52 |
+
.ufaq-faq-search{
|
53 |
+
margin:5px 0 !important;
|
54 |
+
}
|
55 |
+
.ewd-otp-field-label{
|
56 |
+
width: auto !important;
|
57 |
+
}
|
58 |
+
.ufaq-text-input {
|
59 |
+
border-radius: 0 !important;
|
60 |
+
margin:15px !important;
|
61 |
+
}
|
62 |
+
.ewd-ufaq-submit{
|
63 |
+
border-radius: 0 !important;
|
64 |
+
}
|
65 |
+
.ufaq-faq-header{
|
66 |
+
margin:10px;
|
67 |
+
}
|
68 |
+
.ufaq-faq-header a:hover{
|
69 |
+
text-decoration: none;
|
70 |
+
}
|
71 |
+
.ewd-ufaq-post-margin-symbol{
|
72 |
+
display: inline-block;
|
73 |
+
float: left;
|
74 |
+
text-align: center;
|
75 |
+
width:35px;
|
76 |
+
height: 35px;
|
77 |
+
margin-right: 15px;
|
78 |
+
padding: 2px 0px 0px 2px;
|
79 |
+
line-height: 1;
|
80 |
+
}
|
81 |
+
.ewd-ufaq-post-margin-symbol span{
|
82 |
+
display: inline-block;
|
83 |
+
font-size: 30px;
|
84 |
+
margin:0 auto;
|
85 |
+
}
|
86 |
+
.ufaq-faq-title-text {
|
87 |
+
float:left;
|
88 |
+
width: 90%;
|
89 |
+
}
|
90 |
+
.ufaq-faq-title h4 {
|
91 |
+
display:inline-block;
|
92 |
+
margin:5px !important;
|
93 |
+
}
|
94 |
+
/***********************
|
95 |
+
Color Block Style
|
96 |
+
***********************/
|
97 |
+
.ufaq-faq-display-style-Color_Block .ewd-ufaq-post-margin-symbol {
|
98 |
+
background-color: #1188cc;
|
99 |
+
color: #ffffff;
|
100 |
+
}
|
101 |
+
|
102 |
+
.ewd-ufaq-Circle {
|
103 |
+
border-radius: 18px;
|
104 |
+
}
|
105 |
+
|
106 |
+
.ewd-ufaq-Square {
|
107 |
+
border-radius: 0px;
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
/***********************
|
112 |
+
Block Style
|
113 |
+
***********************/
|
114 |
+
.ufaq-faq-div {
|
115 |
+
padding:5px 0;
|
116 |
+
clear: both;
|
117 |
+
}
|
118 |
+
.ufaq-faq-toggle:hover, .ufaq-faq-toggle a:hover{
|
119 |
+
cursor: pointer;
|
120 |
+
cursor: hand;
|
121 |
+
text-decoration: none;
|
122 |
+
}
|
123 |
+
.ufaq-faq-title{
|
124 |
+
}
|
125 |
+
.ufaq-faq-display-style-Block a, .ufaq-faq-display-style-Block a:visited, .ufaq-faq-display-style-Block a:active{
|
126 |
+
text-decoration: none;
|
127 |
+
}
|
128 |
+
.ufaq-faq-display-style-Block:hover, .ufaq-faq-display-style-Block:hover a, .ufaq-faq-display-style-Block:hover h4 {
|
129 |
+
text-decoration: none !important;
|
130 |
+
color:#fff !important;
|
131 |
+
background: #1188cc;
|
132 |
+
}
|
133 |
+
.ufaq-faq-display-style-Block.ewd-ufaq-post-active, .ufaq-faq-display-style-Block.ewd-ufaq-post-active a{
|
134 |
+
color:#fff !important;
|
135 |
+
background: #1188cc;
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
/***********************
|
140 |
+
List Style
|
141 |
+
***********************/
|
142 |
+
.ufaq-faq-header-title a{
|
143 |
+
display: inline-block;
|
144 |
+
}
|
html/OptionsPage.php
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
<?php
|
2 |
$Custom_CSS = get_option("EWD_UFAQ_Custom_CSS");
|
|
|
3 |
$FAQ_Accordion = get_option("EWD_UFAQ_FAQ_Accordion");
|
|
|
4 |
$Hide_Categories = get_option("EWD_UFAQ_Hide_Categories");
|
5 |
$Hide_Tags = get_option("EWD_UFAQ_Hide_Tags");
|
|
|
|
|
|
|
6 |
$Reveal_Effect = get_option("EWD_UFAQ_Reveal_Effect");
|
7 |
|
8 |
$Group_By_Category = get_option("EWD_UFAQ_Group_By_Category");
|
@@ -19,6 +24,7 @@
|
|
19 |
$Allow_Proposed_Answer = get_option("EWD_UFAQ_Allow_Proposed_Answer");
|
20 |
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
21 |
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
|
|
22 |
|
23 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
24 |
$By_Label = get_option("EWD_UFAQ_By_Label");
|
@@ -26,6 +32,18 @@
|
|
26 |
$Category_Label = get_option("EWD_UFAQ_Category_Label");
|
27 |
$Tag_Label = get_option("EWD_UFAQ_Tag_Label");
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$UFAQ_Styling_Question_Font = get_option("EWD_UFAQ_Styling_Question_Font");
|
30 |
$UFAQ_Styling_Question_Font_Size = get_option("EWD_UFAQ_Styling_Question_Font_Size");
|
31 |
$UFAQ_Styling_Question_Font_Color = get_option("EWD_UFAQ_Styling_Question_Font_Color");
|
@@ -76,12 +94,22 @@
|
|
76 |
</td>
|
77 |
</tr>
|
78 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
<th scope="row">FAQ Accordion</th>
|
80 |
<td>
|
81 |
<fieldset><legend class="screen-reader-text"><span>FAQ Accordion</span></legend>
|
82 |
<label title='Yes'><input type='radio' name='faq_accordion' value='Yes' <?php if($FAQ_Accordion == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
83 |
<label title='No'><input type='radio' name='faq_accordion' value='No' <?php if($FAQ_Accordion == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
84 |
-
<p>Should the FAQs accordion? (
|
85 |
</fieldset>
|
86 |
</td>
|
87 |
</tr>
|
@@ -123,7 +151,7 @@
|
|
123 |
<fieldset><legend class="screen-reader-text"><span>Display All Answers</span></legend>
|
124 |
<label title='Yes'><input type='radio' name='display_all_answers' value='Yes' <?php if($Display_All_Answers == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
125 |
<label title='No'><input type='radio' name='display_all_answers' value='No' <?php if($Display_All_Answers == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
126 |
-
<p>Should
|
127 |
</fieldset>
|
128 |
</td>
|
129 |
</tr>
|
@@ -148,6 +176,16 @@
|
|
148 |
</td>
|
149 |
</tr>
|
150 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
<th scope="row">Include Permalink Icon</th>
|
152 |
<td>
|
153 |
<fieldset><legend class="screen-reader-text"><span>Include Permalink Icon</span></legend>
|
@@ -164,6 +202,28 @@
|
|
164 |
<h2 id='label-premium-options' class='ufaq-options-page-tab-title'>Premium Options</h2>
|
165 |
<table class="form-table">
|
166 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
<th scope="row">Reveal Effect</th>
|
168 |
<td>
|
169 |
<fieldset><legend class="screen-reader-text"><span>Reveal Effect</span></legend>
|
@@ -211,6 +271,16 @@
|
|
211 |
</td>
|
212 |
</tr>
|
213 |
<tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
<th scope="row">Social Media Option</th>
|
215 |
<td>
|
216 |
<fieldset><legend class="screen-reader-text"><span>Social Media Option</span></legend>
|
@@ -404,30 +474,65 @@
|
|
404 |
<h2 id='label-order-options' class='ufaq-options-page-tab-title'>Styling Options</h2>
|
405 |
|
406 |
<div id='ufaq-styling-options' class="ufaq-options-div ufaq-options-flex">
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
<
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
<
|
415 |
-
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
</div>
|
418 |
-
<div class='ufaq-subsection
|
419 |
-
<div class='ufaq-subsection-header'>
|
420 |
<div class='ufaq-subsection-content'>
|
421 |
<div class='ufaq-option ufaq-styling-option'>
|
422 |
-
<div class='ufaq-option-label'>Background Color</div>
|
423 |
-
<div class='ufaq-option-input'><input type='text' name='
|
424 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
425 |
<div class='ufaq-option ufaq-styling-option'>
|
426 |
<div class='ufaq-option-label'>Font Color</div>
|
427 |
-
<div class='ufaq-option-input'><input type='text' name='
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
</div>
|
429 |
</div>
|
430 |
-
</div>
|
431 |
<div class='ufaq-subsection'>
|
432 |
<div class='ufaq-subsection-header'>FAQ Question</div>
|
433 |
<div class='ufaq-subsection-content'>
|
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");
|
24 |
$Allow_Proposed_Answer = get_option("EWD_UFAQ_Allow_Proposed_Answer");
|
25 |
$Display_Author = get_option("EWD_UFAQ_Display_Author");
|
26 |
$Display_Date = get_option("EWD_UFAQ_Display_Date");
|
27 |
+
$Display_Back_To_Top = get_option("EWD_UFAQ_Display_Back_To_Top");
|
28 |
|
29 |
$Posted_Label = get_option("EWD_UFAQ_Posted_Label");
|
30 |
$By_Label = get_option("EWD_UFAQ_By_Label");
|
32 |
$Category_Label = get_option("EWD_UFAQ_Category_Label");
|
33 |
$Tag_Label = get_option("EWD_UFAQ_Tag_Label");
|
34 |
|
35 |
+
$UFAQ_Styling_Default_Bg_Color = get_option("EWD_UFAQ_Styling_Default_Bg_Color");
|
36 |
+
$UFAQ_Styling_Default_Font_Color = get_option("EWD_UFAQ_Styling_Default_Font_Color");
|
37 |
+
$UFAQ_Styling_Default_Border = get_option("EWD_UFAQ_Styling_Default_Border");
|
38 |
+
$UFAQ_Styling_Default_Border_Radius = get_option("EWD_UFAQ_Styling_Default_Border_Radius");
|
39 |
+
$UFAQ_Styling_Block_Bg_Color = get_option("EWD_UFAQ_Styling_Block_Bg_Color");
|
40 |
+
$UFAQ_Styling_Block_Font_Color = get_option("EWD_UFAQ_Styling_Block_Font_Color");
|
41 |
+
$UFAQ_Styling_List_Font = get_option("EWD_UFAQ_Styling_List_Font");
|
42 |
+
$UFAQ_Styling_List_Font_Size = get_option("EWD_UFAQ_Styling_List_Font_Size");
|
43 |
+
$UFAQ_Styling_List_Font_Color = get_option("EWD_UFAQ_Styling_List_Font_Color");
|
44 |
+
$UFAQ_Styling_List_Margin = get_option("EWD_UFAQ_Styling_List_Margin");
|
45 |
+
$UFAQ_Styling_List_Padding = get_option("EWD_UFAQ_Styling_List_Padding");
|
46 |
+
|
47 |
$UFAQ_Styling_Question_Font = get_option("EWD_UFAQ_Styling_Question_Font");
|
48 |
$UFAQ_Styling_Question_Font_Size = get_option("EWD_UFAQ_Styling_Question_Font_Size");
|
49 |
$UFAQ_Styling_Question_Font_Color = get_option("EWD_UFAQ_Styling_Question_Font_Color");
|
94 |
</td>
|
95 |
</tr>
|
96 |
<tr>
|
97 |
+
<th scope="row">FAQ Toggle</th>
|
98 |
+
<td>
|
99 |
+
<fieldset><legend class="screen-reader-text"><span>FAQ Accordion</span></legend>
|
100 |
+
<label title='Yes'><input type='radio' name='faq_toggle' value='Yes' <?php if($FAQ_Toggle == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
101 |
+
<label title='No'><input type='radio' name='faq_toggle' value='No' <?php if($FAQ_Toggle == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
102 |
+
<p>Should the FAQs hide/open when they are clicked? </p>
|
103 |
+
</fieldset>
|
104 |
+
</td>
|
105 |
+
</tr>
|
106 |
+
<tr>
|
107 |
<th scope="row">FAQ Accordion</th>
|
108 |
<td>
|
109 |
<fieldset><legend class="screen-reader-text"><span>FAQ Accordion</span></legend>
|
110 |
<label title='Yes'><input type='radio' name='faq_accordion' value='Yes' <?php if($FAQ_Accordion == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
111 |
<label title='No'><input type='radio' name='faq_accordion' value='No' <?php if($FAQ_Accordion == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
112 |
+
<p>Should the FAQs accordion? (Only one FAQ is open at a time, requires FAQ Toggle)</p>
|
113 |
</fieldset>
|
114 |
</td>
|
115 |
</tr>
|
151 |
<fieldset><legend class="screen-reader-text"><span>Display All Answers</span></legend>
|
152 |
<label title='Yes'><input type='radio' name='display_all_answers' value='Yes' <?php if($Display_All_Answers == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
153 |
<label title='No'><input type='radio' name='display_all_answers' value='No' <?php if($Display_All_Answers == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
154 |
+
<p>Should all answers be displayed when the page loads? (Careful if FAQ Accordian is on)</p>
|
155 |
</fieldset>
|
156 |
</td>
|
157 |
</tr>
|
176 |
</td>
|
177 |
</tr>
|
178 |
<tr>
|
179 |
+
<th scope="row">Display 'Back to Top'</th>
|
180 |
+
<td>
|
181 |
+
<fieldset><legend class="screen-reader-text"><span>Display 'Back to Top'</span></legend>
|
182 |
+
<label title='Yes'><input type='radio' name='display_back_to_top' value='Yes' <?php if($Display_Back_To_Top == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
183 |
+
<label title='No'><input type='radio' name='display_back_to_top' value='No' <?php if($Display_Back_To_Top == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
184 |
+
<p>Should a link to return to the top of the page be added to each FAQ post?</p>
|
185 |
+
</fieldset>
|
186 |
+
</td>
|
187 |
+
</tr>
|
188 |
+
<tr>
|
189 |
<th scope="row">Include Permalink Icon</th>
|
190 |
<td>
|
191 |
<fieldset><legend class="screen-reader-text"><span>Include Permalink Icon</span></legend>
|
202 |
<h2 id='label-premium-options' class='ufaq-options-page-tab-title'>Premium Options</h2>
|
203 |
<table class="form-table">
|
204 |
<tr>
|
205 |
+
<th scope="row">FAQ Display Style</th>
|
206 |
+
<td>
|
207 |
+
<fieldset><legend class="screen-reader-text"><span>FAQ Display Style</span></legend>
|
208 |
+
<label title='Default Style'><input type='radio' name='display_style' value='Default' <?php if($Display_Style == "Default") {echo "checked='checked'";} ?> /> <span>Default</span></label><br />
|
209 |
+
<label title='Color Block Style'><input type='radio' name='display_style' value='Color_Block' <?php if($Display_Style == "Color_Block") {echo "checked='checked'";} ?> /> <span>Color Block</span></label><br />
|
210 |
+
<label title='Block Style'><input type='radio' name='display_style' value='Block' <?php if($Display_Style == "Block") {echo "checked='checked'";} ?> /> <span>Block</span></label><br />
|
211 |
+
<label title='List Style'><input type='radio' name='display_style' value='List' <?php if($Display_Style == "List") {echo "checked='checked'";} ?> /> <span>List</span></label><br />
|
212 |
+
<p>Which theme should be used to display the FAQ's?</p>
|
213 |
+
</fieldset>
|
214 |
+
</td>
|
215 |
+
</tr>
|
216 |
+
<tr>
|
217 |
+
<th scope="row">Color Block Shape</th>
|
218 |
+
<td>
|
219 |
+
<fieldset><legend class="screen-reader-text"><span>Color Block Shape</span></legend>
|
220 |
+
<label title='Square'><input type='radio' name='color_block_shape' value='Square' <?php if($Color_Block_Shape == "Square") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /> <span>Square</span></label><br />
|
221 |
+
<label title='Circle'><input type='radio' name='color_block_shape' value='Circle' <?php if($Color_Block_Shape == "Circle") {echo "checked='checked'";} ?> <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /> <span>Circle</span></label><br />
|
222 |
+
<p>If "Color Block" is selected for "FAQ Display Style", should the block be square or circle?</p>
|
223 |
+
</fieldset>
|
224 |
+
</td>
|
225 |
+
</tr>
|
226 |
+
<tr>
|
227 |
<th scope="row">Reveal Effect</th>
|
228 |
<td>
|
229 |
<fieldset><legend class="screen-reader-text"><span>Reveal Effect</span></legend>
|
271 |
</td>
|
272 |
</tr>
|
273 |
<tr>
|
274 |
+
<th scope="row">FAQ Auto Complete Titles</th>
|
275 |
+
<td>
|
276 |
+
<fieldset><legend class="screen-reader-text"><span>FAQ Auto Complete Titles</span></legend>
|
277 |
+
<label title='Yes'><input type='radio' name='faq_auto_complete_titles' value='Yes' <?php if($FAQ_Auto_Complete_Titles == "Yes") {echo "checked='checked'";} ?> /> <span>Yes</span></label><br />
|
278 |
+
<label title='No'><input type='radio' name='faq_auto_complete_titles' value='No' <?php if($FAQ_Auto_Complete_Titles == "No") {echo "checked='checked'";} ?> /> <span>No</span></label><br />
|
279 |
+
<p>Should the FAQ Titles auto complete? </p>
|
280 |
+
</fieldset>
|
281 |
+
</td>
|
282 |
+
</tr>
|
283 |
+
<tr>
|
284 |
<th scope="row">Social Media Option</th>
|
285 |
<td>
|
286 |
<fieldset><legend class="screen-reader-text"><span>Social Media Option</span></legend>
|
474 |
<h2 id='label-order-options' class='ufaq-options-page-tab-title'>Styling Options</h2>
|
475 |
|
476 |
<div id='ufaq-styling-options' class="ufaq-options-div ufaq-options-flex">
|
477 |
+
<div class='ufaq-subsection'>
|
478 |
+
<div class='ufaq-subsection-header'>Default Theme</div>
|
479 |
+
<div class='ufaq-subsection-content'>
|
480 |
+
<div class='ufaq-option ufaq-styling-option'>
|
481 |
+
<div class='ufaq-option-label'>Icon Background Color</div>
|
482 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_bg_color' value='<?php echo $UFAQ_Styling_Default_Bg_Color; ?>' /></div>
|
483 |
+
</div>
|
484 |
+
<div class='ufaq-option ufaq-styling-option'>
|
485 |
+
<div class='ufaq-option-label'>Icon Font Color</div>
|
486 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_font_color' value='<?php echo $UFAQ_Styling_Default_Font_Color; ?>' /></div>
|
487 |
+
</div>
|
488 |
+
<div class='ufaq-option ufaq-styling-option'>
|
489 |
+
<div class='ufaq-option-label'>Icon Border Color</div>
|
490 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_border' value='<?php echo $UFAQ_Styling_Default_Border_Color; ?>' /></div>
|
491 |
+
</div>
|
492 |
+
<div class='ufaq-option ufaq-styling-option'>
|
493 |
+
<div class='ufaq-option-label'>Icon Border Radius</div>
|
494 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_default_border_radius' value='<?php echo $UFAQ_Styling_Default_Border_Radius; ?>' /></div>
|
495 |
+
</div>
|
496 |
+
</div>
|
497 |
</div>
|
498 |
+
<div class='ufaq-subsection'>
|
499 |
+
<div class='ufaq-subsection-header'>Block Theme</div>
|
500 |
<div class='ufaq-subsection-content'>
|
501 |
<div class='ufaq-option ufaq-styling-option'>
|
502 |
+
<div class='ufaq-option-label'>Hover Background Color</div>
|
503 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_block_bg_color' value='<?php echo $UFAQ_Styling_Block_Bg_Color; ?>' /></div>
|
504 |
</div>
|
505 |
+
<div class='ufaq-option ufaq-styling-option'>
|
506 |
+
<div class='ufaq-option-label'>Hover Font Color</div>
|
507 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_block_font_color' value='<?php echo $UFAQ_Styling_Block_Font_Color; ?>' /></div>
|
508 |
+
</div>
|
509 |
+
</div>
|
510 |
+
</div>
|
511 |
+
<div class='ufaq-subsection'>
|
512 |
+
<div class='ufaq-subsection-header'>List Theme Anchors</div>
|
513 |
+
<div class='ufaq-subsection-content'>
|
514 |
+
<div class='ufaq-option ufaq-styling-option'>
|
515 |
+
<div class='ufaq-option-label'>Font Family</div>
|
516 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_list_font' value='<?php echo $UFAQ_Styling_List_Font; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
517 |
+
</div>
|
518 |
+
<div class='ufaq-option ufaq-styling-option'>
|
519 |
+
<div class='ufaq-option-label'>Font Size</div>
|
520 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_list_font_size' value='<?php echo $UFAQ_Styling_List_Font_Size; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
521 |
+
</div>
|
522 |
<div class='ufaq-option ufaq-styling-option'>
|
523 |
<div class='ufaq-option-label'>Font Color</div>
|
524 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_list_font_color' value='<?php echo $UFAQ_Styling_List_Font_Color; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
525 |
+
</div>
|
526 |
+
<div class='ufaq-option ufaq-styling-option'>
|
527 |
+
<div class='ufaq-option-label'>Margin</div>
|
528 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_list_margin' value='<?php echo $UFAQ_Styling_List_Margin; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
529 |
+
</div>
|
530 |
+
<div class='ufaq-option ufaq-styling-option'>
|
531 |
+
<div class='ufaq-option-label'>Padding</div>
|
532 |
+
<div class='ufaq-option-input'><input type='text' name='ufaq_styling_list_padding' value='<?php echo $UFAQ_Styling_List_Padding; ?>' <?php if ($UFAQ_Full_Version != "Yes") {echo "disabled";} ?> /></div>
|
533 |
</div>
|
534 |
</div>
|
535 |
+
</div>
|
536 |
<div class='ufaq-subsection'>
|
537 |
<div class='ufaq-subsection-header'>FAQ Question</div>
|
538 |
<div class='ufaq-subsection-content'>
|
js/ewd-ufaq-js.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
jQuery(function(){ //DOM Ready
|
2 |
ufaqSetClickHandlers();
|
|
|
3 |
});
|
4 |
|
5 |
function runEffect(display, post_id) {
|
@@ -17,12 +18,12 @@ function runEffect(display, post_id) {
|
|
17 |
|
18 |
// callback function to bring a hidden box back
|
19 |
function handleStyles(display, post_id) {
|
20 |
-
if (display == "show") {setTimeout(function() {jQuery('#ufaq-body-'+post_id).removeClass("ewd-ufaq-hidden");}, 500 );}
|
21 |
if (display == "hide") {setTimeout(function() {jQuery('#ufaq-body-'+post_id).addClass("ewd-ufaq-hidden");}, 500 );}
|
22 |
};
|
23 |
|
24 |
function ufaqSetClickHandlers() {
|
25 |
-
jQuery('.ufaq-faq-
|
26 |
var post_id = jQuery(this).attr("data-postid");
|
27 |
|
28 |
event.preventDefault();
|
@@ -36,40 +37,75 @@ function ufaqSetClickHandlers() {
|
|
36 |
EWD_UFAQ_Hide_FAQ(post_id);
|
37 |
}
|
38 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
function EWD_UFAQ_Reveal_FAQ(post_id, selectedIDString) {
|
42 |
var data = 'post_id=' + post_id + '&action=ufaq_record_view';
|
43 |
jQuery.post(ajaxurl, data, function(response) {});
|
44 |
|
45 |
-
jQuery('#ewd-ufaq-post-
|
46 |
|
47 |
jQuery('#ufaq-excerpt-'+post_id).addClass("ewd-ufaq-hidden");
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
if (faq_accordion) {
|
52 |
-
jQuery('.ufaq-faq-
|
53 |
-
if (jQuery(this).
|
54 |
-
jQuery(this).
|
55 |
-
|
56 |
-
|
57 |
-
});
|
58 |
-
|
59 |
-
jQuery('.ewd-ufaq-post-margin-symbol').each(function() {
|
60 |
-
if (jQuery(this).data("id") != post_id) {
|
61 |
-
jQuery(this).html('+ ');
|
62 |
}
|
63 |
});
|
64 |
}
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
function EWD_UFAQ_Hide_FAQ(post_id) {
|
68 |
jQuery('#ufaq-excerpt-'+post_id).removeClass("ewd-ufaq-hidden");
|
|
|
69 |
if (reveal_effect != "none") {runEffect("hide", post_id);}
|
70 |
else {jQuery('#ufaq-body-'+post_id).addClass("ewd-ufaq-hidden");}
|
71 |
-
|
72 |
-
jQuery('#ewd-ufaq-post-
|
73 |
}
|
74 |
|
75 |
jQuery(document).ready(function() {
|
@@ -124,3 +160,29 @@ function Ufaq_Ajax_Reload() {
|
|
124 |
});
|
125 |
}
|
126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
jQuery(function(){ //DOM Ready
|
2 |
ufaqSetClickHandlers();
|
3 |
+
UFAQSetAutoCompleteClickHandlers();
|
4 |
});
|
5 |
|
6 |
function runEffect(display, post_id) {
|
18 |
|
19 |
// callback function to bring a hidden box back
|
20 |
function handleStyles(display, post_id) {
|
21 |
+
if (display == "show") {setTimeout(function() {jQuery('#ufaq-body-'+post_id).removeClass("ewd-ufaq-hidden"); }, 500 );}
|
22 |
if (display == "hide") {setTimeout(function() {jQuery('#ufaq-body-'+post_id).addClass("ewd-ufaq-hidden");}, 500 );}
|
23 |
};
|
24 |
|
25 |
function ufaqSetClickHandlers() {
|
26 |
+
jQuery('.ufaq-faq-toggle').on('click', function(event) {
|
27 |
var post_id = jQuery(this).attr("data-postid");
|
28 |
|
29 |
event.preventDefault();
|
37 |
EWD_UFAQ_Hide_FAQ(post_id);
|
38 |
}
|
39 |
});
|
40 |
+
|
41 |
+
jQuery('.ufaq-back-to-top-link').on('click', function(event) {
|
42 |
+
event.preventDefault();
|
43 |
+
|
44 |
+
jQuery('html, body').animate({scrollTop: jQuery("#ufaq-faq-list").offset().top -80}, 100);
|
45 |
+
});
|
46 |
+
|
47 |
+
jQuery('.ufaq-faq-header-link').on('click', function(event) {
|
48 |
+
event.preventDefault();
|
49 |
+
|
50 |
+
var faqID = jQuery(this).data("postid");
|
51 |
+
if (jQuery('#ufaq-body-'+faqID).hasClass('ewd-ufaq-hidden')) {
|
52 |
+
var selectedIDString = 'ufaq-body-'+faqID;
|
53 |
+
EWD_UFAQ_Reveal_FAQ(faqID, selectedIDString);
|
54 |
+
}
|
55 |
+
jQuery('html, body').animate({scrollTop: jQuery("#ufaq-post-"+faqID).offset().top -20}, 100);
|
56 |
+
});
|
57 |
+
}
|
58 |
+
|
59 |
+
function UFAQSetAutoCompleteClickHandlers() {
|
60 |
+
jQuery('#ufaq-ajax-text-input').on('keyup', function() {
|
61 |
+
if (typeof autocompleteQuestion === 'undefined' || autocompleteQuestion === null) {autocompleteQuestion = "No";}
|
62 |
+
if (autocompleteQuestion == "Yes") {
|
63 |
+
jQuery('#ufaq-ajax-text-input').autocomplete({
|
64 |
+
source: questionTitles,
|
65 |
+
minLength: 3,
|
66 |
+
appendTo: "#ewd-ufaq-jquery-ajax-search",
|
67 |
+
select: function(event, ui) {
|
68 |
+
jQuery(this).val(ui.item.value);
|
69 |
+
Ufaq_Ajax_Reload();
|
70 |
+
}
|
71 |
+
});
|
72 |
+
jQuery('#ufaq-ajax-text-input').autocomplete( "enable" );
|
73 |
+
}
|
74 |
+
});
|
75 |
}
|
76 |
|
77 |
function EWD_UFAQ_Reveal_FAQ(post_id, selectedIDString) {
|
78 |
var data = 'post_id=' + post_id + '&action=ufaq_record_view';
|
79 |
jQuery.post(ajaxurl, data, function(response) {});
|
80 |
|
81 |
+
jQuery('#ewd-ufaq-post-symbol-'+post_id).html('- ');
|
82 |
|
83 |
jQuery('#ufaq-excerpt-'+post_id).addClass("ewd-ufaq-hidden");
|
84 |
+
|
85 |
+
if (reveal_effect != "none") {runEffect("show", post_id); }
|
86 |
+
else {jQuery('#ufaq-body-'+post_id).removeClass("ewd-ufaq-hidden"); }
|
87 |
|
88 |
if (faq_accordion) {
|
89 |
+
jQuery('.ufaq-faq-div').each(function() {
|
90 |
+
if (jQuery(this).data("postid") != post_id) {
|
91 |
+
EWD_UFAQ_Hide_FAQ(jQuery(this).data("postid"));
|
92 |
+
} else{
|
93 |
+
jQuery(this).addClass("ewd-ufaq-post-active");
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
});
|
96 |
}
|
97 |
+
else {
|
98 |
+
jQuery('#ufaq-post-'+post_id).addClass("ewd-ufaq-post-active");
|
99 |
+
}
|
100 |
}
|
101 |
|
102 |
function EWD_UFAQ_Hide_FAQ(post_id) {
|
103 |
jQuery('#ufaq-excerpt-'+post_id).removeClass("ewd-ufaq-hidden");
|
104 |
+
|
105 |
if (reveal_effect != "none") {runEffect("hide", post_id);}
|
106 |
else {jQuery('#ufaq-body-'+post_id).addClass("ewd-ufaq-hidden");}
|
107 |
+
jQuery('#ufaq-post-'+post_id).removeClass("ewd-ufaq-post-active");
|
108 |
+
jQuery('#ewd-ufaq-post-symbol-'+post_id).html('+ ');
|
109 |
}
|
110 |
|
111 |
jQuery(document).ready(function() {
|
160 |
});
|
161 |
}
|
162 |
|
163 |
+
jQuery(document).ready(function() {
|
164 |
+
jQuery('a[href*=#]:not([href=#])').click(function() {
|
165 |
+
var post_id = jQuery(this).attr("data-postid");
|
166 |
+
var selectedIDString = 'ufaq-body-'+post_id;
|
167 |
+
|
168 |
+
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
|
169 |
+
var target = jQuery(this.hash);
|
170 |
+
target = target.length ? target : jQuery('[name=' + this.hash.slice(1) +']');
|
171 |
+
if (target.length) {
|
172 |
+
|
173 |
+
jQuery('html,body').on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove", function(){
|
174 |
+
jQuery('html,body').stop();
|
175 |
+
});
|
176 |
+
|
177 |
+
if (jQuery('#'+selectedIDString).hasClass("ewd-ufaq-hidden")) {
|
178 |
+
EWD_UFAQ_Reveal_FAQ(post_id, selectedIDString);
|
179 |
+
}
|
180 |
+
|
181 |
+
jQuery('html,body').animate({
|
182 |
+
scrollTop: target.offset().top
|
183 |
+
}, 1000);
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
}
|
187 |
+
});
|
188 |
+
});
|
readme.txt
CHANGED
@@ -113,6 +113,13 @@ For more questions and support you can post in the support forum:
|
|
113 |
8. All answers displayed in the 'list' FAQ mode
|
114 |
|
115 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
= 1.0.9 =
|
117 |
- Added some CSS classes in preparation for an upcoming large CSS/styling update
|
118 |
|
113 |
8. All answers displayed in the 'list' FAQ mode
|
114 |
|
115 |
== Changelog ==
|
116 |
+
= 1.1.0 =
|
117 |
+
- Added new premium display styles
|
118 |
+
- Added an autocomplete titles option for the AJAX search shortcode
|
119 |
+
- Added more styling options to customize new display styles
|
120 |
+
- Added an option to add a 'Back to Top' link to each FAQ post
|
121 |
+
- Fixed a reveal error with non-accordion display and no effect selected
|
122 |
+
|
123 |
= 1.0.9 =
|
124 |
- Added some CSS classes in preparation for an upcoming large CSS/styling update
|
125 |
|