PluginProbe
Social Share Buttons / 1.12
Social Share Buttons v1.12
trunk 0.9 1.0 1.1 1.1.1 1.1.2 1.10 1.11 1.12 1.15 1.16 1.17 1.18 1.19 1.2 1.20 1.3 1.30 1.4 1.5 1.6 1.7 1.8 1.9
share-button / admin / page_networks.php

page_networks.php in Social Share Buttons 1.12, at admin/page_networks.php

79 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace MBSocial;
3
4 use \MaxButtons\maxField as maxField;
5 use \MaxButtons\maxBlocks as maxBlocks;
6
7 $networks = MBSocial()->networks()->get();
8
9
10 $network_array = array();
11 $networkBlock = collections::getBlock('networkBlock');
12
13 foreach($networks as $network)
14 {
15 $name = $network->get('network');
16 $native = $network->get('is_native');
17
18 if (! $network->get('is_editable'))
19 {
20 continue;
21 }
22
23 $label = $network->get_nice_name();
24 $icon_args = array(
25 'icon' => $network->get('icon'),
26 'icon_type' => $network->get('icon_type'),
27 );
28 if ($icon_args['icon_type'] == 'image')
29 {
30 $icon_args['image_id'] = $network->get('icon_image_id');
31 $icon_args['image_size'] = $network->get('icon_image_size');
32 $icon_args['image_url'] = $network->get('icon_image_url');
33 }
34
35 $icon = MBSocial()->admin()->renderIcon($icon_args); //$networkBlock->renderIcon($network);
36
37 $network_array[$name] = array(
38 'label' => $label,
39 'icon' => $icon,
40 );
41
42 }
43
44 ksort($network_array);
45
46 ?>
47
48 <div class='network_selection'>
49 <a href='#add' class='add-custom-network button mb-ajax-action' data-action='show-customnetworks'><?php _e('Add Other Networks', 'mbsocial'); ?></a>
50
51 <ul>
52 <?php foreach ($network_array as $name => $item):
53
54 ?>
55
56 <li class='mb-ajax-action' data-action='network-settings' data-param='<?php echo $name ?>'>
57 <?php echo $item['icon'] ?> <span class='label'><?php echo $item['label']; ?></span>
58
59 </li>
60
61 <?php endforeach; ?>
62 </ul>
63
64 </div>
65
66 <form method="POST" class="mb-ajax-form" data-action="network-save">
67 <div class='network_editor option-container'>
68 <div class='title'><?php _e("Settings", 'mbsocial'); ?> </div>
69 <div class='inside'>
70
71 <h4><?php _e("Welcome to the Network Editor!", 'mbsocial'); ?></h4>
72 <p>You can change default Network Options using the selection on the left hand</p>
73 <p>You can select additional networks with the 'add other networks' button</p>
74
75 </div>
76
77 </div>
78 </form>
79