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

73 lines 1.7 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
29 $icon = MBSocial()->admin()->renderIcon($icon_args); //$networkBlock->renderIcon($network);
30
31 $network_array[$name] = array(
32 'label' => $label,
33 'icon' => $icon,
34 );
35
36 }
37
38 ksort($network_array);
39
40 ?>
41
42 <div class='network_selection'>
43 <a href='#add' class='add-custom-network button mb-ajax-action' data-action='show-customnetworks'><?php _e('Add Other Networks', 'mbsocial'); ?></a>
44
45 <ul>
46 <?php foreach ($network_array as $name => $item):
47
48 ?>
49
50 <li class='mb-ajax-action' data-action='network-settings' data-param='<?php echo $name ?>'>
51 <?php echo $item['icon'] ?> <span class='label'><?php echo $item['label']; ?></span>
52
53 </li>
54
55 <?php endforeach; ?>
56 </ul>
57
58 </div>
59
60 <form method="POST" class="mb-ajax-form" data-action="network-save">
61 <div class='network_editor option-container'>
62 <div class='title'><?php _e("Settings", 'mbsocial'); ?> </div>
63 <div class='inside'>
64
65 <h4><?php _e("Welcome to the Network Editor!", 'mbsocial'); ?></h4>
66 <p>You can change default Network Options using the selection on the left hand</p>
67 <p>You can select additional networks with the 'add other networks' button</p>
68
69 </div>
70
71 </div>
72 </form>
73