[Plugin: Custom Metadata Manager] Please make plugins_url filterable with usual filter
-
Hi again, can you tell I’m making good use of your plugin?
I am trying to filter the plugin_url() response in your plugin to fix an issue in my server related to symbolic links and the CSS file. The problem is that because you run plugin_url() in the root (non-hooked) context of your plugin I am unable to filter the value using the normal ‘plugin_url’ filter (because my plugin hasn’t had a chance to register my filter yet).
It seems that you foresaw this issue and added the ‘custom-metadata-manager-default-css’ filter to get around it. Am I right about that? It seems like you even tried to make your filter match the regular plugins_url one.
If so I think you should consider moving the define(CUSTOM_METADATA_MANAGER_URL) call instead. By running that in your admin_init hook instead of the core of the plugin you allow other plugins a chance to register plugin_url filters before the constant is determined, which is much easier than asking them to have a custom filter just for your plugin.
I tried it out and everything seems to still work fine with the define in the admin_init hook.
Thanks!
https://www.ads-software.com/extend/plugins/custom-metadata/
- The topic ‘[Plugin: Custom Metadata Manager] Please make plugins_url filterable with usual filter’ is closed to new replies.