Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMS-1075-fix: Program page query fix #186

Merged
merged 2 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- TMS-1075-fix: Program page query fix
- TMS-1075: Fix expirator bug

## [1.9.0] - 2024-10-24
Expand Down
2 changes: 1 addition & 1 deletion lib/ACF/ProgramGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function get_general_tab( string $key ) : Field\Tab {
],
'search_keywords' => [
'title' => 'Haun apusanat',
'instructions' => 'Käytetään ennakoivassa haussa',
'instructions' => 'Lisää tähän hakusanoja, joilla tämän koulutuksen halutaan löytyvän haussa',
],
'search_box_title' => [
'title' => 'Hakulaatikon otsikko',
Expand Down
3 changes: 2 additions & 1 deletion lib/ACF/ProjectGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ protected function get_general_tab( string $key ) : Field\Tab {
->set_key( "{$key}_is_active" )
->set_name( 'is_active' )
->use_ui()
->set_instructions( $strings['is_active']['instructions'] );
->set_instructions( $strings['is_active']['instructions'] )
->redipress_add_queryable( 'is_active' );

$title_lang_field = ( new Field\Select( $strings['title_lang']['title'] ) )
->set_key( "{$key}_title_lang" )
Expand Down
10 changes: 6 additions & 4 deletions models/page-project.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,13 @@ public function results() {
$show_all_projects = self::get_show_all_projects_query_var();

// Show only active projects on default
if ( empty( $show_all_projects ) ) {
if ( $show_all_projects === false ) {
$args['meta_query'] = [
[
'key' => 'is_active',
'value' => '1',
'active_project_clause' => [
[
'key' => 'is_active',
'value' => '1',
],
],
];
}
Expand Down
Loading