Version Description
- Removed an extra set of quotation marks that was causing flush_rewrite_rules to sometimes be called unnecessarily on init
- Fixed a styling option that wasn't working correctly for setting the category heading type
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 1.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.2
- Functions/EWD_UFAQ_Deactivation_Survey.php +65 -65
- Functions/EWD_UFAQ_Styling.php +2 -0
- Main.php +2 -2
- readme.txt +4 -0
Functions/EWD_UFAQ_Deactivation_Survey.php
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
<?php
|
2 |
-
add_action('current_screen', 'EWD_UFAQ_Deactivation_Survey');
|
3 |
-
function EWD_UFAQ_Deactivation_Survey() {
|
4 |
-
if (in_array(get_current_screen()->id, array( 'plugins', 'plugins-network' ), true)) {
|
5 |
-
add_action('admin_enqueue_scripts', 'EWD_UFAQ_Enqueue_Deactivation_Scripts');
|
6 |
-
add_action( 'admin_footer', 'EWD_UFAQ_Deactivation_Survey_HTML');
|
7 |
-
}
|
8 |
-
}
|
9 |
-
|
10 |
-
function EWD_UFAQ_Enqueue_Deactivation_Scripts() {
|
11 |
-
wp_enqueue_style('ewd-ufaq-deactivation-css', EWD_UFAQ_CD_PLUGIN_URL . 'css/ewd-ufaq-plugin-deactivation.css');
|
12 |
-
wp_enqueue_script('ewd-ufaq-deactivation-js', EWD_UFAQ_CD_PLUGIN_URL . 'js/ewd-ufaq-plugin-deactivation.js', array('jquery'));
|
13 |
-
|
14 |
-
wp_localize_script('ewd-ufaq-deactivation-js', 'ewd_ufaq_deactivation_data', array('site_url' => site_url()));
|
15 |
-
}
|
16 |
-
|
17 |
-
function EWD_UFAQ_Deactivation_Survey_HTML() {
|
18 |
-
$options = array(
|
19 |
-
1 => array(
|
20 |
-
'title' => esc_html__( 'I no longer need the plugin', 'ultimate-faqs' ),
|
21 |
-
),
|
22 |
-
2 => array(
|
23 |
-
'title' => esc_html__( 'I\'m switching to a different plugin', 'ultimate-faqs' ),
|
24 |
-
'details' => esc_html__( 'Please share which plugin', 'ultimate-faqs' ),
|
25 |
-
),
|
26 |
-
3 => array(
|
27 |
-
'title' => esc_html__( 'I couldn\'t get the plugin to work', 'ultimate-faqs' ),
|
28 |
-
),
|
29 |
-
4 => array(
|
30 |
-
'title' => esc_html__( 'It\'s a temporary deactivation', 'ultimate-faqs' ),
|
31 |
-
),
|
32 |
-
5 => array(
|
33 |
-
'title' => esc_html__( 'Other', 'ultimate-faqs' ),
|
34 |
-
'details' => esc_html__( 'Please share the reason', 'ultimate-faqs' ),
|
35 |
-
),
|
36 |
-
);
|
37 |
-
?>
|
38 |
-
<div class="ewd-ufaq-deactivate-survey-modal" id="ewd-ufaq-deactivate-survey-ultimate-faqs">
|
39 |
-
<div class="ewd-ufaq-deactivate-survey-wrap">
|
40 |
-
<form class="ewd-ufaq-deactivate-survey" method="post">
|
41 |
-
<span class="ewd-ufaq-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'ultimate-faqs' ); ?></span>
|
42 |
-
<span class="ewd-ufaq-deactivate-survey-desc"><?php echo __('If you have a moment, please share why you are deactivating Ultimate FAQs:', 'ultimate-faqs' ); ?></span>
|
43 |
-
<div class="ewd-ufaq-deactivate-survey-options">
|
44 |
-
<?php foreach ( $options as $id => $option ) : ?>
|
45 |
-
<div class="ewd-ufaq-deactivate-survey-option">
|
46 |
-
<label for="ewd-ufaq-deactivate-survey-option-ultimate-faqs-<?php echo $id; ?>" class="ewd-ufaq-deactivate-survey-option-label">
|
47 |
-
<input id="ewd-ufaq-deactivate-survey-option-ultimate-faqs-<?php echo $id; ?>" class="ewd-ufaq-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
|
48 |
-
<span class="ewd-ufaq-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
|
49 |
-
</label>
|
50 |
-
<?php if ( ! empty( $option['details'] ) ) : ?>
|
51 |
-
<input class="ewd-ufaq-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
|
52 |
-
<?php endif; ?>
|
53 |
-
</div>
|
54 |
-
<?php endforeach; ?>
|
55 |
-
</div>
|
56 |
-
<div class="ewd-ufaq-deactivate-survey-footer">
|
57 |
-
<button type="submit" class="ewd-ufaq-deactivate-survey-submit button button-primary button-large"><?php _e('Submit and Deactivate', 'ultimate-faqs' ); ?></button>
|
58 |
-
<a href="#" class="ewd-ufaq-deactivate-survey-deactivate"><?php _e('Skip and Deactivate', 'ultimate-faqs' ); ?></a>
|
59 |
-
</div>
|
60 |
-
</form>
|
61 |
-
</div>
|
62 |
-
</div>
|
63 |
-
<?php
|
64 |
-
}
|
65 |
-
|
66 |
?>
|
1 |
+
<?php
|
2 |
+
add_action('current_screen', 'EWD_UFAQ_Deactivation_Survey');
|
3 |
+
function EWD_UFAQ_Deactivation_Survey() {
|
4 |
+
if (in_array(get_current_screen()->id, array( 'plugins', 'plugins-network' ), true)) {
|
5 |
+
add_action('admin_enqueue_scripts', 'EWD_UFAQ_Enqueue_Deactivation_Scripts');
|
6 |
+
add_action( 'admin_footer', 'EWD_UFAQ_Deactivation_Survey_HTML');
|
7 |
+
}
|
8 |
+
}
|
9 |
+
|
10 |
+
function EWD_UFAQ_Enqueue_Deactivation_Scripts() {
|
11 |
+
wp_enqueue_style('ewd-ufaq-deactivation-css', EWD_UFAQ_CD_PLUGIN_URL . 'css/ewd-ufaq-plugin-deactivation.css');
|
12 |
+
wp_enqueue_script('ewd-ufaq-deactivation-js', EWD_UFAQ_CD_PLUGIN_URL . 'js/ewd-ufaq-plugin-deactivation.js', array('jquery'));
|
13 |
+
|
14 |
+
wp_localize_script('ewd-ufaq-deactivation-js', 'ewd_ufaq_deactivation_data', array('site_url' => site_url()));
|
15 |
+
}
|
16 |
+
|
17 |
+
function EWD_UFAQ_Deactivation_Survey_HTML() {
|
18 |
+
$options = array(
|
19 |
+
1 => array(
|
20 |
+
'title' => esc_html__( 'I no longer need the plugin', 'ultimate-faqs' ),
|
21 |
+
),
|
22 |
+
2 => array(
|
23 |
+
'title' => esc_html__( 'I\'m switching to a different plugin', 'ultimate-faqs' ),
|
24 |
+
'details' => esc_html__( 'Please share which plugin', 'ultimate-faqs' ),
|
25 |
+
),
|
26 |
+
3 => array(
|
27 |
+
'title' => esc_html__( 'I couldn\'t get the plugin to work', 'ultimate-faqs' ),
|
28 |
+
),
|
29 |
+
4 => array(
|
30 |
+
'title' => esc_html__( 'It\'s a temporary deactivation', 'ultimate-faqs' ),
|
31 |
+
),
|
32 |
+
5 => array(
|
33 |
+
'title' => esc_html__( 'Other', 'ultimate-faqs' ),
|
34 |
+
'details' => esc_html__( 'Please share the reason', 'ultimate-faqs' ),
|
35 |
+
),
|
36 |
+
);
|
37 |
+
?>
|
38 |
+
<div class="ewd-ufaq-deactivate-survey-modal" id="ewd-ufaq-deactivate-survey-ultimate-faqs">
|
39 |
+
<div class="ewd-ufaq-deactivate-survey-wrap">
|
40 |
+
<form class="ewd-ufaq-deactivate-survey" method="post">
|
41 |
+
<span class="ewd-ufaq-deactivate-survey-title"><span class="dashicons dashicons-testimonial"></span><?php echo ' ' . __( 'Quick Feedback', 'ultimate-faqs' ); ?></span>
|
42 |
+
<span class="ewd-ufaq-deactivate-survey-desc"><?php echo __('If you have a moment, please share why you are deactivating Ultimate FAQs:', 'ultimate-faqs' ); ?></span>
|
43 |
+
<div class="ewd-ufaq-deactivate-survey-options">
|
44 |
+
<?php foreach ( $options as $id => $option ) : ?>
|
45 |
+
<div class="ewd-ufaq-deactivate-survey-option">
|
46 |
+
<label for="ewd-ufaq-deactivate-survey-option-ultimate-faqs-<?php echo $id; ?>" class="ewd-ufaq-deactivate-survey-option-label">
|
47 |
+
<input id="ewd-ufaq-deactivate-survey-option-ultimate-faqs-<?php echo $id; ?>" class="ewd-ufaq-deactivate-survey-option-input" type="radio" name="code" value="<?php echo $id; ?>" />
|
48 |
+
<span class="ewd-ufaq-deactivate-survey-option-reason"><?php echo $option['title']; ?></span>
|
49 |
+
</label>
|
50 |
+
<?php if ( ! empty( $option['details'] ) ) : ?>
|
51 |
+
<input class="ewd-ufaq-deactivate-survey-option-details" type="text" placeholder="<?php echo $option['details']; ?>" />
|
52 |
+
<?php endif; ?>
|
53 |
+
</div>
|
54 |
+
<?php endforeach; ?>
|
55 |
+
</div>
|
56 |
+
<div class="ewd-ufaq-deactivate-survey-footer">
|
57 |
+
<button type="submit" class="ewd-ufaq-deactivate-survey-submit button button-primary button-large"><?php _e('Submit and Deactivate', 'ultimate-faqs' ); ?></button>
|
58 |
+
<a href="#" class="ewd-ufaq-deactivate-survey-deactivate"><?php _e('Skip and Deactivate', 'ultimate-faqs' ); ?></a>
|
59 |
+
</div>
|
60 |
+
</form>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<?php
|
64 |
+
}
|
65 |
+
|
66 |
?>
|
Functions/EWD_UFAQ_Styling.php
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
<?php
|
2 |
function EWD_UFAQ_Add_Modified_Styles() {
|
3 |
$UFAQ_Styling_FAQ_Heading_Type = get_option("EWD_UFAQ_Styling_FAQ_Heading_Type");
|
|
|
|
|
4 |
$StylesString = "<style>";
|
5 |
$StylesString .=".ewd-ufaq-post-margin-symbol { ";
|
6 |
if (get_option("EWD_UFAQ_Styling_Default_Bg_Color") != "") {$StylesString .= "background-color:" . get_option("EWD_UFAQ_Styling_Default_Bg_Color") . " !important;";}
|
1 |
<?php
|
2 |
function EWD_UFAQ_Add_Modified_Styles() {
|
3 |
$UFAQ_Styling_FAQ_Heading_Type = get_option("EWD_UFAQ_Styling_FAQ_Heading_Type");
|
4 |
+
$UFAQ_Styling_Category_Heading_Type = get_option("EWD_UFAQ_Styling_Category_Heading_Type");
|
5 |
+
|
6 |
$StylesString = "<style>";
|
7 |
$StylesString .=".ewd-ufaq-post-margin-symbol { ";
|
8 |
if (get_option("EWD_UFAQ_Styling_Default_Bg_Color") != "") {$StylesString .= "background-color:" . get_option("EWD_UFAQ_Styling_Default_Bg_Color") . " !important;";}
|
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: ultimate-faqs
|
10 |
-
Version: 1.8.
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
@@ -257,7 +257,7 @@ if (isset($_GET['post_type']) and $_GET['post_type'] == 'ufaq' and isset($_POST[
|
|
257 |
|
258 |
$rules = get_option('rewrite_rules');
|
259 |
$PrettyLinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
260 |
-
if (!isset($rules['
|
261 |
add_filter( 'query_vars', 'EWD_UFAQ_add_query_vars_filter' );
|
262 |
add_filter('init', 'EWD_UFAQ_Rewrite_Rules');
|
263 |
update_option("EWD_UFAQ_Update_RR_Rules", "No");
|
7 |
Author URI: http://www.EtoileWebDesign.com/wordpress-plugins/
|
8 |
Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
9 |
Text Domain: ultimate-faqs
|
10 |
+
Version: 1.8.2
|
11 |
*/
|
12 |
|
13 |
global $ewd_ufaq_message;
|
257 |
|
258 |
$rules = get_option('rewrite_rules');
|
259 |
$PrettyLinks = get_option("EWD_UFAQ_Pretty_Permalinks");
|
260 |
+
if (!isset($rules['(.?.+?)/single-faq/([^&]*)/?$']) and $PrettyLinks == "Yes") {
|
261 |
add_filter( 'query_vars', 'EWD_UFAQ_add_query_vars_filter' );
|
262 |
add_filter('init', 'EWD_UFAQ_Rewrite_Rules');
|
263 |
update_option("EWD_UFAQ_Update_RR_Rules", "No");
|
readme.txt
CHANGED
@@ -270,6 +270,10 @@ Video 3 - FAQs Ordering
|
|
270 |
|
271 |
|
272 |
== Changelog ==
|
|
|
|
|
|
|
|
|
273 |
= 1.8.1 =
|
274 |
- Fixes a notice about trying to get property of a non-object
|
275 |
|
270 |
|
271 |
|
272 |
== Changelog ==
|
273 |
+
= 1.8.2 =
|
274 |
+
- Removed an extra set of quotation marks that was causing flush_rewrite_rules to sometimes be called unnecessarily on init
|
275 |
+
- Fixed a styling option that wasn't working correctly for setting the category heading type
|
276 |
+
|
277 |
= 1.8.1 =
|
278 |
- Fixes a notice about trying to get property of a non-object
|
279 |
|