Restore unified paid download model

This commit is contained in:
2026-07-04 19:24:04 +08:00
parent ca0a550af8
commit b98faa965a
9 changed files with 246 additions and 154 deletions
+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;
});