Title: if (! empty( $attr[&#039;type&#039;]) &amp;&amp; $attr[&#039;type&#039;] == &#039;native&#039;) BUG
Last modified: August 22, 2016

---

# if (! empty( $attr['type']) && $attr['type'] == 'native') BUG

 *  [radi_v](https://wordpress.org/support/users/radi_v/)
 * (@radi_v)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/if-empty-attrtype-attrtype-native-bug-2/)
 * Could not edit my first ticket, so here is the same one after the edidt.
 *     ```
       if (! empty( $attr['type']) && $attr['type'] == 'native') {
       	// returning nothing will make gallery_shortcode take over
       	return '';
       }
       ```
   
 * The if statement should be updated to just:
 *     ```
       if (!empty($attr['type']) && $attr['type'] != 'rgg'){return '';}
       ```
   
 * Because if I have some special type to do something else, your plugin breaks 
   it. You should not assume that type is not being used by other functions or plugins…
 * [https://wordpress.org/plugins/responsive-gallery-grid/](https://wordpress.org/plugins/responsive-gallery-grid/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [radi_v](https://wordpress.org/support/users/radi_v/)
 * (@radi_v)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/if-empty-attrtype-attrtype-native-bug-2/#post-5331624)
 * Updated. Please see my other ticket.
 *  Plugin Author [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * (@jules-colle)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/if-empty-attrtype-attrtype-native-bug-2/#post-5331807)
 * Good point. The problem however is that I want all native wordpress galleries
   to become responsive galleries out of the box, without having users to specify
   this one by one. I could maybe drop the type parameter and introduce a parameter
   called `disable_rgg` instead that would need the value `true` in order to disable
   the responsive gallery.
 * Will think about it.
 * EDIT: oh wait, your code seems like it’s what I need. If the type parameter is
   omitted, RGG will be used as well. Great stuff. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘if (! empty( $attr['type']) && $attr['type'] == 'native') BUG’ is closed
to new replies.

 * ![](https://ps.w.org/responsive-gallery-grid/assets/icon-256x256.png?rev=2072597)
 * [Responsive Gallery Grid](https://wordpress.org/plugins/responsive-gallery-grid/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-gallery-grid/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-gallery-grid/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-gallery-grid/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-gallery-grid/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-gallery-grid/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Jules Colle](https://wordpress.org/support/users/jules-colle/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/if-empty-attrtype-attrtype-native-bug-2/#post-5331807)
 * Status: not resolved