Version Description
- Fix for the FAQ ordering bug
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 1.0.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.0 to 1.0.1
- Main.php +2 -2
- Shortcodes/DisplayFAQs.php +8 -5
- readme.txt +3 -0
Main.php
CHANGED
@@ -7,14 +7,14 @@ Author: Tim Ruse
|
|
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__ ) );
|
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.1
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
14 |
global $UFAQ_Full_Version;
|
15 |
global $EWD_UFAQ_Version;
|
16 |
|
17 |
+
$EWD_UFAQ_Version = '1.0.1';
|
18 |
|
19 |
define( 'EWD_UFAQ_CD_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
|
20 |
define( 'EWD_UFAQ_CD_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
Shortcodes/DisplayFAQs.php
CHANGED
@@ -51,11 +51,14 @@ function Display_FAQs($atts) {
|
|
51 |
$search_string = strtolower($search_string);
|
52 |
|
53 |
if ($orderby == "") {$orderby = $Order_By_Setting;}
|
54 |
-
if ($orderby == "popular"
|
55 |
-
|
|
|
|
|
56 |
|
57 |
if ($order == "") {$order = $Order_Setting;}
|
58 |
-
if ($
|
|
|
59 |
|
60 |
if ($Group_By_Category == "Yes") {
|
61 |
$Category_Array = get_terms('ufaq-category', array('orderby' => $Group_By_Order_By, 'order' => $Group_By_Order));
|
@@ -122,8 +125,8 @@ function Display_FAQs($atts) {
|
|
122 |
$category_array
|
123 |
)
|
124 |
);
|
125 |
-
if ($
|
126 |
-
if ($
|
127 |
$faqs = get_posts($params);
|
128 |
|
129 |
if ($Custom_CSS != "") {$ReturnString .= "<style>" . $Custom_CSS . "</style>";}
|
51 |
$search_string = strtolower($search_string);
|
52 |
|
53 |
if ($orderby == "") {$orderby = $Order_By_Setting;}
|
54 |
+
if ($orderby == "popular" or $orderby == "set_order") {
|
55 |
+
$orig_order_setting = $orderby;
|
56 |
+
$orderby = "meta_value_num";
|
57 |
+
}
|
58 |
|
59 |
if ($order == "") {$order = $Order_Setting;}
|
60 |
+
if ($orig_order_setting == "popular") {$order = "DESC";}
|
61 |
+
if ($orig_order_setting == "set_order") {$order = "ASC";}
|
62 |
|
63 |
if ($Group_By_Category == "Yes") {
|
64 |
$Category_Array = get_terms('ufaq-category', array('orderby' => $Group_By_Order_By, 'order' => $Group_By_Order));
|
125 |
$category_array
|
126 |
)
|
127 |
);
|
128 |
+
if ($orig_order_setting == "popular") {$params['meta_key'] = 'ufaq_view_count';}
|
129 |
+
if ($orig_order_setting == "set_order") {$params['meta_key'] = 'ufaq_order';}
|
130 |
$faqs = get_posts($params);
|
131 |
|
132 |
if ($Custom_CSS != "") {$ReturnString .= "<style>" . $Custom_CSS . "</style>";}
|
readme.txt
CHANGED
@@ -101,6 +101,9 @@ For more questions and support you can post in the support forum:
|
|
101 |
2. Sample FAQ page
|
102 |
|
103 |
== Changelog ==
|
|
|
|
|
|
|
104 |
= 1.0.0 =
|
105 |
- Premium version release, check out our website for all of the details <http://www.etoilewebdesign.com/ultimate-faq/>
|
106 |
|
101 |
2. Sample FAQ page
|
102 |
|
103 |
== Changelog ==
|
104 |
+
= 1.0.1 =
|
105 |
+
- Fix for the FAQ ordering bug
|
106 |
+
|
107 |
= 1.0.0 =
|
108 |
- Premium version release, check out our website for all of the details <http://www.etoilewebdesign.com/ultimate-faq/>
|
109 |
|