Restore unified paid download model

This commit is contained in:
kate522 committed 2026-07-04 19:24:04 +08:00
1 parent ca0a550af8
commit b98faa965a
9 files changed
+246 -154

No files matched your search

+3
View File
@@ -476,6 +476,9 @@ add_filter('single_template', function ($template) {
if (!($post instanceof WP_Post)) return $template;
if (!function_exists('aksrt_is_resource_post')) return $template;
if (!aksrt_is_resource_post($post)) return $template;
if (function_exists('aksrt_is_downloadable_content') && !aksrt_is_downloadable_content($post)) {
return $template;
}
$candidate = locate_template(['single-aksrt_resource.php']);
return $candidate ?: $template;
});