feat(frontend): replace article system with Zibll 9.0
This commit is contained in:
1 parent
2881c69e9c
commit
0f2ac6c34a
69 files changed
+2603
-4163
No files matched your search
@@ -481,15 +481,13 @@ if (!function_exists('aksrt_render_related_graphic_card')) :
|
||||
* Minimal Zibll style-3 related thumb card.
|
||||
*/
|
||||
function aksrt_render_related_graphic_card(WP_Post $post): string {
|
||||
$title = get_the_title($post);
|
||||
$subtitle = class_exists('\AKSRT\Core\PostMetaBox')
|
||||
? (string) \AKSRT\Core\PostMetaBox::get_meta_value($post->ID, 'subtitle', '')
|
||||
: '';
|
||||
$title = get_the_title($post) . $subtitle;
|
||||
$url = get_permalink($post);
|
||||
$thumb = get_the_post_thumbnail_url($post, 'medium_large');
|
||||
if (!$thumb) {
|
||||
$thumb = get_theme_file_uri('assets/img/thumbnail-lg.svg');
|
||||
if (!file_exists(get_theme_file_path('assets/img/thumbnail-lg.svg'))) {
|
||||
$thumb = includes_url('images/media/default.png');
|
||||
}
|
||||
}
|
||||
$media = aksrt_renderer_resolve_images($post->ID, aksrt_renderer_config(['type' => 'card']));
|
||||
$thumb = (string) $media['primary'];
|
||||
$time = human_time_diff((int) get_the_time('U', $post), (int) current_time('timestamp'));
|
||||
$views = function_exists('aksrt_get_post_views') ? (int) aksrt_get_post_views($post->ID) : 0;
|
||||
$views_label = function_exists('aksrt_format_number') ? aksrt_format_number($views) : number_format_i18n($views);
|
||||
|
||||
Reference in new issue
Block a user