Fix displaying dividers in ALC blocks MAILPOET-721

This commit is contained in:
Tautvidas Sipavičius
2016-12-05 19:45:46 +02:00
parent 8819d9154a
commit b2f662c1d5
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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>';
} }