[theme-reviewers] Editing core shortcodes (Gallery)
Daniel Tara
contact at onedesigns.com
Tue Mar 26 19:31:45 UTC 2013
Yes, it's planned to be added to the next update. I was just working on it and that's the reason I actually responded to this. I don't have any problem adding compatibility checks as long as it's 3 just lines of code but I do think this should be more standardized. The thing with Jetpack is that they also have a check that breaks their code if they find another theme or plugin has hooked to it. They said in the code it's because of compatibility with the WP.com VIP feature. Maybe I'm missing something but I personally don't see the reason for such checks, that's what priorities are for. I believe plugins should have priority over themes because if the user has the plugin active it's obvious he wants to use it while not so obvious about the theme. The WP.com VIP module could also hook with a greater priority than Jetpack. If we set up this simple standard I believe it would be more easier to handle such situations.
Daniel
On Mar 26, 2013, at 8:45 PM, Jeremy Herve wrote:
> On Tue, Mar 26, 2013 at 7:36 PM, Daniel Tara <contact at onedesigns.com> wrote:
>>
>> A common problem when themes do his is that they override the functionality of other plugins like Jetpack, however that can be avoided with just a simple check:
>>
>> require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
>> if( is_plugin_active( 'jetpack/jetpack.php' ) && in_array( 'tiled-gallery', Jetpack::get_active_modules() ) )
>> return '';
>>
>> Other than that I don't see any reason why themes shouldn't hack into the gallery short code, it's presentational after all.
>
> You're completely right. I actually ran into the issue when helping a
> blogger who uses one of your themes, Esplanade. They couldn't use
> Jetpack Tiled Galleries, and I suggested a fix similar to the one you
> proposed above (although I checked for the Jetpack class instead of
> checking for is_plugin_active).
>
> Do you plan on adding this check to a future update of your theme?
>
> I see how it could become problematic though; if you add support for
> Jetpack, other plugin authors might contact you to ask you to support
> their plugin as well. That could become quite messy.
> That's why I'd prefer for such functions to be added by plugins.
>
> Cheers,
>
> Jeremy
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
More information about the theme-reviewers
mailing list