Version Description
- Added in widgets to display a number of popular or recently created faqs
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- Functions/EWD_UFAQ_Widgets.php +110 -0
- Main.php +1 -1
- readme.txt +4 -1
Functions/EWD_UFAQ_Widgets.php
CHANGED
@@ -54,6 +54,116 @@ class EWD_UFAQ_Display_FAQ_Post_List extends WP_Widget {
|
|
54 |
}
|
55 |
add_action('widgets_init', create_function('', 'return register_widget("EWD_UFAQ_Display_FAQ_Post_List");'));
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
class EWD_UFAQ_Display_FAQ_Categories extends WP_Widget {
|
58 |
|
59 |
/**
|
54 |
}
|
55 |
add_action('widgets_init', create_function('', 'return register_widget("EWD_UFAQ_Display_FAQ_Post_List");'));
|
56 |
|
57 |
+
class EWD_UFAQ_Display_Recent_FAQS extends WP_Widget {
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Sets up the widgets name etc
|
61 |
+
*/
|
62 |
+
public function __construct() {
|
63 |
+
parent::__construct(
|
64 |
+
'ewd_ufaq_display_recent_faqs', // Base ID
|
65 |
+
__('Recent FAQs', 'EWD_UFAQ'), // Name
|
66 |
+
array( 'description' => __( 'Insert a number of the most recent FAQs', 'EWD_UFAQ' ), ) // Args
|
67 |
+
);
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Outputs the content of the widget
|
72 |
+
*
|
73 |
+
* @param array $args
|
74 |
+
* @param array $instance
|
75 |
+
*/
|
76 |
+
public function widget( $args, $instance ) {
|
77 |
+
echo $args['before_widget'];
|
78 |
+
echo do_shortcode("[recent-faqs post_count='". $instance['post_count'] . "']");
|
79 |
+
echo $args['after_widget'];
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Outputs the options form on admin
|
84 |
+
*
|
85 |
+
* @param array $instance The widget options
|
86 |
+
*/
|
87 |
+
public function form( $instance ) {
|
88 |
+
$post_count = ! empty( $instance['post_count'] ) ? $instance['post_count'] : __( 'Number of FAQs', 'EWD_UFAQ' );
|
89 |
+
?>
|
90 |
+
<p>
|
91 |
+
<label for="<?php echo $this->get_field_id( 'post_count' ); ?>"><?php _e( 'Number of FAQs:', 'EWD_UFAQ' ); ?></label>
|
92 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'post_count' ); ?>" name="<?php echo $this->get_field_name( 'post_count' ); ?>" type="text" value="<?php echo esc_attr( $post_count ); ?>">
|
93 |
+
</p>
|
94 |
+
<?php
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Processing widget options on save
|
99 |
+
*
|
100 |
+
* @param array $new_instance The new options
|
101 |
+
* @param array $old_instance The previous options
|
102 |
+
*/
|
103 |
+
public function update( $new_instance, $old_instance ) {
|
104 |
+
$instance = array();
|
105 |
+
$instance['post_count'] = ( ! empty( $new_instance['post_count'] ) ) ? strip_tags( $new_instance['post_count'] ) : '';
|
106 |
+
|
107 |
+
return $instance;
|
108 |
+
}
|
109 |
+
}
|
110 |
+
add_action('widgets_init', create_function('', 'return register_widget("EWD_UFAQ_Display_Recent_FAQS");'));
|
111 |
+
|
112 |
+
class EWD_UFAQ_Display_Popular_FAQS extends WP_Widget {
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Sets up the widgets name etc
|
116 |
+
*/
|
117 |
+
public function __construct() {
|
118 |
+
parent::__construct(
|
119 |
+
'ewd_ufaq_display_popular_faqs', // Base ID
|
120 |
+
__('Popular FAQs', 'EWD_UFAQ'), // Name
|
121 |
+
array( 'description' => __( 'Insert a number of the most popular FAQs', 'EWD_UFAQ' ), ) // Args
|
122 |
+
);
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* Outputs the content of the widget
|
127 |
+
*
|
128 |
+
* @param array $args
|
129 |
+
* @param array $instance
|
130 |
+
*/
|
131 |
+
public function widget( $args, $instance ) {
|
132 |
+
echo $args['before_widget'];
|
133 |
+
echo do_shortcode("[popular-faqs post_count='". $instance['post_count'] . "']");
|
134 |
+
echo $args['after_widget'];
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* Outputs the options form on admin
|
139 |
+
*
|
140 |
+
* @param array $instance The widget options
|
141 |
+
*/
|
142 |
+
public function form( $instance ) {
|
143 |
+
$post_count = ! empty( $instance['post_count'] ) ? $instance['post_count'] : __( 'Number of FAQs', 'EWD_UFAQ' );
|
144 |
+
?>
|
145 |
+
<p>
|
146 |
+
<label for="<?php echo $this->get_field_id( 'post_count' ); ?>"><?php _e( 'Number of FAQs:', 'EWD_UFAQ' ); ?></label>
|
147 |
+
<input class="widefat" id="<?php echo $this->get_field_id( 'post_count' ); ?>" name="<?php echo $this->get_field_name( 'post_count' ); ?>" type="text" value="<?php echo esc_attr( $post_count ); ?>">
|
148 |
+
</p>
|
149 |
+
<?php
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* Processing widget options on save
|
154 |
+
*
|
155 |
+
* @param array $new_instance The new options
|
156 |
+
* @param array $old_instance The previous options
|
157 |
+
*/
|
158 |
+
public function update( $new_instance, $old_instance ) {
|
159 |
+
$instance = array();
|
160 |
+
$instance['post_count'] = ( ! empty( $new_instance['post_count'] ) ) ? strip_tags( $new_instance['post_count'] ) : '';
|
161 |
+
|
162 |
+
return $instance;
|
163 |
+
}
|
164 |
+
}
|
165 |
+
add_action('widgets_init', create_function('', 'return register_widget("EWD_UFAQ_Display_Popular_FAQS");'));
|
166 |
+
|
167 |
class EWD_UFAQ_Display_FAQ_Categories extends WP_Widget {
|
168 |
|
169 |
/**
|
Main.php
CHANGED
@@ -7,7 +7,7 @@ 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;
|
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.3
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
readme.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: Rustaurius, EtoileWebDesign
|
3 |
-
Tags: frequently asked questions, FAQ, easy FAQ, knowledge base, simple FAQ, FAQ categories, FAQs, knowledgebase, answer, answers, faq page, FAQ Plugin, help, help desk, helpdesk, questions, wordpress faq, faq list, custom post type with accordion, faq list, faq with accordion, jquery ui accordion, jquery-ui, shortcodes, wordpress, WordPress Plugin, Categories, social media, widgets, statistics, AJAX, analytics
|
4 |
Requires at least: 3.5.0
|
5 |
Tested up to: 4.3
|
6 |
License: GPLv3
|
@@ -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.2 =
|
105 |
- CSS update for the ordering table in the admin area
|
106 |
|
1 |
=== Plugin Name ===
|
2 |
Contributors: Rustaurius, EtoileWebDesign
|
3 |
+
Tags: frequently asked questions, FAQ, easy FAQ, knowledge base, simple FAQ, FAQ categories, FAQs, knowledgebase, answer, answers, faq page, FAQ Plugin, help, help desk, helpdesk, questions, wordpress faq, faq list, custom post type with accordion, faq list, faq with accordion, jquery ui accordion, jquery-ui, shortcodes, wordpress, WordPress Plugin, Categories, social media, widget, widgets, statistics, AJAX, analytics, responsive
|
4 |
Requires at least: 3.5.0
|
5 |
Tested up to: 4.3
|
6 |
License: GPLv3
|
101 |
2. Sample FAQ page
|
102 |
|
103 |
== Changelog ==
|
104 |
+
= 1.0.3 =
|
105 |
+
- Added in widgets to display a number of popular or recently created faqs
|
106 |
+
|
107 |
= 1.0.2 =
|
108 |
- CSS update for the ordering table in the admin area
|
109 |
|