admin-toolbar-mode.php
1 year ago
api-route-mode.php
1 year ago
backend-menu-mode.php
1 year ago
content-access-form.php
1 year ago
content-service-tips.php
1 year ago
default-subject-tab.php
1 year ago
jwt-login-url.php
1 year ago
loading-content.php
1 year ago
login-form.php
1 year ago
multisite-sync-notification.php
1 year ago
post-list.php
1 year ago
visitor-subject-tab.php
1 year ago
post-list.php
33 lines
| 1 | <?php /** @version 7.0.0 */ |
| 2 | |
| 3 | if (defined('AAM_KEY')) { |
| 4 | $params = isset($params) ? $params : (object) []; |
| 5 | $old_query = $GLOBALS['wp_query']; |
| 6 | |
| 7 | // Query posts |
| 8 | query_posts($params); |
| 9 | |
| 10 | while (have_posts()) { |
| 11 | the_post(); |
| 12 | |
| 13 | // Trying to render the template. In no luck, default to plain list |
| 14 | ob_start(); |
| 15 | get_template_part( |
| 16 | $params->template, |
| 17 | get_theme_mod( 'display_excerpt_or_full_post', 'excerpt' ) |
| 18 | ); |
| 19 | $content = ob_get_contents(); |
| 20 | ob_end_clean(); |
| 21 | |
| 22 | if (empty($content)) { |
| 23 | $post = get_post(); |
| 24 | |
| 25 | the_title(sprintf('<a href="%s">', esc_url(get_permalink())), '</a>'); |
| 26 | echo '<br/>'; |
| 27 | } else { |
| 28 | echo $content; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | $GLOBALS['wp_query'] = $old_query; |
| 33 | } |