$this->attributes(), 'render_callback' => [$this, 'render'] ) ); } function attributes(){ return array( 'align' => array( 'type' => 'string', 'default' => '' ), 'cId' => array( 'type' => 'string', 'default' => '' ), 'features' => array( 'type' => 'array', 'default' => array( array( 'background' => array( 'color' => '#0000' ), 'isUpIcon' => false, 'icon' => array( 'class' => 'fa fa-wordpress', 'fontSize' => 120 ), 'upIcon' => array( 'id' => NULL, 'url' => '', 'alt' => '', 'title' => '' ), 'iconWidth' => '120px', 'title' => 'Feature 1', 'titleColor' => '#333', 'separator' => array( 'width' => '20%', 'height' => '2px', 'style' => 'solid', 'color' => '#bbb' ), 'desc' => 'This content area describes feature 1 descriptions or details.', 'descColor' => '#333' ), array( 'background' => array( 'color' => '#0000' ), 'isUpIcon' => false, 'icon' => array( 'class' => 'fa fa-wordpress', 'fontSize' => 120 ), 'upIcon' => array( 'id' => NULL, 'url' => '', 'alt' => '', 'title' => '' ), 'iconWidth' => '120px', 'title' => 'Feature 2', 'titleColor' => '#333', 'separator' => array( 'width' => '20%', 'height' => '2px', 'style' => 'solid', 'color' => '#bbb' ), 'desc' => 'This content area describes feature 2 descriptions or details.', 'descColor' => '#333' ), array( 'background' => array( 'color' => '#0000' ), 'isUpIcon' => false, 'icon' => array( 'class' => 'fa fa-wordpress', 'fontSize' => 120 ), 'upIcon' => array( 'id' => NULL, 'url' => '', 'alt' => '', 'title' => '' ), 'iconWidth' => '120px', 'title' => 'Feature 3', 'titleColor' => '#333', 'separator' => array( 'width' => '20%', 'height' => '2px', 'style' => 'solid', 'color' => '#bbb' ), 'desc' => 'This content area describes feature 3 descriptions or details.', 'descColor' => '#333' ) ) ), 'columns' => array( 'type' => 'object', 'default' => array( 'desktop' => 3, 'tablet' => 2, 'mobile' => 1 ) ), 'columnGap' => array( 'type' => 'string', 'default' => '30px' ), 'rowGap' => array( 'type' => 'string', 'default' => '30px' ), 'textAlign' => array( 'type' => 'string', 'default' => 'center' ), 'padding' => array( 'type' => 'object', 'default' => array( 'vertical' => '50px', 'horizontal' => '20px' ) ), 'isIcon' => array( 'type' => 'boolean', 'default' => true ), 'iconMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '20px' ) ), 'isTitle' => array( 'type' => 'boolean', 'default' => true ), 'titleTypo' => array( 'type' => 'object', 'default' => array( 'fontSize' => 20, 'fontWeight' => 600 ) ), 'titleMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '10px' ) ), 'isSep' => array( 'type' => 'boolean', 'default' => true ), 'sepMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '10px' ) ), 'isDesc' => array( 'type' => 'boolean', 'default' => true ), 'descTypo' => array( 'type' => 'object', 'default' => array( 'fontSize' => 15 ) ) ); } function render( $attributes ){ extract( $attributes ); // Generate Styles $featureBoxesStyle = new BBlocksStyleGenerator(); $featureBoxesStyle::addStyle( "#bBlocksFeatureBoxes-$cId .bBlocksFeatureBoxes", array( 'grid-gap' => "$rowGap $columnGap" ) ); $featureBoxesStyle::addStyle( "#bBlocksFeatureBoxes-$cId .bBlocksFeatureBoxes .bBlocksFeature", array( 'text-align' => $textAlign, 'padding' => $padding['styles'] ?? '50px 20px' ) ); $featureBoxesStyle::addStyle( "#bBlocksFeatureBoxes-$cId .bBlocksFeatureBoxes .bBlocksFeature .featureIcon", array( 'margin' => $iconMargin['styles'] ?? '0 0 10px 0' ) ); $featureBoxesStyle::addStyle( "#bBlocksFeatureBoxes-$cId .bBlocksFeatureBoxes .bBlocksFeature .featureTitle", array( $titleTypo['styles'] ?? 'font-size: 20px; font-weight: 600;' => '', 'margin' => $titleMargin['styles'] ?? '0 0 10px 0' ) ); $featureBoxesStyle::addStyle( "#bBlocksFeatureBoxes-$cId .bBlocksFeatureBoxes .bBlocksFeature .featureSeparator", array( 'margin' => $sepMargin['styles'] ?? '0 0 10px 0' ) ); $featureBoxesStyle::addStyle( "#bBlocksFeatureBoxes-$cId .bBlocksFeatureBoxes .bBlocksFeature .featureDescription", array( $descTypo['styles'] ?? 'font-size: 15px;' => '' ) ); ob_start(); ?>