>
';
}
continue;
}
$post_meta_default = null;
if ('post_meta' === $single_component['id']) {
$total_metas = [];
foreach ($archive_order as $nested_single_component) {
if ($nested_single_component['id'] === 'post_meta') {
$total_metas[] = $nested_single_component;
}
}
if (count($total_metas) > 1 && !$had_a_meta) {
$post_meta_default = blocksy_post_meta_defaults([
[
'id' => 'categories',
'enabled' => true,
],
]);
} else {
$post_meta_default = blocksy_post_meta_defaults([
[
'id' => 'author',
'enabled' => true,
],
[
'id' => 'post_date',
'enabled' => true,
],
[
'id' => 'comments',
'enabled' => true,
],
]);
}
$had_a_meta = true;
}
$output = 'post_meta' === $single_component['id'] ? blocksy_post_meta(
blocksy_akg(
'meta_elements',
$single_component,
$post_meta_default
),
[
'meta_type' => blocksy_akg('meta_type', $single_component, 'simple'),
'meta_divider' => blocksy_akg('meta_divider', $single_component, 'slash')
]
) : $outputs[ $single_component['id'] ];
if ( ! isset( $single_component['__id'] ) ) {
$single_component['__id'] = '';
}
if (
$last_enabled_component === $single_component['id'] . $single_component['__id'] && (
strpos($last_enabled_component, 'post_meta') !== false
||
strpos($last_enabled_component, 'featured_image') !== false
)
) {
echo '';
}
/**
* Note to code reviewers: This line doesn't need to be escaped.
* Variabile $output used here escapes the value properly.
*/
echo $output;
if (
$blog_post_structure === 'simple'
&&
$single_component['id'] === 'featured_image'
) {
echo '';
}
if (
$blog_post_structure === 'simple'
&&
$last_enabled_component === $single_component[
'id'
] . $single_component['__id']
) {
echo '
';
}
}
$id = get_the_ID();
$excerpt = blocksy_entry_excerpt('original');
if (is_customize_preview()) {
blocksy_add_customizer_preview_cache(
blocksy_html_tag(
'div',
[ 'data-id' => 'post-' . $id ],
array_reduce(
$archive_order,
function ( $carry, $single_component ) use ( $outputs, $excerpt, $read_more_arrow, $read_more_settings) {
$output = null;
if ( isset( $outputs[ $single_component['id'] ] ) ) {
$output = $outputs[ $single_component['id'] ];
}
if ( 'post_meta' === $single_component['id'] ) {
$output = blocksy_post_meta(
blocksy_post_meta_defaults([
[
'id' => 'author',
'enabled' => true,
'has_author_avatar' => 'yes',
],
[
'id' => 'post_date',
'enabled' => true,
],
[
'id' => 'updated_date',
'enabled' => true,
],
[
'id' => 'categories',
'enabled' => true,
],
[
'id' => 'comments',
'enabled' => true,
],
[
'id' => 'tags',
'enabled' => true,
]
]),
[
'meta_type' => 'label',
'meta_divider' => 'none',
'force_icons' => true
]
);
}
if ('excerpt' === $single_component['id']) {
$output = $excerpt;
}
if ('read_more' === $single_component['id']) {
$output = blocksy_html_tag(
'a',
[
'class' => 'entry-button',
'data-type' => blocksy_default_akg( 'button_type', $read_more_settings, 'background' ),
'data-alignment' => blocksy_default_akg( 'read_more_alignment', $read_more_settings, 'left' ),
'href' => esc_url( get_permalink() )
],
(
blocksy_default_akg(
'read_more_text',
$read_more_settings,
__('Read More', 'blocksy')
) . $read_more_arrow
)
);
}
return $carry . blocksy_html_tag(
'div',
[
'data-component' => $single_component['id'],
],
$output
);
},
''
)
)
);
}
?>