<?php /* metabox options */ $metabox_site = new Odin_Metabox('site', 'Informações do Pólo', 'polos', 'normal', 'high'); $metabox_site->set_fields(array(array('id' => 'site_url', 'label' => __('URL do site', 'rede-polos-theme'), 'type' => 'text')));
function artistas_galeria_metabox() { $artistas_metabox = new Odin_Metabox('galeria_artistas', 'Galeria de fotos', 'artistas', 'normal', 'high'); $artistas_metabox->set_fields(array(array('id' => 'artistas_image_plupload', 'label' => __('Imagens', 'odin'), 'type' => 'image_plupload', 'description' => __('', 'odin')))); }
function fotos_metabox() { $fotos_metabox = new Odin_Metabox('informacoes', 'Fotos', array('projeto'), 'normal', 'high'); $fotos_metabox->set_fields(array(array('id' => 'geleria_fotos', 'label' => __('Galeria de fotos', 'odin'), 'type' => 'image_plupload', 'default' => '', 'description' => __('Adicionar imagens', 'odin')))); }
/** * WP optimize functions. */ require_once get_template_directory() . '/inc/optimize.php'; /** * Custom template tags. */ require_once get_template_directory() . '/inc/template-tags.php'; /** * WooCommerce compatibility files. */ if (is_woocommerce_activated()) { add_theme_support('woocommerce'); require get_template_directory() . '/inc/woocommerce/hooks.php'; require get_template_directory() . '/inc/woocommerce/functions.php'; require get_template_directory() . '/inc/woocommerce/template-tags.php'; } /* * WP APP Functions */ // Registra o post type "palestras" function wpapp_post_types() { $palestras = new Odin_Post_Type('Palestra', 'palestra'); } add_action('init', 'wpapp_post_types', 1); // Cria os metabox e metafields do post type "palestras" require_once get_template_directory() . '/core/classes/class-metabox.php'; $dadosdapalestra_metabox = new Odin_Metabox('dadospalestra', 'Dados da palestra', 'palestra', 'normal', 'high'); $dadosdapalestra_metabox->set_fields(array(array('id' => 'data_palestra', 'label' => __('Data da palestra', 'odin'), 'type' => 'input', 'description' => __('Descrition Example', 'odin'), 'attributes' => array('type' => 'date', 'required' => 'required', 'class' => 'regular-text', 'styles' => 'background: #444;')), array('id' => 'horario_palestra', 'label' => __('Horário da palestra', 'odin'), 'type' => 'input', 'description' => __('Descrition Example', 'odin'), 'attributes' => array('type' => 'time', 'required' => 'required', 'class' => 'regular-text', 'styles' => 'background: #444;'))));