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
← All changes | classes/class-block.php +3 -15 1.301.5 View file →
@@ -77,32 +77,22 @@
77 77 }
78 78
79 79 public function getColorValue($fieldname)
80 80 {
81 - $value = self::getValue($fieldname);
82 - if ($this->isrgba($value))
83 - return $value;
84 -
81 + $value = $this->getValue($fieldname);
85 82 if (! $value )
86 83 return false;
84 +
87 85 if (substr($value,0,1) !== '#')
88 86 {
89 87 $value = '#' . $value;
90 88 }
89 +
91 90 return $value;
92 -}
93 91
94 -private function isrgba($value)
95 -{
96 - if (strpos($value, 'rgb') >= 0 )
97 - return true;
98 - else {
99 - return false;
100 - }
101 92 }
102 93
103 94
104 -
105 95 public function setPreview($preview = true)
106 96 {
107 97 $this->is_preview = $preview;
108 98
@@ -153,11 +143,9 @@
153 143 else
154 144 {
155 145 $default = (isset($options["default"])) ? $options["default"] : '';
156 146 // stripslashes since the WP post var adds them.
157 -
158 147 $blockdata[$field] = (isset($post[$field])) ? stripslashes(sanitize_text_field($post[$field])) : $default;
159 -
160 148 }
161 149 }
162 150
163 151 $data[$this->blockname] = $blockdata;