Skip to content

Commit e1bbe02

Browse files
authored
Merge pull request #186 from devgeniem/TMS-1075-fix
TMS-1075-fix: Program page query fix
2 parents 70d7dc2 + 068576a commit e1bbe02

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

CHANGELOG.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
- TMS-1075-fix: Program page query fix
1011
- TMS-1075: Fix expirator bug
1112

1213
## [1.9.0] - 2024-10-24

lib/ACF/ProgramGroup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function get_general_tab( string $key ) : Field\Tab {
8787
],
8888
'search_keywords' => [
8989
'title' => 'Haun apusanat',
90-
'instructions' => 'Käytetään ennakoivassa haussa',
90+
'instructions' => 'Lisää tähän hakusanoja, joilla tämän koulutuksen halutaan löytyvän haussa',
9191
],
9292
'search_box_title' => [
9393
'title' => 'Hakulaatikon otsikko',

lib/ACF/ProjectGroup.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ protected function get_general_tab( string $key ) : Field\Tab {
113113
->set_key( "{$key}_is_active" )
114114
->set_name( 'is_active' )
115115
->use_ui()
116-
->set_instructions( $strings['is_active']['instructions'] );
116+
->set_instructions( $strings['is_active']['instructions'] )
117+
->redipress_add_queryable( 'is_active' );
117118

118119
$title_lang_field = ( new Field\Select( $strings['title_lang']['title'] ) )
119120
->set_key( "{$key}_title_lang" )

models/page-project.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,13 @@ public function results() {
228228
$show_all_projects = self::get_show_all_projects_query_var();
229229

230230
// Show only active projects on default
231-
if ( empty( $show_all_projects ) ) {
231+
if ( $show_all_projects === false ) {
232232
$args['meta_query'] = [
233-
[
234-
'key' => 'is_active',
235-
'value' => '1',
233+
'active_project_clause' => [
234+
[
235+
'key' => 'is_active',
236+
'value' => '1',
237+
],
236238
],
237239
];
238240
}

0 commit comments

Comments
 (0)