- Fixes 'Cannot access self:: when no class scope is active' error in PHP 5.3

This commit is contained in:
Vlad
2016-11-06 18:49:10 -05:00
parent 61c255564f
commit 1db8626e35
3 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ class Renderer {
$this->getOneColumnTemplate($styles, $class) :
$this->getMultipleColumnsTemplate($styles, $width, $alignment, $class);
$result = array_map(function($content) use ($template) {
$content = self::removePaddingFromLastElement($content);
$content = Renderer::removePaddingFromLastElement($content);
return $template['content_start'] . $content . $template['content_end'];
}, $columns_data);
$result = implode('', $result);

View File

@@ -41,7 +41,7 @@ class StylesHelper {
static function getStyles($data, $type, $ignore_specific_styles = false) {
$styles = array_map(function($attribute, $style) use ($ignore_specific_styles) {
if(!$ignore_specific_styles || !in_array($attribute, $ignore_specific_styles)) {
return self::translateCSSAttribute($attribute) . ': ' . $style . ' !important;';
return StylesHelper::translateCSSAttribute($attribute) . ': ' . $style . ' !important;';
}
}, array_keys($data[$type]), $data[$type]);
return implode('', $styles);

View File

@@ -59,7 +59,7 @@ class Shortcodes {
$shortcode_details['action'] :
false;
$shortcode_class =
self::SHORTCODE_CATEGORY_NAMESPACE . $shortcode_category;
Shortcodes::SHORTCODE_CATEGORY_NAMESPACE . $shortcode_category;
$shortcode_default_value = !empty($shortcode_details['default']) ?
$shortcode_details['default'] :
false;