Version Description
(2021-04-20) = - Fixed incorrect URL for category links in FAQ search result - Fixed link type custom fields not abiding the Hide Blank setting - Fixed issue with link type custom fields not being formatted as a link on the front end
Download this release
Release Info
Developer | Rustaurius |
Plugin | Ultimate FAQ |
Version | 2.0.11 |
Comparing to | |
See all releases |
Code changes from version 2.0.10 to 2.0.11
ewd-ufaq-templates/faq-custom-fields.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
</div>
|
12 |
|
13 |
<div class='ewd-ufaq-custom-field-value'>
|
14 |
-
<?php echo
|
15 |
</div>
|
16 |
|
17 |
<div class='ewd-ufaq-clear'></div>
|
11 |
</div>
|
12 |
|
13 |
<div class='ewd-ufaq-custom-field-value'>
|
14 |
+
<?php echo ( is_array( $value ) ? implode( ', ', $value ) : $value ); ?>
|
15 |
</div>
|
16 |
|
17 |
<div class='ewd-ufaq-clear'></div>
|
ewd-ufaq-templates/submit-faq-custom-field-date.php
CHANGED
@@ -6,6 +6,6 @@
|
|
6 |
|
7 |
<?php $input_name = $this->get_custom_field_input_name(); ?>
|
8 |
|
9 |
-
<input type='
|
10 |
|
11 |
</div>
|
6 |
|
7 |
<?php $input_name = $this->get_custom_field_input_name(); ?>
|
8 |
|
9 |
+
<input type='date' class='ewd-ufaq-jquery-datepicker' id='ewd-ufaq-<?php echo esc_attr( $this->get_custom_field_name() ); ?>' name='<?php echo esc_attr( $input_name ); ?>' value='<?php echo ( ! empty( $_POST[ $input_name ] ) ? esc_attr( $_POST[ $input_name ] ) : '' ); ?>'/>
|
10 |
|
11 |
</div>
|
includes/Ajax.class.php
CHANGED
@@ -55,12 +55,12 @@ if ( !class_exists( 'ewdufaqAJAX' ) ) {
|
|
55 |
|
56 |
$faqs = new ewdufaqViewFAQs( $faq_atts );
|
57 |
|
|
|
|
|
58 |
$faqs->set_faqs( $query->get_faqs() );
|
59 |
|
60 |
$faqs->set_faqs_options();
|
61 |
|
62 |
-
$faqs->set_request_parameters();
|
63 |
-
|
64 |
$faqs->create_faq_data();
|
65 |
|
66 |
ob_start();
|
55 |
|
56 |
$faqs = new ewdufaqViewFAQs( $faq_atts );
|
57 |
|
58 |
+
$faqs->set_request_parameters();
|
59 |
+
|
60 |
$faqs->set_faqs( $query->get_faqs() );
|
61 |
|
62 |
$faqs->set_faqs_options();
|
63 |
|
|
|
|
|
64 |
$faqs->create_faq_data();
|
65 |
|
66 |
ob_start();
|
includes/CustomPostTypes.class.php
CHANGED
@@ -297,7 +297,7 @@ class ewdufaqCustomPostTypes {
|
|
297 |
<?php } ?>
|
298 |
<?php } elseif ( $faq_field->type == 'date' ) { ?>
|
299 |
|
300 |
-
<input type='
|
301 |
|
302 |
<?php } elseif ( $faq_field->type == 'DateTime' ) { ?>
|
303 |
|
297 |
<?php } ?>
|
298 |
<?php } elseif ( $faq_field->type == 'date' ) { ?>
|
299 |
|
300 |
+
<input type='date' class='ewd-ufaq-jquery-datepicker' id='ewd-ufaq-<?php echo esc_attr( $faq_field->name ); ?>' name='EWD_UFAQ_Custom_Field_<?php echo esc_attr( $faq_field->id ); ?>' value='<?php echo esc_attr( $field_value ); ?>' />
|
301 |
|
302 |
<?php } elseif ( $faq_field->type == 'DateTime' ) { ?>
|
303 |
|
readme.txt
CHANGED
@@ -264,6 +264,11 @@ Video 3 - FAQs Ordering
|
|
264 |
|
265 |
== Changelog ==
|
266 |
|
|
|
|
|
|
|
|
|
|
|
267 |
= 2.0.10 (2021-04-19) =
|
268 |
- Corrected console JS error on admin Dashboard page.
|
269 |
- Updated admin enqueuing conditions.
|
264 |
|
265 |
== Changelog ==
|
266 |
|
267 |
+
= 2.0.11 (2021-04-20) =
|
268 |
+
- Fixed incorrect URL for category links in FAQ search result
|
269 |
+
- Fixed link type custom fields not abiding the Hide Blank setting
|
270 |
+
- Fixed issue with link type custom fields not being formatted as a link on the front end
|
271 |
+
|
272 |
= 2.0.10 (2021-04-19) =
|
273 |
- Corrected console JS error on admin Dashboard page.
|
274 |
- Updated admin enqueuing conditions.
|
ultimate-faqs.php
CHANGED
@@ -7,7 +7,7 @@ Author: Etoile Web Design
|
|
7 |
Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
|
8 |
Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
9 |
Text Domain: ultimate-faqs
|
10 |
-
Version: 2.0.
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) )
|
7 |
Author URI: http://www.EtoileWebDesign.com/plugins/ultimate-faqs/
|
8 |
Terms and Conditions: http://www.etoilewebdesign.com/plugin-terms-and-conditions/
|
9 |
Text Domain: ultimate-faqs
|
10 |
+
Version: 2.0.11
|
11 |
*/
|
12 |
|
13 |
if ( ! defined( 'ABSPATH' ) )
|
views/View.FAQ.class.php
CHANGED
@@ -479,11 +479,11 @@ class ewdufaqViewFAQ extends ewdufaqView {
|
|
479 |
|
480 |
if ( $custom_field->type == 'file' ) {
|
481 |
|
482 |
-
return '<a href="' . esc_attr( $value ) . '">' . strrpos( $value, '/' ) ? esc_html( substr( $value, strrpos( $value, '/' ) + 1 ) ) : esc_html( $value ) . '</a>';
|
483 |
}
|
484 |
elseif ( $custom_field->type == 'link' ) {
|
485 |
|
486 |
-
return '<a href="' . esc_attr( $value ) . '" target="_blank">' . esc_attr( $value ) . '</a>';
|
487 |
}
|
488 |
else { return $value; }
|
489 |
}
|
@@ -507,7 +507,7 @@ class ewdufaqViewFAQ extends ewdufaqView {
|
|
507 |
public function get_category_value( $category ) {
|
508 |
global $ewd_ufaq_controller;
|
509 |
|
510 |
-
$category_url = $ewd_ufaq_controller->settings->get_setting( 'pretty-permalinks' ) ? add_query_arg( 'faq-category', urlencode( $category->slug ) ) : add_query_arg( 'include_category', urlencode( $category->slug ) );
|
511 |
|
512 |
return '<a href="' . esc_attr( $category_url ) . '">' . $category->name . '</a>';
|
513 |
}
|
@@ -531,7 +531,7 @@ class ewdufaqViewFAQ extends ewdufaqView {
|
|
531 |
public function get_tag_value( $tag ) {
|
532 |
global $ewd_ufaq_controller;
|
533 |
|
534 |
-
$tag_url = $ewd_ufaq_controller->settings->get_setting( 'pretty-permalinks' ) ? add_query_arg( 'faq-tag', urlencode( $tag->slug ) ) : add_query_arg( 'include_tag', urlencode( $tag->slug ) );
|
535 |
|
536 |
return '<a href="' . esc_attr( $tag_url ) . '">' . $tag->name . '</a>';
|
537 |
}
|
@@ -710,7 +710,7 @@ class ewdufaqViewFAQ extends ewdufaqView {
|
|
710 |
return get_permalink() . 'single-faq/' . $this->post->post_name . '/';
|
711 |
}
|
712 |
|
713 |
-
return add_query_arg( 'Display_FAQ', $this->post->ID,
|
714 |
}
|
715 |
|
716 |
/**
|
479 |
|
480 |
if ( $custom_field->type == 'file' ) {
|
481 |
|
482 |
+
return ! empty( $value ) ? '<a href="' . esc_attr( $value ) . '">' . strrpos( $value, '/' ) ? esc_html( substr( $value, strrpos( $value, '/' ) + 1 ) ) : esc_html( $value ) . '</a>' : '';
|
483 |
}
|
484 |
elseif ( $custom_field->type == 'link' ) {
|
485 |
|
486 |
+
return ! empty( $value ) ? '<a href="' . esc_attr( $value ) . '" target="_blank">' . esc_attr( $value ) . '</a>' : '';
|
487 |
}
|
488 |
else { return $value; }
|
489 |
}
|
507 |
public function get_category_value( $category ) {
|
508 |
global $ewd_ufaq_controller;
|
509 |
|
510 |
+
$category_url = $ewd_ufaq_controller->settings->get_setting( 'pretty-permalinks' ) ? add_query_arg( 'faq-category', urlencode( $category->slug ), $this->current_url ) : add_query_arg( 'include_category', urlencode( $category->slug ), $this->current_url );
|
511 |
|
512 |
return '<a href="' . esc_attr( $category_url ) . '">' . $category->name . '</a>';
|
513 |
}
|
531 |
public function get_tag_value( $tag ) {
|
532 |
global $ewd_ufaq_controller;
|
533 |
|
534 |
+
$tag_url = $ewd_ufaq_controller->settings->get_setting( 'pretty-permalinks' ) ? add_query_arg( 'faq-tag', urlencode( $tag->slug ), $this->current_url ) : add_query_arg( 'include_tag', urlencode( $tag->slug ), $this->current_url );
|
535 |
|
536 |
return '<a href="' . esc_attr( $tag_url ) . '">' . $tag->name . '</a>';
|
537 |
}
|
710 |
return get_permalink() . 'single-faq/' . $this->post->post_name . '/';
|
711 |
}
|
712 |
|
713 |
+
return add_query_arg( 'Display_FAQ', $this->post->ID, $this->current_url );
|
714 |
}
|
715 |
|
716 |
/**
|
views/View.FAQs.class.php
CHANGED
@@ -348,6 +348,7 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
348 |
public function set_request_parameters() {
|
349 |
|
350 |
if ( ! empty( $_REQUEST['faq_page'] ) ) { $this->faq_page = intval( $_REQUEST['faq_page'] ); }
|
|
|
351 |
}
|
352 |
|
353 |
/**
|
@@ -373,6 +374,7 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
373 |
|
374 |
$faq->display_all_answers = $this->display_all_answers;
|
375 |
$faq->no_comments = $this->no_comments;
|
|
|
376 |
}
|
377 |
}
|
378 |
|
@@ -458,6 +460,8 @@ class ewdufaqViewFAQs extends ewdufaqView {
|
|
458 |
public function set_faqs_options() {
|
459 |
global $ewd_ufaq_controller;
|
460 |
|
|
|
|
|
461 |
$this->category_order = empty( $this->category_order ) ? $ewd_ufaq_controller->settings->get_setting( 'category-order' ) : $this->category_order;
|
462 |
$this->category_orderby = empty( $this->category_orderby ) ? $ewd_ufaq_controller->settings->get_setting( 'category-order-by' ) : $this->category_orderby;
|
463 |
$this->faqs_per_page = empty( $this->faqs_per_page ) ? $ewd_ufaq_controller->settings->get_setting( 'faqs-per-page' ) : $this->faqs_per_page;
|
348 |
public function set_request_parameters() {
|
349 |
|
350 |
if ( ! empty( $_REQUEST['faq_page'] ) ) { $this->faq_page = intval( $_REQUEST['faq_page'] ); }
|
351 |
+
if ( ! empty( $_REQUEST['current_url'] ) ) { $this->current_url = sanitize_text_field( $_REQUEST['current_url'] ); }
|
352 |
}
|
353 |
|
354 |
/**
|
374 |
|
375 |
$faq->display_all_answers = $this->display_all_answers;
|
376 |
$faq->no_comments = $this->no_comments;
|
377 |
+
$faq->current_url = $this->current_url;
|
378 |
}
|
379 |
}
|
380 |
|
460 |
public function set_faqs_options() {
|
461 |
global $ewd_ufaq_controller;
|
462 |
|
463 |
+
$this->current_url = !empty( $this->current_url ) ? $this->current_url : get_permalink();
|
464 |
+
|
465 |
$this->category_order = empty( $this->category_order ) ? $ewd_ufaq_controller->settings->get_setting( 'category-order' ) : $this->category_order;
|
466 |
$this->category_orderby = empty( $this->category_orderby ) ? $ewd_ufaq_controller->settings->get_setting( 'category-order-by' ) : $this->category_orderby;
|
467 |
$this->faqs_per_page = empty( $this->faqs_per_page ) ? $ewd_ufaq_controller->settings->get_setting( 'faqs-per-page' ) : $this->faqs_per_page;
|