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
← All changes | classes/network/mbcustom.php +14 -11 trunk1.1.2 View file →
@@ -3,9 +3,8 @@
3 3 defined('ABSPATH') or die('No direct access permitted');
4 4
5 5 use MaxButtons\maxButton as maxButton;
6 6
7 -/** MaxButtons Custom Button **/
8 7 class MBCustomNetwork extends MBnetwork
9 8 {
10 9
11 10 protected $network = 'maxbutton';
@@ -13,9 +12,9 @@
13 12 protected $icon_type = 'png';
14 13 protected $priority = 'readmore';
15 14 protected $color = '#88C5C2';
16 15
17 - //protected $popup = false;
16 + protected $popup = false;
18 17
19 18 protected $last_index = -1;
20 19 protected $currentNetwork = null;
21 20
@@ -20,25 +19,26 @@
20 19 protected $currentNetwork = null;
21 20
22 21 protected $css = array();
23 22
24 - protected $is_popup = false;
23 + protected $limitedpro = true;
24 + protected $is_custom = true;
25 25
26 - protected $is_limitedpro = true;
27 - protected $is_editable = false;
28 - protected $is_custom = true; // maybe should be gone.
29 26
30 -
31 27 public function __construct()
32 28 {
29 + parent::__construct();
33 30 $this->icon = MBSocial()->get_plugin_url() . 'images/mb-blue-network.png';
34 31 $this->label = __('No config', 'mbsocial');
35 - parent::__construct();
36 -
37 32 $w = MBSocial()->whistle();
38 33 $w->listen('collection/new', array($this, 'resetIndex'), 'tell');
39 34 add_filter('mbsocial/parsecss/', array($this, 'fixIconCSS'));
40 -
35 + /*function ($css) {
36 + $w = MBSocial()->whistle();
37 + $n = $w->ask('display/parse/network');
38 + var_dump($n);
39 + return $css;
40 + }); */
41 41 }
42 42
43 43 /** Reset the count index when a new collection is put up */
44 44 public function resetIndex()
@@ -126,9 +126,9 @@
126 126
127 127 $button_html = "<span class='mb-item item-" . $args['index'] . "'>";
128 128 $button_html .= $button->display($button_args);
129 129 $button_html .= "</span>";
130 - $buttonObj = \MaxButtons\str_get_html($button_html);
130 + $buttonObj = str_get_html($button_html);
131 131
132 132 // fix URL *after* button output since MB filters {url} type of URL's needed for ApplyVars
133 133 if ($use && $network)
134 134 {
@@ -157,8 +157,11 @@
157 157 public function fixIconCSS($css)
158 158 {
159 159 $w = MBSocial()->whistle();
160 160 $network = $w->ask('display/parse/network');
161 +
162 + //var_dump($network->get('is_custom'));
163 + //var_dump(basename(get_class($network)));
161 164
162 165 $classname = get_class($network); // hacky
163 166 if (strpos(strtolower($classname), 'mbcustom') !== false )
164 167 {