예제 #1
0
<?php

/* Theme options */
$odin_theme_options = new Odin_Theme_Options('odin-options', 'Opções do tema', 'manage_options');
$odin_theme_options->set_tabs(array(array('id' => 'home_cfg', 'title' => __('Home', 'odin')), array('id' => 'geral_cfg', 'title' => __('Configurações gerais', 'odin'))));
$odin_theme_options->set_fields(array('home_section' => array('tab' => 'home_cfg', 'title' => __('Configurações da página inicial', 'odin'), 'fields' => array(array('id' => 'slider_bg', 'label' => __('Background image header', 'odin'), 'type' => 'image'), array('id' => 'content_title', 'label' => __('Titulo da descrição do site na home', 'odin'), 'type' => 'text'), array('id' => 'content_text', 'label' => __('Texto da descrição do site na home', 'odin'), 'type' => 'textarea'))), 'links_section' => array('tab' => 'home_cfg', 'title' => __('Fast links', 'odin'), 'fields' => array(array('id' => 'link_1_title', 'label' => __('Titulo do primeiro link rápido na home', 'odin'), 'type' => 'text'), array('id' => 'link_1_url', 'label' => __('Link do primeiro link rápido na home', 'odin'), 'type' => 'text'), array('id' => 'link_2_title', 'label' => __('Titulo do segundo link rápido na home', 'odin'), 'type' => 'text'), array('id' => 'link_2_url', 'label' => __('Link do segundo link rápido na home', 'odin'), 'type' => 'text'), array('id' => 'link_3_title', 'label' => __('Titulo do terceiro link rápido na home', 'odin'), 'type' => 'text'), array('id' => 'link_3_url', 'label' => __('Link do terceiro link rápido na home', 'odin'), 'type' => 'text'))), 'geral_section' => array('tab' => 'geral_cfg', 'title' => __('Configurações visuais', 'odin'), 'fields' => array(array('id' => 'logo', 'label' => __('Logo nas páginas internas', 'odin'), 'type' => 'image'), array('id' => 'cor_principal', 'label' => __('Cor principal', 'odin'), 'type' => 'color', 'default' => '#2c989a'), array('id' => 'cor_barra', 'label' => __('Cor das barras', 'odin'), 'type' => 'color', 'default' => '#1f1f1f'), array('id' => 'code_analytics', 'label' => __('Tracking Code Google Analytics', 'odin'), 'type' => 'text', 'default' => ''))), 'geral_section_newsletter' => array('tab' => 'geral_cfg', 'title' => __('Configurações do Newsletter', 'odin'), 'fields' => array(array('id' => 'newsletter_title', 'label' => __('Titulo do newsletter', 'odin'), 'type' => 'text', 'default' => 'Assine nosso Newsletter'), array('id' => 'newsletter_text', 'label' => __('Texto do newsletter', 'odin'), 'type' => 'textarea'))), 'geral_section_social' => array('tab' => 'geral_cfg', 'title' => __('Configurações de redes sociais', 'odin'), 'fields' => array(array('id' => 'hashtag_url', 'label' => __('URL da página de visualização da hashtag', 'odin'), 'type' => 'text'))), 'geral_section_equipe' => array('tab' => 'geral_cfg', 'title' => __('Configurações da página equipe', 'odin'), 'fields' => array(array('id' => 'equipe_title', 'label' => __('Título da página equipe', 'odin'), 'type' => 'text')))));
<?php

if (function_exists("register_field_group")) {
    register_field_group(array('id' => 'acf_campos-do-usuario', 'title' => 'Campos do usuário', 'fields' => array(array('key' => 'field_55ca363f068ef', 'label' => 'Avatar', 'name' => 'custom_avatar', 'type' => 'image', 'save_format' => 'object', 'preview_size' => 'thumbnail', 'library' => 'all'), array('key' => 'field_55a69be2ed09f', 'label' => 'Idade', 'name' => 'idade', 'type' => 'text', 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => ''), array('key' => 'field_55a69bffed0a0', 'label' => 'Polo', 'name' => 'polo', 'type' => 'text', 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => ''), array('key' => 'field_55a69c07ed0a1', 'label' => 'Telefone', 'name' => 'fone', 'type' => 'text', 'default_value' => '', 'placeholder' => '', 'prepend' => '', 'append' => '', 'formatting' => 'html', 'maxlength' => '')), 'location' => array(array(array('param' => 'ef_user', 'operator' => '==', 'value' => 'all', 'order_no' => 0, 'group_no' => 0))), 'options' => array('position' => 'normal', 'layout' => 'no_box', 'hide_on_screen' => array()), 'menu_order' => 0));
}
/* ODIN FIELDS */
$odin_theme_options = new Odin_Theme_Options('odin-options', __('Lista de Organizações', 'odin'), 'manage_options');
$odin_theme_options->set_tabs(array(array('id' => 'odin_register', 'title' => __('Configurações da página de registro', 'odin'))));
$odin_theme_options->set_fields(array('register_section' => array('tab' => 'odin_register', 'title' => __('Configurações da página de Registro', 'odin'), 'fields' => array(array('id' => 'polos', 'label' => __('Lista de Organizações', 'odin'), 'type' => 'textarea', 'description' => __('Coloque separado por virgula', 'odin'))))));
예제 #3
0
function opcoes_tema()
{
    $settings = new Odin_Theme_Options('odin-settings', 'Opções do tema', 'manage_options');
    $settings->set_tabs(array(array('id' => 'odin_general', 'title' => __('Home', 'odin'))));
    $settings->set_fields(array('odin_general_fields_section' => array('tab' => 'odin_general', 'title' => __('Configurações do tema', 'odin'), 'fields' => array(array('id' => 'facebook', 'label' => __('Facebook', 'odin'), 'type' => 'text'), array('id' => 'twitter', 'label' => __('Twitter', 'odin'), 'type' => 'text'), array('id' => 'instagram', 'label' => __('Instagram', 'odin'), 'type' => 'text'), array('id' => 'pinterest', 'label' => __('Pinterest', 'odin'), 'type' => 'text')))));
}