$ctx Single context.
*/
function aksrt_single_render_cover(array $ctx): void {
if (empty($ctx['show_cover']) || $ctx['cover_url'] === '') {
return;
}
$type = (string) $ctx['cover_type'];
$badge = (string) $ctx['status_badge'];
$crumbs = (string) $ctx['breadcrumbs_html'];
$img_scale = max(10, min(100, (int) $ctx['img_scale']));
$video_scale = max(20, min(100, (int) $ctx['video_scale']));
$slides = is_array($ctx['slide_images'] ?? null) ? $ctx['slide_images'] : [];
$poster = (string) ($ctx['video_poster'] ?? '');
$title_html = (string) ($ctx['title_html'] ?? esc_html(get_the_title()));
if ($type === 'video') :
?>
'
. '
' . $title_html . '
'
. ($crumbs !== '' ? $crumbs : '')
. $badge
. '';
$slider_html = '';
if (function_exists('aksrt_render_slider')) {
$slider_html = aksrt_render_slider([
'slides' => $slide_items,
'scale_height' => true,
'scale_ratio' => $img_scale / 100,
'wrapper_class' => 'mb20 single-cover-slide imgbox-container',
'slider_class' => 'single-cover single-cover--slide',
'show_nav' => true,
'show_pagination' => true,
'loop' => count($slide_items) > 1,
'autoplay' => count($slide_items) > 1,
'overlay_html' => $overlay,
]);
}
?>
empty($settings['hide_time']),
'meta_html' => (string) ($ctx['meta_box_html'] ?? ''),
]);
?>
$attrs Optional data-share-* overrides.
*/
function aksrt_render_share_dropdown(array $attrs = []): void {
static $printed = false;
if ($printed) {
return;
}
$printed = true;
$title = (string) ($attrs['title'] ?? get_the_title());
$url = (string) ($attrs['url'] ?? (get_permalink() ?: ''));
$image = (string) ($attrs['image'] ?? (get_the_post_thumbnail_url(null, 'large') ?: ''));
?>
0 && !empty($settings['rewards_enabled']) && function_exists('aksrt_get_rewards_button'))
? aksrt_get_rewards_button($reward_author, 'action action-rewards', $post_id)
: '';
if ($reward_btn !== '') {
echo $reward_btn; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
aksrt_render_rewards_modal_for_user($reward_author, $post_id);
}
?>
$ctx Single context.
*/
function aksrt_single_render_content_footer(array $ctx): void {
$settings = is_array($ctx['settings'] ?? null) ? $ctx['settings'] : [];
$post_id = (int) $ctx['post_id'];
?>
'article-yiyan yiyan-box aksrt-yiyan yiyan--footer',
]);
?>