Skip to content

Commit

Permalink
= 4.2.6.5 =
Browse files Browse the repository at this point in the history
  • Loading branch information
tungnxt89 committed Apr 8, 2024
1 parent af28489 commit 310a424
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions inc/TemplateHooks/Course/FilterCourseTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function sections( array $data = [] ) {
if ( is_callable( [ $this, 'html_' . $field ] ) ) {
$sections[ $field ] = [ 'text_html' => $this->{'html_' . $field}( $data ) ];
} else { // For custom field.
$sections[ $field ] = apply_filters( 'learn-press/filter-courses/sections/field/html', '', $sections, $field, $data );
do_action_ref_array( 'learn-press/filter-courses/sections/field/html', [ &$sections, $field, $data ] );
}
}

Expand Down Expand Up @@ -150,9 +150,9 @@ public function html_search( array $data = [] ): string {
);

$this->check_param_url_has_lang( $data );
$value = LP_Request::get_param( 'c_search' );
$value = isset( $data['params_url'] ) ? ( $data['params_url']['c_search'] ?? $value ) : $value;
$content = sprintf(
$value = LP_Request::get_param( 'c_search' );
$value = isset( $data['params_url'] ) ? ( $data['params_url']['c_search'] ?? $value ) : $value;
$content = sprintf(
'<input type="text" name="c_search" placeholder="%s" value="%s" class="%s" data-search-suggest="%d">',
__( 'Search Course', 'learnpress' ),
$value,
Expand Down Expand Up @@ -626,11 +626,11 @@ public function handle_filter_params_before_query( LP_Course_Filter &$filter, ar

// Check has in category page.
if ( isset( $params_url['page_term_id_current'] ) &&
empty( $params_url['term_id'] ) ) {
empty( $params_url['term_id'] ) ) {
$filter->term_ids[] = $params_url['page_term_id_current'];
} // Check has in tag page.
elseif ( isset( $params_url['page_tag_id_current'] ) &&
empty( $params_url['tag_id'] ) ) {
empty( $params_url['tag_id'] ) ) {
$filter->tag_ids[] = $params_url['page_tag_id_current'];
}
}
Expand Down

0 comments on commit 310a424

Please sign in to comment.