| | |
| | | <?php |
| | | |
| | | use JVBase\managers\CacheManager; |
| | | use JVBase\managers\Cache; |
| | | use JVBase\meta\Form; |
| | | |
| | | if (!defined('ABSPATH')) { |
| | | exit; // Exit if accessed directly |
| | |
| | | wp_redirect(get_home_url(null, '/dash')); |
| | | exit; |
| | | } |
| | | $cache = CacheManager::for('news', 3600); |
| | | $cache = Cache::for('news', 3600); |
| | | $check = $cache->get('type-options'); |
| | | |
| | | if ($check) { |
| | |
| | | foreach ($terms as $term) { |
| | | $typeOptions[] = [ |
| | | 'id' => $term->term_id, |
| | | 'name' => $term->name, |
| | | 'name' => html_entity_decode($term->name), |
| | | 'count' => $term->count, |
| | | ]; |
| | | } |
| | |
| | | </div> |
| | | <?php |
| | | $handler = JVB()->getContent('news'); |
| | | $meta = new JVBase\meta\MetaManager(); |
| | | |
| | | foreach ($handler->getFields() as $field_name => $field_config) { |
| | | $meta->render('form', $field_name, $field_config); |
| | | echo Form::render($field_name, null, $field_config); |
| | | } |
| | | ?> |
| | | |