function etendard_video_callback($post) { $form = new Cocorico(ETENDARD_COCORICO_PREFIX, false); $form->startForm(); $form->setting(array('type' => 'url', 'name' => '_video_meta', 'label' => __('Video to feature', 'etendard'), 'description' => __('Add a video link from Youtube, Dailymotion or Vimeo.', 'etendard'))); $form->endForm(); $form->render(); }
<?php $form = new Cocorico(ETENDARD_COCORICO_PREFIX); $form->startWrapper('titre'); $form->component('raw', __('Etendard Settings', 'etendard')); $form->endWrapper('titre'); $form->groupHeader(array('general' => __('General', 'etendard'), 'apparence' => __('Appearance', 'etendard'), 'portfolio' => __('Portfolio', 'etendard'), 'addons' => __('Addons', 'etendard'))); //Tab general $form->startWrapper('tab', 'general'); $form->startForm(); $form->setting(array('type' => 'text', 'name' => substr(ETENDARD_LICENSE_KEY, strlen(ETENDARD_COCORICO_PREFIX)), 'label' => __("License", 'etendard'), 'description' => __("Enter your licence key in order to receive Etendard updates. You'll find it in the confirmation email we sent you after your purchase.", 'etendard'))); $form->setting(array('type' => 'text', 'name' => 'title', 'label' => __("Title", 'etendard'), 'description' => __("Title in the homepage banner.", 'etendard'), 'options' => array('default' => get_bloginfo('name')))); $form->setting(array('type' => 'text', 'name' => 'subtitle', 'label' => __("Subtitle", 'etendard'), 'description' => __("Subtitle in the homepage banner.", 'etendard'), 'options' => array('default' => get_bloginfo('description')))); $form->ordre('home_blocks', __("Choose elements to display on the homepage and organize them with drag & drop", 'etendard'), array('titre' => __('Title and subtitle', 'etendard'), 'diaporama' => __('Slider', 'etendard'), 'content' => __('Content', 'etendard'), 'cta' => __("Call to action", 'etendard'), 'services' => __('Services', 'etendard'), 'portfolio' => __('Last projects', 'etendard'), 'articles' => __('Last posts', 'etendard'))); $form->setting(array('type' => 'textarea', 'name' => 'footer_gauche', 'label' => __("Footer", 'etendard'), 'description' => __('Left footer content. The following HTML tags are allowed : <a href="LINK">TEXT_LINK</a>, <strong>BOLD_TEXT</strong>, <em>ITALIC_TEXT</em>, <img src="IMAGE_URL">.', 'etendard'), 'options' => array('default' => __('<strong>2014</strong> - Etendard by <a href="https://www.themesdefrance.fr/" target="_blank">Themes de France</a>', 'etendard')))); $form->endForm(); $form->endWrapper('tab'); //Tab apparence $form->startWrapper('tab', 'apparence'); $form->startForm(); $form->setting(array('type' => 'color', 'name' => 'color', 'label' => __("Main color", 'etendard'), 'description' => __("This color will be used across your site for buttons, links, etc.", 'etendard'))); $form->setting(array('type' => 'upload', 'name' => 'logo', 'label' => __('Logo', 'etendard'), 'description' => __('The image filetype should be JPG or PNG. Note that the optimal size is 280px by 60px.', 'etendard'))); $form->setting(array('type' => 'radio', 'label' => __('Slider width', 'etendard'), 'name' => 'diaporama_width', 'radios' => array('auto' => __('Boxed', 'etendard'), 'full' => __('Fullsize', 'etendard')), 'options' => array('after' => '<br/>', 'default' => 'auto'))); $form->setting(array('type' => 'text', 'name' => 'diaporama_height', 'label' => __("Slider height (in pixels)", 'etendard'), 'options' => array('default' => 500))); $form->setting(array('type' => 'radio', 'label' => __('Sidebar position', 'etendard'), 'name' => 'sidebar_position', 'radios' => array('droite' => __('Right', 'etendard'), 'gauche' => __('Left', 'etendard'), 'sans' => __('Nowhere', 'etendard')), 'options' => array('after' => '<br/>'), 'description' => __('Sidebar could be placed on the right or on the left of the main content. Most sites place them on the right but you could do the opposite :)', 'etendard'))); $form->setting(array('type' => 'textarea', 'name' => 'custom_css', 'label' => __('Additionnal CSS', 'etendard'), 'description' => __('CSS rules added in this field will be added to your site. If you have too many updates, you should create a child theme.', 'etendard'))); $form->endForm(); $form->endWrapper('tab'); //Tab portfolio $form->startWrapper('tab', 'portfolio'); $form->startForm();