agileware / wp-civicrm-ux

WordPress CiviCRM UX - User Experience enhancements
GNU General Public License v2.0
7 stars 12 forks source link

Implemented support for filtering based on custom fields using a where argument #21

Closed wcha-peter closed 2 years ago

wcha-peter commented 2 years ago

Allows for filtering of results of the api4 short code with custom fields containing dots, as discusses in PROJ-2246

wcha-peter commented 2 years ago

Thanks for that Francis.

In terms of providing json input to WordPress shortcodes, square braces are not valid anywhere within wordpress arguments, so they would need to be encoded using something else - possibly '(' to avoid conflicts with other json syntax.

However, that's starting to stray into defining our own custom syntax - would you still be fine with almost json syntax like (field, op, value) ?

wcha-peter commented 2 years ago

Just implemented a json based solution as per my above comments, using brackets in place of square brackets. Please let me know your thoughts on this approach, and if you're happy I can flatten the commits,

wcha-peter commented 2 years ago

Superseded by https://github.com/agileware/wp-civicrm-ux/pull/26