PluginProbe
Social Share Buttons / 1.2
Social Share Buttons v1.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/class-network.php +3 -28 1.81.2 View file →
@@ -33,12 +33,8 @@
33 33 protected $label; // Label (default) Text. This will be in the button, e.g. on hover
34 34
35 35 protected $icon_type = 'fab'; // Icon library set
36 36 protected $icon = 'fa-circle'; // Icon
37 - protected $icon_image_id; // for svg type icons.
38 - protected $icon_image_url;
39 - protected $icon_image_size;
40 -// protected $icon_image_alt = '';
41 37
42 38 protected $color = '#fff';
43 39
44 40 // extra options [internal]
@@ -47,18 +43,12 @@
47 43 protected $is_active = true;
48 44 protected $is_limitedpro = false; // the network is only intended for MB PRO
49 45 protected $forcesamewindow = false; // never open this in a new window / i.e. email / print type networks
50 46
51 - protected $default_options = null;
52 -
53 47 public function __construct()
54 48 {
55 - if (is_null($this->profile_placeholder))
56 - $this->profile_placeholder = __('User Name','mbsocial');
57 - if (is_null($this->profile_label))
58 - $this->profile_label = __('Follow', 'mbsocial');
59 -
60 - $this->default_options = $this->get_all_options(); // init them as default. For save function
49 + $this->profile_placeholder = __('User Name','mbsocial');
50 + $this->profile_label = __('Follow', 'mbsocial');
61 51 }
62 52
63 53 public function get($name)
64 54 {
@@ -72,12 +62,8 @@
72 62 {
73 63 $popup_width = isset($this->popup_dimensions[0]) ? $this->popup_dimensions[0] : 0;
74 64 $popup_height = isset($this->popup_dimensions[1]) ? $this->popup_dimensions[1] : 0;
75 65
76 -
77 - // iterate on this next time perhaps.
78 - //$attrs = get_object_vars($this);
79 -
80 66 $options = array(
81 67 'active' => $this->is_active, // no nw setting for this
82 68 'popup' => $this->is_popup,
83 69 'label' => $this->label,
@@ -86,25 +72,14 @@
86 72 'popup_width' => $popup_width,
87 73 'popup_height' => $popup_height,
88 74 'icon_type' => $this->icon_type,
89 75 'icon' => $this->icon,
90 - 'icon_image_id' => $this->icon_image_id,
91 - 'icon_image_url' => $this->icon_image_url,
92 - // 'icon_image_alt' => $this->icon_image_alt,
93 - 'icon_image_size' => $this->icon_image_size,
94 76 'color' => $this->color,
95 - 'displayMobile' => $this->displayMobile,
96 - 'displayDesktop' => $this->displayDesktop,
97 77 );
98 78
99 79 return $options;
100 80 }
101 81
102 - public function get_all_defaults()
103 - {
104 - return $this->default_options;
105 - }
106 -
107 82 public function load_settings($settings)
108 83 {
109 84 if (! $settings)
110 85 return;
@@ -110,9 +85,9 @@
110 85 return;
111 86 foreach($settings as $setting => $value)
112 87 {
113 88 if (is_null($value) || strlen($value) == 0)
114 - continue;
89 + continue;
115 90
116 91 switch($setting)
117 92 {
118 93 case 'active':