| 1 |
<?php |
| 2 |
namespace MBSocial; |
| 3 |
defined('ABSPATH') or die('No direct access permitted'); |
| 4 |
|
| 5 |
use \MaxButtons\maxField as maxField; |
| 6 |
use \MaxButtons\maxBlocks as maxBlocks; |
| 7 |
use \MaxButtons\maxButton as maxButton; |
| 8 |
use \MaxButtons\maxUtils as maxUtils; |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
$collectionBlock["admin"] = array('class' => "adminBlock", |
| 13 |
'order' => 999); |
| 14 |
|
| 15 |
class adminBlock extends block |
| 16 |
{ |
| 17 |
|
| 18 |
public function admin() |
| 19 |
{ |
| 20 |
|
| 21 |
return; |
| 22 |
|
| 23 |
$data = $this->data; |
| 24 |
$preset['style'] = $data['style']; |
| 25 |
$preset['layout'] = $data['layout']; |
| 26 |
$preset['effect'] = $data['effect']; |
| 27 |
$preset['count']= array('font_count_size' => $data['count']['font_count_size']); |
| 28 |
?> |
| 29 |
<div class='current'> |
| 30 |
<p>Current Preset: </p> |
| 31 |
|
| 32 |
<p><?php echo json_encode($preset); ?></p> |
| 33 |
</div> |
| 34 |
<?php |
| 35 |
|
| 36 |
$presets = new presets(); |
| 37 |
$sets = $presets->get(); |
| 38 |
|
| 39 |
$set = json_decode($sets['round'], ARRAY_A); |
| 40 |
|
| 41 |
echo "<PRE>"; print_R($set); echo "</pre>"; |
| 42 |
|
| 43 |
$args = array('preview' => true, |
| 44 |
'load_type' => 'inline', |
| 45 |
'echo' => false, |
| 46 |
'compile' => true, |
| 47 |
); |
| 48 |
|
| 49 |
$stylename = $set['style']['mbs-style']; |
| 50 |
$style = styles::getStyle($stylename); |
| 51 |
|
| 52 |
$collection = new collection(0 ); |
| 53 |
$collection->setStyle($style); |
| 54 |
|
| 55 |
foreach($set as $blockname => $blockdata) |
| 56 |
{ |
| 57 |
$collection->setData($blockname, $blockdata); |
| 58 |
} |
| 59 |
|
| 60 |
echo $collection->display($args); |
| 61 |
|
| 62 |
|
| 63 |
} |
| 64 |
|
| 65 |
} |
| 66 |
?> |
| 67 |
|