Beispiel #1
0
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();
}
Beispiel #2
0
<?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 : &lt;a href=&quot;LINK&quot;&gt;TEXT_LINK&lt;/a&gt;, &lt;strong&gt;BOLD_TEXT&lt;/strong&gt;, &lt;em&gt;ITALIC_TEXT&lt;/em&gt;, &lt;img src=&quot;IMAGE_URL&quot;&gt;.', '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();
Beispiel #3
0
<?php

etendard_meta_migration('_etendard_home_cta_url', 'etendard_home_cta_url');
etendard_meta_migration('_etendard_home_cta_text', 'etendard_home_cta_text');
etendard_meta_migration('_etendard_home_cta_bouton', 'etendard_home_cta_bouton');
$form = new Cocorico(ETENDARD_COCORICO_PREFIX, false);
$form->startForm();
$form->setting(array('type' => 'text', 'name' => '_home_cta_url', 'label' => __('Call to action destination (url)', 'etendard')));
$form->setting(array('type' => 'textarea', 'name' => '_home_cta_text', 'label' => __("Call to action incentive", 'etendard')));
$form->setting(array('type' => 'text', 'name' => '_home_cta_bouton', 'label' => __('Button\'s label', 'etendard')));
$form->endForm();
$form->render();
Beispiel #4
0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
?>

<h2 style="font-size: 23px;font-weight: 400;padding: 9px 15px 4px 0px;line-height: 29px;">
	<?php 
_e('Toutatis Settings', 'toutatis');
?>
</h2>

<?php 
// Create a new set of options
$form = new Cocorico(TOUTATIS_COCORICO_PREFIX);
// Registering tabs
$form->groupHeader(array('general' => __('General', 'toutatis'), 'addons' => __('Addons', 'toutatis')));
// General tab
$form->startWrapper('tab', 'general');
$form->startForm();
// Toutatis free
$form->startWrapper('tr');
$form->startWrapper('th');
$form->component('raw', __('Toutatis Premium', 'toutatis'));
$form->endWrapper('th');
$form->startWrapper('td');
$form->component('raw', __('Purchase a licence key in order to receive Toutatis updates and get access to support.', 'toutatis') . '<br><br>');
$form->component('link', 'https://www.themesdefrance.fr/themes/toutatis/#acheter?utm_source=theme&utm_medium=licenselink&utm_campaign=toutatis', __('Get Toutatis updates & support', 'toutatis'), array('class' => array('button', 'button-primary'), 'target' => '_blank'));
$form->endWrapper('td');
$form->endWrapper('tr');
<?php

etendard_meta_migration('_etendard_portfolio_temoin_nom', 'etendard_portfolio_temoin_nom');
etendard_meta_migration('_etendard_portfolio_temoin_texte', 'etendard_portfolio_temoin_texte');
etendard_meta_migration('_etendard_portfolio_temoin_portrait', 'etendard_portfolio_temoin_portrait');
$form = new Cocorico(ETENDARD_COCORICO_PREFIX, false);
$form->startForm();
$form->setting(array('type' => 'text', 'name' => '_portfolio_temoin_nom', 'label' => __('Name', 'etendard')));
$form->setting(array('type' => 'textarea', 'name' => '_portfolio_temoin_texte', 'label' => __('Testimonial', 'etendard')));
$form->setting(array('type' => 'upload', 'name' => '_portfolio_temoin_portrait', 'label' => __('Avatar', 'etendard'), 'description' => __('Optimal size is 160x110 pixels', 'etendard')));
$form->endForm();
$form->render();
<?php

$cocorico = new Cocorico(ETENDARD_COCORICO_PREFIX, false);
$cocorico->diaporama('portfolio_diaporama');
$cocorico->render();
Beispiel #7
0
<?php

etendard_meta_migration('_etendard_Client', 'etendard_portfolio_client');
etendard_meta_migration('_etendard_URL', 'etendard_portfolio_url');
$fields = get_option('etendard_portfolio_fields');
if (!$fields) {
    $fields = array();
}
$form = new Cocorico(ETENDARD_COCORICO_PREFIX, false);
$form->startForm();
foreach ($fields as $field) {
    if (count($fields) > 1) {
        if (trim($field) === '') {
            continue;
        }
        $form->setting(array('type' => 'text', 'name' => '_' . $field, 'label' => $field));
    } else {
        printf(__('No project metas were defined. If you want to, go in the portfolio tab <a href="%s" >in Etendard Options</a>.', 'etendard'), admin_url('themes.php?page=etendard_options'));
    }
}
$form->endForm();
$form->render();