# share-button/1.11/classes/blocks/admin_block.php

Social Share Buttons, version 1.11. 67 lines.

- Page: https://pluginprobe.com/plugins/share-button/1.11/code/classes/blocks/admin_block.php
- Raw: https://pluginprobe.com/plugins/share-button/1.11/raw/classes/blocks/admin_block.php
- Modified: 2018-02-23T11:42:42+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/share-button/1.11/code/classes/blocks/admin_block.php#L10-L20`.

```php
<?php
namespace MBSocial;
defined('ABSPATH') or die('No direct access permitted');

use \MaxButtons\maxField as maxField;
use \MaxButtons\maxBlocks as maxBlocks;
use \MaxButtons\maxButton as maxButton;
use \MaxButtons\maxUtils as maxUtils;



$collectionBlock["admin"] = array('class' => "adminBlock",
								  'order' => 999);

class adminBlock extends block
{

	public function admin()
	{

		return;

		$data = $this->data;
		$preset['style'] = $data['style'];
		$preset['layout'] = $data['layout'];
		$preset['effect']  = $data['effect'];
		$preset['count']= array('font_count_size' => $data['count']['font_count_size']);
	?>
		<div class='current'>
				<p>Current Preset: </p>

				<p><?php echo json_encode($preset); ?></p>
		</div>
	<?php

		$presets = new presets();
		$sets = $presets->get();

		$set = json_decode($sets['round'], ARRAY_A);

	echo "<PRE>"; print_R($set); echo "</pre>";

		$args = array('preview' => true,
					 'load_type' => 'inline',
					 'echo' => false,
					 'compile' => true,
					);

		$stylename = $set['style']['mbs-style'];
		$style = styles::getStyle($stylename);

		$collection = new collection(0 );
		$collection->setStyle($style);

		foreach($set as $blockname => $blockdata)
		{
			$collection->setData($blockname, $blockdata);
		}

		echo $collection->display($args);


	}

}
?>

```
