$this->attributes(), 'render_callback' => [$this, 'render'] ) ); } function attributes(){ return array( 'align' => array( 'type' => 'string', 'default' => '' ), 'cId' => array( 'type' => 'string', 'default' => '' ), 'members' => array( 'type' => 'array', 'default' => array( array( 'background' => array( 'color' => '#0000' ), 'border' => array( 'radius' => '3px' ), 'shadow' => array(), 'photo' => array( 'id' => NULL, 'url' => '', 'alt' => '', 'title' => '' ), 'photoBorder' => array( 'radius' => '50%' ), 'name' => 'Martin', 'nameColor' => '#333', 'title' => 'Founder', 'titleColor' => '#333', 'separator' => array( 'width' => '20%', 'height' => '3px', 'color' => '#777' ), 'bio' => 'I am a self-motivated and self-taught professional who likes to solve problems.', 'bioColor' => '#333', 'social' => array( array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-facebook' ) ), array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-twitter' ) ), array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-linkedin' ) ) ), 'socialIconColors' => array( 'type' => 'object', 'default' => array( 'color' => '#fff', 'bg' => '#4527a4' ) ) ), array( 'background' => array( 'color' => '#0000' ), 'border' => array( 'radius' => '3px' ), 'shadow' => array(), 'photo' => array( 'id' => NULL, 'url' => '', 'alt' => '', 'title' => '' ), 'photoBorder' => array( 'radius' => '50%' ), 'name' => 'Mary', 'nameColor' => '#333', 'title' => 'Co-Founder', 'titleColor' => '#333', 'separator' => array( 'width' => '20%', 'height' => '3px', 'color' => '#777' ), 'bio' => 'I am a self-motivated and self-taught professional who likes to solve problems.', 'bioColor' => '#333', 'social' => array( array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-facebook' ) ), array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-twitter' ) ), array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-linkedin' ) ) ), 'socialIconColors' => array( 'type' => 'object', 'default' => array( 'color' => '#fff', 'bg' => '#4527a4' ) ) ), array( 'background' => array( 'color' => '#0000' ), 'border' => array( 'radius' => '3px' ), 'shadow' => array(), 'photo' => array( 'id' => NULL, 'url' => '', 'alt' => '', 'title' => '' ), 'photoBorder' => array( 'radius' => '50%' ), 'name' => 'John Doe', 'nameColor' => '#333', 'title' => 'CEO', 'titleColor' => '#333', 'separator' => array( 'width' => '20%', 'height' => '3px', 'color' => '#777' ), 'bio' => 'I am a self-motivated and self-taught professional who likes to solve problems.', 'bioColor' => '#333', 'social' => array( array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-facebook' ) ), array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-twitter' ) ), array( 'link' => '#', 'icon' => array( 'class' => 'fa fa-linkedin' ) ) ), 'socialIconColors' => array( 'type' => 'object', 'default' => array( 'color' => '#fff', 'bg' => '#4527a4' ) ) ) ) ), 'columns' => array( 'type' => 'object', 'default' => array( 'desktop' => 3, 'tablet' => 2, 'mobile' => 1 ) ), 'columnGap' => array( 'type' => 'string', 'default' => '30px' ), 'rowGap' => array( 'type' => 'string', 'default' => '30px' ), 'layout' => array( 'type' => 'string', 'default' => 'vertical' ), 'style' => array( 'type' => 'string', 'default' => 'default' ), 'textAlign' => array( 'type' => 'string', 'default' => 'center' ), 'padding' => array( 'type' => 'object', 'default' => array( 'vertical' => '50px', 'horizontal' => '20px' ) ), 'photoWidth' => array( 'type' => 'string', 'default' => '170px' ), 'photoMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '20px' ) ), 'nameTypo' => array( 'type' => 'object', 'default' => array( 'fontSize' => 20, 'fontWeight' => 600 ) ), 'nameMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '10px' ) ), 'isTitle' => array( 'type' => 'boolean', 'default' => true ), 'titleTypo' => array( 'type' => 'object', 'default' => array( 'fontSize' => 16 ) ), 'titleMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '10px' ) ), 'isSep' => array( 'type' => 'boolean', 'default' => true ), 'sepMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '15px' ) ), 'isBio' => array( 'type' => 'boolean', 'default' => true ), 'bioTypo' => array( 'type' => 'object', 'default' => array( 'fontSize' => 15 ) ), 'bioMargin' => array( 'type' => 'object', 'default' => array( 'bottom' => '15px' ) ), 'isSocial' => array( 'type' => 'boolean', 'default' => true ), 'socialIconMargin' => array( 'type' => 'object', 'default' => array( 'side' => 2, 'vertical' => '10px', 'horizontal' => '10px' ) ) ); } function render( $attributes ){ extract( $attributes ); // Generate Styles $teamMembersStyle = new BBlocksStyleGenerator(); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers", array( 'grid-gap' => "$rowGap $columnGap" ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember", array( 'text-align' => $textAlign, 'padding' => $padding['styles'] ?? '50px 20px' ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember .memberPhoto", array( 'width' => $photoWidth, 'margin' => 'horizontal' === $layout ? '0 20px 0 0' : $photoMargin['styles'] ?? '0 0 20px 0' ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember .memberDetails .memberName", array( $nameTypo['styles'] ?? 'font-size: 20px; font-weight: 600;' => '', 'margin' => $nameMargin['styles'] ?? '0 0 10px 0' ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember .memberDetails .memberTitle", array( $titleTypo['styles'] ?? 'font-size: 16px;' => '', 'margin' => $titleMargin['styles'] ?? '0 0 10px 0' ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember .memberDetails .memberSeparator", array( 'margin' => $sepMargin['styles'] ?? '0 0 15px 0' ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember .memberDetails .memberBio", array( $bioTypo['styles'] ?? 'font-size: 15px;' => '', 'margin' => $bioMargin['styles'] ?? '0 0 15px 0' ) ); $teamMembersStyle::addStyle( "#bBlocksTeamMembers-$cId .bBlocksTeamMembers .bBlocksMember .memberDetails .memberSocial .icon", array( 'margin' => $socialIconMargin['styles'] ?? '10px 10px' ) ); ob_start(); ?>