diff --git a/inc/helpers/aksrt-single-render.php b/inc/helpers/aksrt-single-render.php index 5572ba7b..c108113d 100644 --- a/inc/helpers/aksrt-single-render.php +++ b/inc/helpers/aksrt-single-render.php @@ -182,6 +182,40 @@ if (!function_exists('aksrt_single_render_box_header')) : } endif; +if (!function_exists('aksrt_render_share_dropdown')) : + /** + * Shared #share-dropdown markup (actions row + tabbar fallback). + * + * @param array $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') ?: '')); + ?> + + - - + + @@ -323,6 +348,14 @@ if (!function_exists('aksrt_single_render_author_card')) : ]); $is_self = is_user_logged_in() && get_current_user_id() === $author_id; $login_url = function_exists('aksrt_get_login_url') ? aksrt_get_login_url() : wp_login_url(get_permalink()); + $aksrt_pm_on = class_exists('AKSRT_Settings') && !empty(AKSRT_Settings::private_message_settings()['enabled']); + $aksrt_msg_url = function_exists('aksrt_get_messages_page_url') ? aksrt_get_messages_page_url() : ''; + $aksrt_post_settings = class_exists('AKSRT_Settings') && method_exists('AKSRT_Settings', 'get_post_page_settings') + ? AKSRT_Settings::get_post_page_settings() + : []; + $rewards_on = !empty($aksrt_post_settings['rewards_enabled']) + || !empty($aksrt_post_settings['post_rewards_enabled']) + || !empty($aksrt_post_settings['post_rewards_s']); ?>
@@ -350,6 +383,15 @@ if (!function_exists('aksrt_single_render_author_card')) : + + + + + + +
diff --git a/inc/helpers/aksrt-template-tags.php b/inc/helpers/aksrt-template-tags.php index 0bcd31d8..b2678b65 100644 --- a/inc/helpers/aksrt-template-tags.php +++ b/inc/helpers/aksrt-template-tags.php @@ -1387,6 +1387,14 @@ if (!function_exists('aksrt_render_footer_tabbar_single_extend')) : get_the_title($post_id), + 'url' => get_permalink($post_id) ?: '', + 'image' => get_the_post_thumbnail_url($post_id, 'large') ?: '', + ]); + } + if ($comments_open) : ?>