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

Add filter to control sorting in View entries query #2126

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

mrcasual
Copy link
Collaborator

@mrcasual mrcasual commented Aug 27, 2024

This implements #1759.

To test, use this filter:

add_filter( 'gk/gravityview/view/entries/query/sorting-parameters', function ( $params ) {
	foreach ( $params as &$field ) {
		$field['is_numeric'] = true;
	}

	return $params;
} );

GravityMigrate data.

💾 Build file (81f6fa6).

@mrcasual mrcasual self-assigned this Aug 27, 2024
@mrcasual
Copy link
Collaborator Author

@rafaehlers, please test.

This allows for more granular control of sorting parameters for each
when fetching View entries.
@mrcasual mrcasual force-pushed the feature/1759-multisort-numeric-fields branch from af9e42c to 2d3f7d7 Compare August 27, 2024 15:59
Copy link
Member

@zackkatz zackkatz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested this, but the code looks good.

@mrcasual mrcasual merged commit 4a51c6b into develop Aug 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants