File: //home/globfdxw/diasporameetsafrica.com/wp-content/themes/DA10/framework/design/text/text154a.php
<?php
add_filter( 'ppt_blocks_args', array('block_text154a', 'data') );
add_action( 'text154a', array('block_text154a', 'output' ) );
add_action( 'text154a-css', array('block_text154a', 'css' ) );
add_action( 'text154a-js', array('block_text154a', 'js' ) );
class block_text154a {
function __construct(){}
public static function data($a){ global $CORE;
$a['text154a'] = array(
"name" => "Style 154",
"image" => "text154a.jpg",
"cat" => array("text","icon"),
"desc" => "",
"order" => 0,
"widget" => "ppt-text",
"data" => array( ),
"defaults" => array( ),
);
return $a;
} public static function output(){ global $CORE, $text_settings;
// ALL DEFAULT FIELDS
$df = ppt_theme_blocks_defaults("text");
$cc = array(
"f1image" => "https://premiumpress1063.b-cdn.net/images/800x600.png",
"f2image" => "https://premiumpress1063.b-cdn.net/images/800x600.png",
"f3image" => "https://premiumpress1063.b-cdn.net/images/800x600.png",
"f1a" => "Example Title",
"f2a" => "Example Title",
"f3a" => "Example Title",
"f4image" => "https://premiumpress1063.b-cdn.net/images/800x600.png",
"f5image" => "https://premiumpress1063.b-cdn.net/images/800x600.png",
"f6image" => "https://premiumpress1063.b-cdn.net/images/800x600.png",
"f4a" => "Example Title",
"f5a" => "Example Title",
"f6a" => "Example Title",
);
$df = array_merge($df, $cc);
// APPLY ELEMENTOR
if(!empty($text_settings)){
foreach($df as $k => $v){
if(isset($text_settings[$k]) && $text_settings[$k] != "" ){
$df[$k] = $text_settings[$k];
}
}
}else{
$settings = $CORE->LAYOUT("get_block_settings_defaults_new", array("text", "text154a" ) );
foreach($df as $h => $j){
if(isset($settings[$h]) && $settings[$h] != ""){
$df[$h] = $settings[$h];
}
}
}
ob_start();
?>
<section class="section-60 bg-white">
<div class="container">
<div class="row">
<?php
$i=1; while($i < 9){
if(!isset($df['f'.$i.'a']) || ( isset($df['f'.$i.'a']) && $df['f'.$i.'a'] == "") ) { $i++; continue; }
?>
<div class="col-lg-4 mb-4">
<figure class="rounded mb-4 overflow-hidden shadow" style="max-height:300px;">
<div data-ppt-f<?php echo $i; ?>image>
<img data-src="<?php echo $df['f'.$i.'image']; ?>" class="img-fluid lazy rounded" alt="<?php echo $df['f'.$i.'a']; ?>" data-ppt-image<?php echo $i; ?>>
</div>
</figure>
<div class="mb-3 fs-5 text-600" data-ppt-f<?php echo $i; ?>a><?php echo $df['f'.$i.'a']; ?></div>
<?php if(isset($df['f'.$i.'b']) && strlen($df['f'.$i.'b']) > 1){ ?><p class="mb-0 lh-30 mobile-mb-2" data-ppt-f<?php echo $i; ?>b></p><?php } ?>
</div>
<?php $i++; } ?>
<?php if(isset($df['btn_show']) && $df['btn_show'] == 1){ ?>
<div class="col-12 text-center my-sm-4">
<a href="<?php echo home_url()."/?s="; ?>" class="btn-lg btn-primary btn-rounded-25 mt-2 btn-icon icon-after" data-ppt-btn data-ppt-btn-link>
<span data-ppt-btn_txt><?php echo $df['btn_txt']; ?></span> <i class="fa fa-long-arrow-alt-right"> </i>
</a>
</div>
<?php } ?>
</div>
</div>
</section>
<?php
$output = ob_get_contents();
ob_end_clean();
echo ppt_theme_block_output($output, $text_settings, array("text", "text154a"));
}
public static function css(){
return "";
ob_start();
$output = ob_get_contents();
ob_end_clean();
echo $output;
}
public static function js(){
return "";
ob_start();
?>
<?php
$output = ob_get_contents();
ob_end_clean();
echo $output;
}
}
?>