Fix displaying dividers in ALC blocks MAILPOET-721
This commit is contained in:
@@ -14,7 +14,7 @@ class PostListTransformer {
|
||||
|
||||
function transform($posts) {
|
||||
$results = array();
|
||||
$use_divider = $this->args['showDivider'] === 'true';
|
||||
$use_divider = filter_var($this->args['showDivider'], FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
foreach($posts as $index => $post) {
|
||||
if($use_divider && $index > 0) {
|
||||
|
@@ -29,7 +29,7 @@ class PostTransformer {
|
||||
$structure = $this->appendFeaturedImage(
|
||||
$post,
|
||||
$this->args['displayType'],
|
||||
$this->args['imageFullWidth'] === 'true',
|
||||
filter_var($this->args['imageFullWidth'], FILTER_VALIDATE_BOOLEAN),
|
||||
$structure
|
||||
);
|
||||
} else {
|
||||
@@ -37,7 +37,7 @@ class PostTransformer {
|
||||
$structure = $this->appendFeaturedImage(
|
||||
$post,
|
||||
$this->args['displayType'],
|
||||
$this->args['imageFullWidth'] === 'true',
|
||||
filter_var($this->args['imageFullWidth'], FILTER_VALIDATE_BOOLEAN),
|
||||
$structure
|
||||
);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ class PostTransformer {
|
||||
private function getPostTitle($post) {
|
||||
$title = $post->post_title;
|
||||
|
||||
if($this->args['titleIsLink'] === 'true') {
|
||||
if(filter_var($this->args['titleIsLink'], FILTER_VALIDATE_BOOLEAN)) {
|
||||
$title = '<a href="' . get_permalink($post->ID) . '">' . $title . '</a>';
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user