So far I have been the sole contributor to the code, hence I haven’t had the need for the hook. But I can add an action hook in an upcoming release. I will probably need to modify how the registered processors are stored too, to support additions using other plugins.
However, I don’t believe you need to code an extension for what you are trying to do, or that even an action hook is needed for this process. If I understand the requirement correctly, all you want to do is to use the build_gallery
method from photonic.php, which can be accessed from the global $photonic
variable initialized by the plugin. This should require minimal changes from both our sides.
Thanks for your quick and complete response. I looked through the $photonic->build_gallery
function and added some code to my plugin to call it when passed a style=
parameter in the [mla_gallery]
shortcode. Everything seems to work, just as you predicted.
I plan to add Photonic support to my next Media Library Assistant release.
My testing turned up a couple of minor issues I’d like to tell you about. First, your plugin displays two PHP notices when run with “define(‘WP_DEBUG’, true);” in the wp-config.php file (I always run my test system this way). The notices are:
( ! ) Notice: Undefined index: colortype in … \wp-content\plugins\photonic\photonic.php on line 747
( ! ) Notice: Undefined index: image in … \wp-content\plugins\photonic\photonic.php on line 790
These are probably harmless, but are easily avoided by updating the code.
Second, it looks like the “pause” parameter has no effect. When I set “pause=false” in a shortcode the resulting gallery still has the “Pause on hover” behavior. Am I doing something wrong?
Thanks again for your help!
Thanks for the info PHP notices. I always work with debugging on, so I guess I haven’t seen the notices because the options are already set for me.
Regarding the pause issue, it seems to be working fine here: http://aquoid.com/news/plugins/photonic/wp-galleries/. Do you have any plugin that uses JQuery Cycle?
Regarding the pause issue, the problem I’m having is that I can;t turn the pause function off, i.e., pause=false. Line 589 of photonic.php is hard-coded “pause: 1,”.
If I change the source code to “pause: 0,” the pause is turned off, as I’d expect. The shortcode parameter has no effect, though.
All these have been addressed in version 1.40. Bear in mind that there was no intent to have “pause” be a parameter for the shortcode, hence the hardcoding.
Thanks for the quick action. I downloaded version 1.40 and the Notice message are gone. The ‘photonic_register_extensions’ action hook looks like a good idea too, although I didn’t need it after following your suggestions.
I ran across 'pause' => true, // Pause on hover
on line 550 of the source code when I was looking for the parameters I needed to pass from my shortcode to your plugin. That’s where my question came from.
Thanks again for a great plugin and for your help integrating it with mine.
It looks like you’ve implemented pause
in version 1.43; thanks!
I’ve made an adjustment in the next release of MLA to conform to your implementation, and I’ll announce pause
support in my release notice.