[theme-reviewers] Modifying Default Gallery

Jose Castaneda jomcastaneda at gmail.com
Wed Oct 8 05:24:12 UTC 2014


Yes, that would be fine. Alternatively you can recommend them using:
add_filter( 'use_default_gallery_style', '__return_false' ); If all they
want to do is not use the styling.

On Tue, Oct 7, 2014 at 8:34 PM, priyanshu mittal <priyanshu.mittal at gmail.com
> wrote:

> May Be I new here
>
> I think it comes under theme territory itself. Since all the code he has
> written,is for only, presentational purpose. He is not creating additions
> attributes or options.
>
> I would like to know the final answer to this.SInce,  I am also reviewing
> a theme, in which user has removed the gallery style using the below snippet
>
> *add_filter( 'gallery_style', 'simplyread_gallery_style' );*
>
>
>
> *// remove injected CSS from gallery
> function simplyread_gallery_style($css) {
> 	return preg_replace( "!<style type='text/css'>(.*?)</style>!s", '', $css );
> }*
>
>
> Will that be okay for theme?
>
> Thanks
> Priyanshu
>
>
> On Wed, Oct 8, 2014 at 8:26 AM, Jose Castaneda <jomcastaneda at gmail.com>
> wrote:
>
>> In the manner being used it would seem that way only because they are
>> re-adding the shortcode in line 275:
>> https://themes.trac.wordpress.org/browser/alexis/1.2.0/functions.php#L275
>>
>> I would suggest filtering like the others said. I mean they already are
>> taking out the default gallery styling:
>> https://themes.trac.wordpress.org/browser/alexis/1.2.0/functions.php#L241
>>
>> On Tue, Oct 7, 2014 at 6:30 PM, Emil Uzelac <emil at uzelac.me> wrote:
>>
>>> Wouldn't this fall under (Presentation Vs. Functionality:) and again,
>>> plugin-territory?
>>>
>>>    - Since the purpose of Themes is to define the presentation of user
>>>    content, Themes must not be used to define the generation of user content,
>>>    or to define Theme-independent site options or functionality.
>>>
>>> It's right on our main page: http://codex.wordpress.org/Theme_Review
>>>
>>> On Tue, Oct 7, 2014 at 8:26 PM, Edward Caissie <edward.caissie at gmail.com
>>> > wrote:
>>>
>>>> Looking at the functions.php alone is a bit out of context but I'm not
>>>> really seeing anything there that couldn't work in a theme's layout and
>>>> aesthetics.
>>>>
>>>> Edward Caissie
>>>> aka Cais.
>>>>
>>>> On Tue, Oct 7, 2014 at 8:38 PM, Emil Uzelac <emil at uzelac.me> wrote:
>>>>
>>>>> See https://themes.svn.wordpress.org/alexis/1.2.0/functions.php I can
>>>>> easily be wrong :) Just don't remember that we allowed this before.
>>>>>
>>>>> On Tue, Oct 7, 2014 at 7:35 PM, Justin Tadlock <
>>>>> justin at justintadlock.com> wrote:
>>>>>
>>>>>> As long as the user can use the core parameters, there shouldn't be
>>>>>> any issues.  Filtering the gallery shortcode output is one area that, at
>>>>>> least to me, falls clearly in theme territory since we're referring to the
>>>>>> presentational aspect of content.
>>>>>>
>>>>>> Of course, plugins could perform the same function, but for that
>>>>>> matter, plugins could perform any function you can do in a theme.
>>>>>>
>>>>>> On Tue, Oct 7, 2014 at 6:25 PM, Emil Uzelac <emil at uzelac.me> wrote:
>>>>>>
>>>>>>> My understanding was that theme overrides core, if so it is not
>>>>>>> accepted. Extending, sure :) User should be able to use core features.
>>>>>>>
>>>>>>> On Tue, Oct 7, 2014 at 6:21 PM, Otto <otto at ottodestruct.com> wrote:
>>>>>>>
>>>>>>>> I dunno, actually. It is an interesting question. How galleries
>>>>>>>> display is part of the visual style of the theme. I don't see anything
>>>>>>>> wrong with including masonry-enabled galleries in the theme, especially as
>>>>>>>> some kind of optional thing.
>>>>>>>>
>>>>>>>> Now, I would suggest to the theme author not to override the
>>>>>>>> gallery shortcode itself, but to use the post_gallery filter instead, which
>>>>>>>> will let them do essentially the same thing without tinkering with
>>>>>>>> "shortcodes".
>>>>>>>>
>>>>>>>> That said, you would want to make sure that the controls for
>>>>>>>> galleries in WordPress still operate as you would expect them to, more or
>>>>>>>> less. Obviously, something like masonry is probably going to change the
>>>>>>>> meaning of "columns" and the like, but still, that should be mostly
>>>>>>>> functional, to whatever extent makes sense.
>>>>>>>>
>>>>>>>> But then again, anything you do here in a theme could be done in a
>>>>>>>> plugin too, and said plugin could be made universal for any theme, so
>>>>>>>> unless this particular gallery shortcode is deeply tied to the theme in
>>>>>>>> some way, then it's probably better in a plugin.
>>>>>>>>
>>>>>>>>
>>>>>>>> -Otto
>>>>>>>>
>>>>>>>> On Tue, Oct 7, 2014 at 6:18 PM, Emil Uzelac <emil at uzelac.me> wrote:
>>>>>>>>
>>>>>>>>> Not silly at all :)
>>>>>>>>>
>>>>>>>>> This would definitely fall under plugins. ​
>>>>>>>>>
>>>>>>>>> On Tue, Oct 7, 2014 at 6:11 PM, Ryan Cowles <
>>>>>>>>> ryan.cowles at automattic.com> wrote:
>>>>>>>>>
>>>>>>>>>> Howdy,
>>>>>>>>>>
>>>>>>>>>> I'm reviewing a theme that overwrites the native gallery
>>>>>>>>>> shortcode with a custom Masonry gallery. Seems like a silly question, but
>>>>>>>>>> I'm looking for confirmation - would this fall under plugin territory?
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>> Ryan
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> theme-reviewers mailing list
>>>>>>>>>> theme-reviewers at lists.wordpress.org
>>>>>>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> theme-reviewers mailing list
>>>>>>>>> theme-reviewers at lists.wordpress.org
>>>>>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> theme-reviewers mailing list
>>>>>>>> theme-reviewers at lists.wordpress.org
>>>>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> theme-reviewers mailing list
>>>>>>> theme-reviewers at lists.wordpress.org
>>>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> theme-reviewers mailing list
>>>>>> theme-reviewers at lists.wordpress.org
>>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> theme-reviewers mailing list
>>>>> theme-reviewers at lists.wordpress.org
>>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> theme-reviewers mailing list
>>>> theme-reviewers at lists.wordpress.org
>>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>>
>>>>
>>>
>>> _______________________________________________
>>> theme-reviewers mailing list
>>> theme-reviewers at lists.wordpress.org
>>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>>
>>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20141007/f430688e/attachment-0001.html>


More information about the theme-reviewers mailing list