This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Remove panel-grid and panel-grid-cell classes using a filter

9 years ago · Last reply by Alex S 9 years ago

I’m creating some widgets based on the Extend Widget Bundle and am looking for a way to remove some classes from the grid html output without modifying the siteorigin-panels plugin code. My goal is to replace the Panels grid system with one I’m currently helping develop.

The classes I’d like to remove are ‘panel-grid’ and ‘panel-grid-cell’.

So far I’ve been able to add options fields to rows using custom_row_style_fields that lets users select a pre-defined layout. The classes for the custom grid are then added using the siteorigin_panels_row_cell_classes filter.

I’m unsure how to remove the ‘panel-grid’ class at this point.

Is this possible using filters? I’ve seen several questions around similar issues on the support forum but haven’t figured this out yet. :)

Thanks for creating and sharing all of your helpful plugins!

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Alex S Staff 9 years, 11 months ago

    Hi Matthew,

    The hooks you’re looking for are siteorigin_panels_row_classes and siteorigin_panels_row_cell_classes.

    For reference, here’s the exact lines, both found in this file. Here’s the lines:

    siteorigin_panels_row_classes

    $grid_classes = apply_filters( 'siteorigin_panels_row_classes', array('panel-grid'), $panels_data['grids'][$gi] );

    siteorigin_panels_row_cell_classes

    $cell_classes = apply_filters( 'siteorigin_panels_row_cell_classes', array('panel-grid-cell'), $panels_data );

    Links are current as of posting, can’t promise they will be in the future however so I’ve included the exact line contents for reference also.

  2. Matthew Gross Private 9 years, 10 months ago

    This is a private message.

  3. Alex S Private Staff 9 years, 10 months ago

    This is a private message.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread