Prevent specific plugin from firing on items/show

24 views
Skip to first unread message

Erin Bell

unread,
Jun 2, 2016, 10:39:55 AM6/2/16
to Omeka Dev
Hi, I have a project where we're using a plugin but want to prevent it from firing on items/show at fire_plugin_hook('public_items_show'but do want other plugin hooks to fire at that location in the document. Is there a way to whitelist, blacklist, filter or otherwise select specific plugins for fire_plugin_hook('public_items_show')? Can I get an array of plugins that want to fire and modify the array in a custom function?

Thanks -- E

Anurag Spatzenegger

unread,
Jun 2, 2016, 10:47:21 AM6/2/16
to omek...@googlegroups.com
The hooks or which the plugin fires are actually specified in $hooks  = array() in the PluginnamePlugin.php file. So if you want to disable that plugin for public_items_show can just remove that hook from the $hooks array.

All the best,

Anurag


On 6/2/16 10:39 AM, Erin Bell wrote:
Hi, I have a project where we're using a plugin but want to prevent it from firing on items/show at fire_plugin_hook('public_items_show'but do want other plugin hooks to fire at that location in the document. Is there a way to whitelist, blacklist, filter or otherwise select specific plugins for fire_plugin_hook('public_items_show')? Can I get an array of plugins that want to fire and modify the array in a custom function?

Thanks -- E

--
You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omeka-dev+...@googlegroups.com.
To post to this group, send email to omek...@googlegroups.com.
Visit this group at https://groups.google.com/group/omeka-dev.
For more options, visit https://groups.google.com/d/optout.

--

 


Patrick Murray-John

unread,
Jun 2, 2016, 11:01:39 AM6/2/16
to omek...@googlegroups.com
Erin,

Another route might be to modify the theme, replacing `fire_plugin_hook('public_items_show')` with get_specific_plugin_hook_output

Then you'd have an array of the plugins you want to apply and echo out the results.

Patrick


On 06/02/2016 10:39 AM, Erin Bell wrote:
Hi, I have a project where we're using a plugin but want to prevent it from firing on items/show at fire_plugin_hook('public_items_show'but do want other plugin hooks to fire at that location in the document. Is there a way to whitelist, blacklist, filter or otherwise select specific plugins for fire_plugin_hook('public_items_show')? Can I get an array of plugins that want to fire and modify the array in a custom function?

Thanks -- E

Erin Bell

unread,
Jun 2, 2016, 11:12:22 AM6/2/16
to Omeka Dev
Awesome, I didn't know about get_specific_plugin_hook_output(). Thank you both! 
Reply all
Reply to author
Forward
0 new messages