Last active
November 16, 2021 17:07
-
-
Save AlexGStapleton/2c4210cd765cec5329cf5a7c07ae8179 to your computer and use it in GitHub Desktop.
SiteOrigin Page Builder: Output Row Class Containing Cell Count If More Than One Cell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'siteorigin_panels_row_classes', function( $row_classes, $row ) { | |
if ( ! empty( $row['cells'] ) && count( $row['cells'] ) > 1) { | |
$row_classes[] = 'panel-row-cells-' . count( $row['cells'] ); | |
} | |
return $row_classes; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment