Add an argument to ExhibitBuilder shortcode to filter by tags?

Hi All, I’m fairly new to omeka development, but wondering what the best way is to add arguments to shortcodes in existing plugins? I’ve found the add_shortcode function, but it doesn’t seem to do what I want.

Here’s my issue: we have a bunch of exhibits that we have grouped by tags, and I would like to use a shortcode on a simple page to list all exhibits with a certain tag, e.g. [exhibits tags=Buddhism]. Basically, I’d like to add an if (isset($args['tags'])) block to ExhibitFunctions.php, but am not sure how to do that properly from my own plugin rather than hacking on the official one.

Thanks for any help you could offer a novice!

You’re quite right, add_shortcode won’t do it, since that’s just for registering a new shortcode, but doesn’t provide any way to modify existing shortcodes from other plugins.

Thus, it looks like your best plan is to directly modify what it seems like you’re seeing in exhibit_builder_exhibits_shortcode to add what you have in mind. It looks like all the underlying plumbing needed to just add to the $params there would do the trick.

If that works, we’d certainly be happy to look at a pull request with it.

Okay, will do. Thanks Patrick.