修复AJAX 引擎
This commit is contained in:
1 parent
c4512f2bc2
commit
616beb8c03
8 files changed
+50
-32
No files matched your search
@@ -17,6 +17,7 @@ if (!function_exists('aksrt_renderer_defaults')) {
|
||||
'is_mult_thumb' => false,
|
||||
'is_no_thumb' => false,
|
||||
'is_card' => false,
|
||||
'term_id' => 0,
|
||||
'is_category' => is_category(),
|
||||
'is_search' => is_search(),
|
||||
'is_home' => is_home() || is_front_page(),
|
||||
@@ -57,8 +58,8 @@ if (!function_exists('aksrt_renderer_config')) {
|
||||
|| (!empty($args['is_home']) && !empty($list['list_card_home']))
|
||||
|| (!empty($args['is_author']) && !empty($list['list_card_author']));
|
||||
}
|
||||
if (!$is_forced && !$is_card) {
|
||||
$term_id = (int) get_queried_object_id();
|
||||
if (!$is_forced && !$is_card && !empty($args['is_category'])) {
|
||||
$term_id = absint($args['term_id']);
|
||||
$is_card = $term_id > 0 && in_array($term_id, (array) ($list['list_card_cat'] ?? []), true);
|
||||
}
|
||||
|
||||
@@ -73,8 +74,6 @@ if (!function_exists('aksrt_renderer_config')) {
|
||||
$args['list_type'] = $list_type;
|
||||
$args['style'] = $style;
|
||||
$args['img_position'] = sanitize_key((string) ($list_option['img_position'] ?? 'left')) === 'right' ? 'right' : 'left';
|
||||
$args['list_scale'] = max(50, min(200, (int) ($list_option['scale'] ?? 70)));
|
||||
$args['card_scale'] = max(20, min(200, (int) ($card_option['scale'] ?? 70)));
|
||||
$args['no_margin'] = !empty($args['no_margin']) || (($list['list_show_type'] ?? 'separate') === 'no_margin');
|
||||
$args['no_author'] = !empty($args['no_author']) || !empty($args['is_author']);
|
||||
$args['target_blank'] = !empty($list['target_blank']);
|
||||
@@ -83,7 +82,6 @@ if (!function_exists('aksrt_renderer_config')) {
|
||||
$args['show_time'] = !empty($list['post_list_time']);
|
||||
$args['time_source'] = (string) ($list['post_time_source'] ?? 'modified');
|
||||
$args['list_orderby'] = (string) ($list['list_orderby'] ?? 'modified');
|
||||
$args['mobile_meta'] = (string) ($list['list_meta_show'] ?? 'like');
|
||||
$args['badge_types'] = (array) ($list['list_badge_show'] ?? ['pay', 'cat', 'tag']);
|
||||
$args['mult_thumb_cat'] = (array) ($list['mult_thumb_cat'] ?? []);
|
||||
$args['thumb'] = $thumb;
|
||||
|
||||
Reference in new issue
Block a user