feat(frontend): replace article system with Zibll 9.0
This commit is contained in:
@@ -8,24 +8,4 @@
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$args = isset($args) && is_array($args) ? $args : [];
|
||||
$forced_layout = (string) get_query_var('aksrt_post_card_layout', '');
|
||||
$mode = 'card';
|
||||
|
||||
if (in_array($forced_layout, ['card', 'list', 'grid-cms'], true)) {
|
||||
$mode = $forced_layout;
|
||||
} elseif (!empty($args['mode']) && in_array($args['mode'], ['card', 'list', 'grid-cms', 'mini'], true)) {
|
||||
$mode = (string) $args['mode'];
|
||||
} elseif (function_exists('aksrt_get_post_flow') && aksrt_get_post_flow(get_the_ID()) === 'cms') {
|
||||
$mode = 'grid-cms';
|
||||
} elseif (class_exists('\AKSRT\Settings\Settings')) {
|
||||
$archive_layout = \AKSRT\Settings\Settings::get_archive_layout();
|
||||
$mode = in_array($archive_layout, ['card', 'list', 'grid-cms'], true) ? $archive_layout : 'card';
|
||||
}
|
||||
|
||||
$scene = (string) get_query_var('aksrt_post_card_scene', '');
|
||||
$context = ($scene === 'home' || is_front_page() || (is_home() && !is_paged())) ? 'home' : 'archive';
|
||||
|
||||
echo aksrt_render_post(array_merge($args, [
|
||||
'mode' => $mode,
|
||||
'context' => $context,
|
||||
])); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo aksrt_render_post($args); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
Reference in New Issue
Block a user