PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
← All changes | libraries/vendor/PhpSpreadsheet/Style/NumberFormat/Formatter.php +7 -1 3.3.1 → 3.4 View file →
@@ -173,9 +173,15 @@
173 173 }
174 174
175 175 // If we have a text value, return it "as is"
176 176 if (!is_numeric($value)) {
177 - return StringHelper::convertToString($value, true, '', false, $lessFloatPrecision);
177 + $temp = StringHelper::convertToString($value, true, '', false, $lessFloatPrecision);
178 + if (is_callable($callBack)) {
179 + $sections = preg_split(self::SECTION_SPLIT, $format) ?: [$format];
180 + $temp = $callBack($temp, $sections[3] ?? $sections[0]);
181 + }
182 +
183 + return $temp;
178 184 }
179 185
180 186 // For 'General' format code, we just pass the value although this is not entirely the way Excel does it,
181 187 // it seems to round numbers to a total of 10 digits.