| 1 |
<?php |
| 2 |
namespace MBSocial; |
| 3 |
defined('ABSPATH') or die('No direct access permitted'); |
| 4 |
|
| 5 |
use MaxButtons\maxButton as maxButton; |
| 6 |
|
| 7 |
$button = new maxButton(); // this loads the maxblocks template files |
| 8 |
|
| 9 |
|
| 10 |
$title = (Install::isPro()) ? __('Wordpress Share Buttons PRO', 'mbsocial') : __('WordPress Share Buttons','mbsocial'); |
| 11 |
$header = array( |
| 12 |
'title' => $title, |
| 13 |
); |
| 14 |
|
| 15 |
$mainclass = 'maxbuttons-social-editor'; |
| 16 |
$admin = mbSocial()->admin(); |
| 17 |
$admin->header($header); |
| 18 |
|
| 19 |
|
| 20 |
$collection_ids = collections::getCollections(); |
| 21 |
|
| 22 |
|
| 23 |
if (count($collection_ids) == 0) |
| 24 |
$collection_ids = array(0); |
| 25 |
|
| 26 |
|
| 27 |
?> |
| 28 |
|
| 29 |
<?php foreach ($collection_ids as $collection_id): ?> |
| 30 |
|
| 31 |
<?php if ($collection_id > 0): ?> |
| 32 |
<div class='mb-message shortcode'> |
| 33 |
<?php printf(__('Shortcode for manual use: [maxsocial id="%s"]','mbsocial'), $collection_id); ?> |
| 34 |
</div> |
| 35 |
<?php endif; ?> |
| 36 |
|
| 37 |
<form class='mb-ajax-form' data-action='save-share'> |
| 38 |
<input type='hidden' name="collection_id" value="<?php echo $collection_id ?>" /> |
| 39 |
|
| 40 |
|
| 41 |
<div class="form-actions "> |
| 42 |
<button type="button" class="button-primary button-save mb-ajax-submit" data-action='save_collection'><?php _e('Save', 'maxbuttons') ?></button> |
| 43 |
</div> |
| 44 |
|
| 45 |
<?php include('share_editor.php'); ?> |
| 46 |
|
| 47 |
<?php //$admin->output_defined_fields(); ?> |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
<div class="form-actions"> |
| 52 |
<button type="button" class="button-primary button-save mb-ajax-submit" data-action='save_collection'><?php _e('Save', 'maxbuttons') ?></button> |
| 53 |
</div> |
| 54 |
<?php $admin->footer(); ?> |
| 55 |
</form> |
| 56 |
<?php endforeach; ?> |
| 57 |
|