PluginProbe
Social Share Buttons / 1.1.2
Social Share Buttons v1.1.2
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.1.2, at admin/page_networks.php

105 lines 2.4 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 //echo "<PRE>"; print_r($networks); echo "</PRE>";
10 $network_array = array();
11 $networkBlock = collections::getBlock('networkBlock');
12
13 foreach($networks as $network)
14 {
15 $name = $network->get('network');
16 $label = $network->get_nice_name();
17 $icon = $networkBlock->renderIcon($network);
18
19 $network_array[$name] = array(
20 'label' => $label,
21 'icon' => $icon,
22 );
23
24 }
25 ksort($network_array);
26 ?>
27
28 <div class='network_selection'>
29 <a href='#add'><?php _e('Add Custom Network', 'mbsocial'); ?></a>
30
31 <ul>
32 <?php foreach ($network_array as $name => $item):
33
34 ?>
35
36 <li><?php echo $item['icon'] ?> <span class='label'><?php echo $item['label']; ?></span>
37
38 </li>
39
40 <?php endforeach; ?>
41 </ul>
42
43 </div>
44
45 <div class='network_editor option-container'>
46
47 <div class='title'><?php _e("Settings", 'mbsocial'); ?> </div>
48 <div class='inside'>
49 <?php
50
51 $active = new maxField('switch');
52 $active->id = 'active';
53 $active->name = $active->id;
54 $active->label = __('Active', 'mbsocial');
55
56 $admin->addField($active, 'start','end');
57
58 $name = new maxField('text');
59 $name->id = 'label';
60 $name->name = $name->id;
61 $name->value = '';
62 $name->label = __('Label', 'mbsocial');
63
64 $admin->addField($name, 'start', 'end');
65
66 $shareurl = new maxField('text');
67 $shareurl->id = 'share_url';
68 $shareurl->name = $shareurl->id;
69 $shareurl->value = '';
70 $shareurl->label = __('Share URL', 'mbsocial');
71
72 $admin->addField($shareurl, 'start', 'end');
73
74 $profileurl = new maxField('text');
75 $profileurl->id = 'profile_url';
76 $profileurl->name = $profileurl->id;
77 $profileurl->value = '';
78 $profileurl->label = __('Profile URL', 'mbsocial');
79
80 $admin->addField($profileurl,'start', 'end');
81
82 $popupwidth = new maxField('text');
83 $popupwidth->id = 'popup_width';
84 $popupwidth->name = $popupwidth->id;
85 $popupwidth->value = '';
86 $popupwidth->inputclass ='tiny';
87 $popupwidth->label = __('Width', 'mbsocial');
88
89 $admin->addField($popupwidth, 'start');
90
91 $popupheight = new maxField('text');
92 $popupheight->id = 'popup_height';
93 $popupheight->name = $popupheight->id;
94 $popupheight->value = '';
95 $popupheight->inputclass = 'tiny';
96 $popupheight->label = __('Height', 'mbsocial');
97
98 $admin->addField($popupheight, '', 'end');
99
100 $admin->display_fields();
101
102 ?>
103 </div>
104 </div>
105