Commit 8c37b88d authored by Everaldo Matias's avatar Everaldo Matias
Browse files

Merge branch 'develop' into main

parents 7d6e408a 34a51481
......@@ -65,6 +65,9 @@ function render_block_core_post_terms_2($attributes, $content, $block)
$wrapper_attributes = get_block_wrapper_attributes(array('class' => $classes));
$html_array = [];
$html .= '<div class="hacklab-custom-taxonomy-block">';
foreach ($post_terms as $term) {
// The $term is an object, so we don't need to specify the $taxonomy.
$term_link = get_term_link($term);
......@@ -85,10 +88,12 @@ function render_block_core_post_terms_2($attributes, $content, $block)
}
// We successfully got a link. Print it out.
$html_array[]= '<a clases="' . $class . '" href="' . esc_url($term_link) . '">' . $term->name . '</a>';
$html_array[]= '<a class="' . $class . '" href="' . esc_url($term_link) . '">' . $term->name . '</a>';
}
$html = implode($separator, $html_array);
$html .= implode($separator, $html_array);
$html .= '</div>';
}
return $html;
}
......@@ -23,7 +23,9 @@ function post_meta_callback($attributes, $content, $block)
return '';
}
$metadata = [];
$classes = '';
foreach ($attributes['selectedMeta'] as $meta) {
$classes .= ' ' . $meta;
$metadata[]= get_post_meta( $block->context['postId'], $meta, true );
}
$html = '';
......@@ -32,7 +34,7 @@ function post_meta_callback($attributes, $content, $block)
$separator = empty($attributes['separator']) ? ' ' : $attributes['separator'];
$html_array = [];
foreach ($metadata as $meta) {
$html_array[]= $meta;
$html_array[]= '<div class="' . $classes . '">' . $meta . '</div>' ;
}
$html .= implode($separator, $html_array);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment