- Fixes 'Cannot access self:: when no class scope is active' error in PHP 5.3
This commit is contained in:
@@ -11,7 +11,7 @@ class Renderer {
|
|||||||
$this->getOneColumnTemplate($styles, $class) :
|
$this->getOneColumnTemplate($styles, $class) :
|
||||||
$this->getMultipleColumnsTemplate($styles, $width, $alignment, $class);
|
$this->getMultipleColumnsTemplate($styles, $width, $alignment, $class);
|
||||||
$result = array_map(function($content) use ($template) {
|
$result = array_map(function($content) use ($template) {
|
||||||
$content = self::removePaddingFromLastElement($content);
|
$content = Renderer::removePaddingFromLastElement($content);
|
||||||
return $template['content_start'] . $content . $template['content_end'];
|
return $template['content_start'] . $content . $template['content_end'];
|
||||||
}, $columns_data);
|
}, $columns_data);
|
||||||
$result = implode('', $result);
|
$result = implode('', $result);
|
||||||
|
@@ -41,7 +41,7 @@ class StylesHelper {
|
|||||||
static function getStyles($data, $type, $ignore_specific_styles = false) {
|
static function getStyles($data, $type, $ignore_specific_styles = false) {
|
||||||
$styles = array_map(function($attribute, $style) use ($ignore_specific_styles) {
|
$styles = array_map(function($attribute, $style) use ($ignore_specific_styles) {
|
||||||
if(!$ignore_specific_styles || !in_array($attribute, $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]);
|
}, array_keys($data[$type]), $data[$type]);
|
||||||
return implode('', $styles);
|
return implode('', $styles);
|
||||||
|
@@ -59,7 +59,7 @@ class Shortcodes {
|
|||||||
$shortcode_details['action'] :
|
$shortcode_details['action'] :
|
||||||
false;
|
false;
|
||||||
$shortcode_class =
|
$shortcode_class =
|
||||||
self::SHORTCODE_CATEGORY_NAMESPACE . $shortcode_category;
|
Shortcodes::SHORTCODE_CATEGORY_NAMESPACE . $shortcode_category;
|
||||||
$shortcode_default_value = !empty($shortcode_details['default']) ?
|
$shortcode_default_value = !empty($shortcode_details['default']) ?
|
||||||
$shortcode_details['default'] :
|
$shortcode_details['default'] :
|
||||||
false;
|
false;
|
||||||
|
Reference in New Issue
Block a user