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
<?php | |
function filter_bb_layout_data( $nodes ) { | |
// Loop through the nodes. | |
foreach ( $nodes as $node_id => $node ) { | |
// Update row settings. | |
if ( 'row' === $node->type ) { |
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
<?php | |
add_filter( 'fl_builder_register_settings_form', 'add_back_bb_row_bg_opacity', 10, 2 ); | |
add_filter( 'fl_builder_node_settings', 'apply_opacity_to_bb_row_bg_color', 10, 2 ); | |
function add_back_bb_row_bg_opacity( $form, $slug ) { | |
if ( 'row' === $slug ) { | |
$form['tabs']['style']['sections']['bg_color']['fields']['bg_opacity'] = array( | |
'type' => 'unit', | |
'label' => __( 'Opacity', 'fl-builder' ), |
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
<?php | |
add_filter( 'fl_builder_render_settings_field', function( $field, $name, $setting ) { | |
if ( 'data_source' === $name ) { | |
$field['options']['my_option'] = __( 'My Option' ); | |
} | |
return $field; | |
}, 10, 3 ); |
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
FLBuilder.addHook( 'didRenderLayoutComplete', function() { | |
var form = $( '.fl-builder-settings' ) | |
if ( ! form.length || 'post-grid' !== form.data( 'type' ) ) { | |
return | |
} | |
// Posts module form is open and the layout just re-rendered. | |
} ) |
OlderNewer