Skip to content

Instantly share code, notes, and snippets.

@carlosonweb
Created March 16, 2018 23:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosonweb/ab71d8635fe3bd6fbef54b42a4df69d0 to your computer and use it in GitHub Desktop.
Save carlosonweb/ab71d8635fe3bd6fbef54b42a4df69d0 to your computer and use it in GitHub Desktop.
Add Row Custom Attributes To A Beaver Builder Row
add_filter( 'fl_builder_row_attributes', function( $attrs, $row ){
if ( $row->settings->id === 'ROW-ID-HERE' ){
$attrs['data-THE-FIELD-HERE'] = 'THE-VALUE-HERE';
}
return $attrs;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment