latest changes

This commit is contained in:
2025-06-17 08:01:10 -07:00
parent edcad561a5
commit 4c48d7ccbd
50 changed files with 1735 additions and 195 deletions

View File

@@ -85,6 +85,39 @@ class RadThemeEngine
};
}
public static function pagination()
{
return function ($template, $context, $args, $source) {
return site()->renderTemplate(<<<HTML
<nav class="pagination-links">
<ul>
{{#if older }}
<li><a href="{{ older }}">Next</a></li>
{{/if}}
{{#if newer }}
<li><a href="{{ newer }}">Previous</a></li>
{{/if}}
</ul>
</nav>
HTML, site()->getPaginationLinks());
};
}
public static function count()
{
return function ($template, $context, $args, $source) {
return count($context->get($args));
};
}
public static function queryCount()
{
global $wp_query;
return function ($template, $context, $args, $source) use ($wp_query) {
return $wp_query->found_posts;
};
}
public static function assetURL()
{
return function ($template, $context, $args, $source) {