This file contains 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
composer config --global repositories.beaver-builder composer https://composer.wpbeaverbuilder.com/KEY |
This file contains 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 // Do not copy this line, start from line 3 onwards | |
function check_field_connections( $is_visible, $node ) { | |
if ( isset( $node->settings->connections ) ) { | |
foreach ( $node->settings->connections as $key => $connection ) { | |
if ( ! empty( $connection ) && empty( $node->settings->$key ) ) { | |
return false; | |
} | |
} |
This file contains 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 | |
class FLExampleModule extends FLBuilderModule { | |
public function __construct() { | |
parent::__construct( array( | |
'name' => 'Example', | |
) ); | |
} | |
public function filter_settings( $settings ) { |
This file contains 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 | |
/** | |
* Render a single rule for a single device size. | |
*/ | |
FLBuilderCSS::rule( array( | |
'selector' => ".fl-node-$id .some-element", | |
'media' => 'max-width: 980px', // Optional. Can be `default`, `medium`, `responsive` or a custom statement. | |
'enabled' => 'bar' === $settings->foo, // Optional. | |
'props' => array( | |
'background-image' => $settings->bg_image_src, |
This file contains 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 | |
'my_text' => array( | |
'type' => 'text', | |
'label' => 'My Text', | |
'preview' => array( | |
'type' => 'attribute', | |
'attribute' => 'data-foo', | |
'selector' => '.my-selector', | |
'format_callback' => '', // Optional JS format callback. | |
), |
This file contains 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 | |
'text_color' => array( | |
'type' => 'color', | |
'label' => 'Text Color', | |
'preview' => array( | |
'type' => 'css', | |
'selector' => '.my-selector', | |
'property' => 'color', | |
'important' => true, | |
), |
This file contains 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
function myPreviewCallback( args ) { | |
/** | |
* Use `args` for any kind of preview logic you can dream of! | |
*/ | |
console.log( args ) | |
} |
This file contains 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 | |
'my_color' => array( | |
'type' => 'color', | |
'label' => 'My Color', | |
'preview' => array( | |
'type' => 'callback', | |
'callback' => 'myPreviewCallback', | |
), | |
), |
This file contains 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 | |
'my_text' => array( | |
'type' => 'text', | |
'label' => 'My Text', | |
'inline_editor' => false, | |
), |
This file contains 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 | |
'my_section' => array( | |
'title' => 'My Section', | |
'collapsed' => true, | |
'fields' => array( ... ), | |
), |
NewerOlder