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