Skip to content

Conversation

@rmpel
Copy link
Contributor

@rmpel rmpel commented Dec 1, 2025

Allow sorting parameters, mainly to get PDC items sorted by name, but universally implemented.

While retaining the pre-existing sorting for backward compatibility, the following URL parameters now determine sorting;

orderby -> the field or comma sep fields to sort on, example; post_date,ID
order -> the order, ASC or DESC, example; DESC,ASC

sort by date DESC, ID DESC can be achieved by

orderby=post_date,ID&order=DESC,DESC

but also by

orderby=post_date,ID&order=DESC

Sorting by post-title, ASC

orderby=post_title&order=ASC

etc.


First commit changed whitespace because the supplied .editorconfig file does not match the actual coding standards used. Will correct and do second commit.

@rmpel rmpel requested a review from mvdhoek1 December 1, 2025 10:45
return true;
}

protected function getOrderClause(mixed $orderBy, mixed $order)
Copy link
Contributor

Choose a reason for hiding this comment

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

mixed als typehint kunnen we nog niet toepassen aangezien deze plug-in ook nog compatible moet zijn met php7.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

excusé; niet goed gekeken naar de autocomplete; dat moet natuurlijk gewoon string zijn.

Copy link
Contributor

@mvdhoek1 mvdhoek1 left a comment

Choose a reason for hiding this comment

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

Ik kijk er later nog even naar, iets met te weinig tijd.

Copy link
Contributor

@Rovasch Rovasch left a comment

Choose a reason for hiding this comment

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

Alleen de comments op ln 128, 133 en 141 lijken me niet nodig.

@rmpel
Copy link
Contributor Author

rmpel commented Dec 10, 2025

Als jullie de comments niet willen, mag je ze van mij weghalen. Mijn insteek is; als er een reden is te denken; he, wat gebeurt hier? dan is een comment gewenst. Het is aan jullie, jullie plugin, jullie regels :)

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.

3 participants