进行了一些小修复
This commit is contained in:
1 parent
7c0c21e984
commit
ee4e599f2d
13 files changed
+496
-75
No files matched your search
@@ -1331,12 +1331,23 @@ if (!function_exists('aksrt_get_paid_download_actions_html')) {
|
||||
$label = (string) ($service['name'] ?? __('本地下载', 'aksrt'));
|
||||
}
|
||||
$type = sanitize_key((string) ($download['type'] ?? 'direct'));
|
||||
$has_extract = trim((string) ($download['extract_code'] ?? '')) !== '';
|
||||
$extract_code = trim((string) ($download['extract_code'] ?? ''));
|
||||
$has_extract = $extract_code !== '';
|
||||
$service_key = sanitize_html_class((string) ($service['key'] ?? 'other')) ?: 'other';
|
||||
$button_class = trim((string) ($download['class'] ?? ''));
|
||||
$button_class = $button_class !== '' ? $button_class : 'b-theme ' . $service_key;
|
||||
$copy_value = trim((string) ($download['copy_val'] ?? ''));
|
||||
$copy_key = trim((string) ($download['copy_key'] ?? ''));
|
||||
$copy_label = $extract_code !== '' ? $extract_code : ($copy_key !== '' ? $copy_key : __('更多内容', 'aksrt'));
|
||||
|
||||
$buttons .= '<div class="but-download flex ac">';
|
||||
$buttons .= '<button type="button" class="mr10 but b-theme ' . esc_attr($service_key) . '" data-action="aksrt-download" data-source-index="' . esc_attr((string) $index) . '" data-source-type="' . esc_attr($type) . '" data-has-extract="' . ($has_extract ? '1' : '0') . '">';
|
||||
$buttons .= '<button type="button" class="mr10 but ' . esc_attr($button_class) . '" data-action="aksrt-download" data-source-index="' . esc_attr((string) $index) . '" data-source-type="' . esc_attr($type) . '" data-has-extract="' . ($has_extract ? '1' : '0') . '">';
|
||||
$buttons .= '<i class="fa fa-download" aria-hidden="true"></i>' . esc_html($label) . '</button>';
|
||||
if ($copy_value !== '') {
|
||||
$buttons .= '<button type="button" class="but" data-clipboard-tag="' . esc_attr($copy_key !== '' ? $copy_key : __('内容', 'aksrt')) . '" data-clipboard-text="' . esc_attr($copy_value) . '">' . esc_html($copy_label) . '</button>';
|
||||
} elseif ($extract_code !== '') {
|
||||
$buttons .= '<span class="badg">' . esc_html($extract_code) . '</span>';
|
||||
}
|
||||
$buttons .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user