File: //home/globfdxw/diasporameetsafrica.com/wp-content/themes/DA10/framework/docs/s_carddata.php
<?php
global $CORE, $CORE_UI, $userdata, $settings;
$themes = array("at","ct","cm","dl","dt","da","es","ll","ph","pj","mj","rt","sp","so","vt","jb"); //"cp",
foreach($themes as $t){
$GLOBALS['TEST_THEME_KEY'] = $t;
echo "<span class='mr-3'>".$t."<hr></span>";
// ADMIN PREVIEW
if(!isset($post->ID)){
$post = new stdClass();
$post->ID = 1;
$post->post_title = "This is a sample title.";
$post->post_author = 1;
$post->post_excerpt = "";
$post->post_content = "";
$post->comment_count = 0;
$post->thistheme = THEME_KEY;
$post->carddata = "";
}
?>
<div class="row">
<div class="col-md-3">
<?php $settings['card'] = "grid"; _ppt_template( 'content-listing' ); ?>
</div>
<div class="col-md-8">
<?php $settings['card'] = "list"; _ppt_template( 'content-listing' ); ?>
<hr>
<?php $settings['card'] = "account"; _ppt_template( 'content-listing' ); ?>
</div>
</div>
<?php
}
$GLOBALS['TEST_THEME_KEY'] = $t;
$fieldsData = "";
$fieldsData = ppt_theme_card_data('defaults');
echo $t;
?>
<textarea class="w-100" style="height:250px;"><?php print_r($fieldsData); ?></textarea>
<?php
foreach($fieldsData as $k => $v){
if(!isset($v['example'])){ $v['example'] = ""; }
echo "<span class='mr-3'>".$k." <span class='fs-sm'>(".$v['example'].")</span></span>";
}
$grid_top = array();
$grid_bottom = array();
$list_top = array();
$list_bottom = array();
$mobile = array();
$single_short = array();
$single_long = array();
foreach($fieldsData as $k => $v){
if(isset($v['show'])){
if(in_array("single_short",$v['show'])){
$single_short[] = $v;
}
if(in_array("single_long",$v['show'])){
$single_long[] = $v;
}
if(in_array("grid_top",$v['show'])){
$grid_top[] = $v;
}
if(in_array("grid_bottom",$v['show'])){
$grid_bottom[] = $v;
}
if(in_array("list_top",$v['show'])){
$list_top[] = $v;
}
if(in_array("list_bottom",$v['show'])){
$list_bottom[] = $v;
}
if(in_array("mobile",$v['show'])){
$mobile[] = $v;
}
}
}
echo "<hr><strong>Grid Top</strong>: ";
foreach($grid_top as $k => $v){
echo "<span class='mr-3 badge badge-primary'>".$v['name']."</span>";
}
echo "<br><br><strong>Grid Bottom</strong>: ";
foreach($grid_bottom as $k => $v){
echo "<span class='mr-3 badge badge-primary'>".$v['name']."</span>";
}
echo "<hr><strong>List Top</strong>: ";
foreach($list_top as $k => $v){
echo "<span class='mr-3 badge badge-secondary'>".$v['name']."</span>";
}
echo "<br><br><strong>List Bottom</strong>: ";
foreach($list_bottom as $k => $v){
echo "<span class='mr-3 badge badge-secondary'>".$v['name']."</span>";
}
echo "<hr><strong>Single Short</strong>: ";
foreach($single_short as $k => $v){
echo "<span class='mr-3 badge badge-warning'>".$v['name']."</span>";
}
echo "<br><br><strong>Single Long</strong>: ";
foreach($single_long as $k => $v){
echo "<span class='mr-3 badge badge-warning'>".$v['name']."</span>";
}
echo "<hr><strong>Mobile</strong>: ";
foreach($mobile as $k => $v){
echo "<span class='mr-3 badge badge-danger'>".$v['name']."</span>";
}
echo "<hr />";
?>
<style>
.ppt-docs-jumpnav { display:none!important; }
[data-sidebar-style="full"] #ppt-doc-page-output {
margin-right: 0px!important;
}
</style>