コード例 #1
0
 /**
  * constructor
  *
  * @access public
  * @return void
  */
 function YIT_Widget_Contact_Info()
 {
     /* Widget variable settings. */
     $this->woo_widget_cssclass = 'contact-info';
     $this->woo_widget_description = __('Widget with a simple contact information.', 'yit');
     $this->woo_widget_idbase = 'contact-info';
     $this->woo_widget_name = __('Contact Info', 'yit');
     $this->awesome_icons = YIT_Plugin_Common::get_awesome_icons();
     $widget_ops = array('classname' => $this->woo_widget_cssclass, 'description' => $this->woo_widget_description);
     /* Create the widget. */
     WP_Widget::__construct('contact-info', $this->woo_widget_name, $widget_ops);
     //wp_enqueue_script( 'media-upload' );
 }
コード例 #2
0
 /**
  * Shortcode list for newsletter
  *
  * Return newsletter list for logos
  *
  * @return array()
  * @since 1.0.0
  * @author Antonio La Rocca <*****@*****.**>
  */
 public function newsletter_shortcode_list()
 {
     $posts = get_posts(array('posts_per_page' => -1, 'post_type' => $this->newsletter_post_type));
     $options = array();
     foreach ($posts as $post) {
         $options[$post->post_name] = strcmp($post->post_title, '') != 0 ? $post->post_title : $post->ID;
     }
     $awesome_icons = YIT_Plugin_Common::get_awesome_icons();
     return apply_filters('yit_newsletter_shortcode_options', array('newsletter_form' => array('title' => __('Newsletter Form', 'yit'), 'description' => __('Show a newsletter form<br/> (If you leave empty a field, it will use the default value setted in YIT Plugins -> Newsletter)', 'yit'), 'tab' => 'shortcodes', 'create' => false, 'in_visual_composer' => true, 'has_content' => false, 'attributes' => array('title' => array('title' => __('Title', 'yit'), 'type' => 'text', 'std' => ''), 'title_size' => array('title' => __('Title size', 'yit'), 'type' => 'number', 'min' => 10, 'max' => 99, 'std' => 32), 'title_color' => array('title' => __('Title color', 'yit'), 'type' => 'colorpicker', 'std' => '#000000'), 'description' => array('title' => __('Description', 'yit'), 'type' => 'text', 'std' => ''), 'description_size' => array('title' => __('Description size', 'yit'), 'type' => 'number', 'min' => 10, 'max' => 99, 'std' => 24), 'description_color' => array('title' => __('Description color', 'yit'), 'type' => 'colorpicker', 'std' => '#555555'), 'post_name' => array('title' => __('Newsletter Form', 'yit'), 'type' => 'select', 'options' => $options, 'std' => ''), 'icon_form' => array('title' => __('Newsletter Form Icon', 'yit'), 'type' => 'select', 'options' => $awesome_icons, 'std' => ''), 'button_class' => array('title' => __('Form Button Class', 'yit'), 'type' => 'text', 'std' => ''))), 'newsletter_cta' => array('title' => __('Call to action newsletter', 'yit'), 'description' => __('Show a message with newsletter subscription', 'yit'), 'tab' => 'shortcodes', 'create' => false, 'in_visual_composer' => true, 'has_content' => false, 'attributes' => array('title' => array('title' => __('Title', 'yit'), 'type' => 'text', 'std' => ''), 'title_size' => array('title' => __('Title size', 'yit'), 'type' => 'number', 'min' => 10, 'max' => 99, 'std' => 32), 'title_color' => array('title' => __('Title color', 'yit'), 'type' => 'colorpicker', 'std' => '#000000'), 'incipit' => array('title' => __('Incipit', 'yit'), 'type' => 'text', 'std' => ''), 'incipit_size' => array('title' => __('Incipit size', 'yit'), 'type' => 'number', 'min' => 10, 'max' => 99, 'std' => 24), 'incipit_color' => array('title' => __('Incipit color', 'yit'), 'type' => 'colorpicker', 'std' => '#555555'), 'post_name' => array('title' => __('Newsletter Form', 'yit'), 'type' => 'select', 'options' => $options, 'std' => ''), 'icon_form' => array('title' => __('Newsletter Form Icon', 'yit'), 'type' => 'select', 'options' => $awesome_icons, 'std' => ''), 'button_class' => array('title' => __('Form Button Class', 'yit'), 'type' => 'text', 'std' => '')))), $options);
 }
コード例 #3
0
    /**
     * Form
     *
     * Show the option panel of the widget
     *
     * @param $instance
     *
     * @return void
     * @since  Version 1.0
     * @author Antonio La Rocca <*****@*****.**>
     * @author Francesco Licandro <*****@*****.**>
     */
    public function form($instance)
    {
        $defaults = array('title' => '', 'subtitle' => '', 'icon_form' => '-1', 'post_name' => '-1', 'text' => '', 'with_border' => 'yes', 'button_class' => '');
        $instance = wp_parse_args((array) $instance, $defaults);
        $instance['title'] = strip_tags($instance['title']);
        $instance['text'] = esc_textarea($instance['text']);
        $icons = YIT_Plugin_Common::get_awesome_icons();
        $posts = get_posts(array('posts_per_page' => -1, 'post_type' => YIT_Newsletter()->newsletter_post_type));
        ?>
        <p>
            <label>
                <strong><?php 
        _e('Widget Title', 'yit');
        ?>
:</strong><br />
                <input class="widefat" type="text" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" value="<?php 
        echo $instance['title'];
        ?>
" />
            </label>
        </p>
        <p>
            <label>
                <strong><?php 
        _e('Widget Subtitle', 'yit');
        ?>
:</strong><br />
                <input class="widefat" type="text" id="<?php 
        echo $this->get_field_id('subtitle');
        ?>
" name="<?php 
        echo $this->get_field_name('subtitle');
        ?>
" value="<?php 
        echo $instance['subtitle'];
        ?>
" />
            </label>
        </p>
        <p>
            <label>
                <strong><?php 
        _e('Newsletter Form', 'yit');
        ?>
:</strong>
            </label>
            <select id="<?php 
        echo $this->get_field_id('post_name');
        ?>
" name="<?php 
        echo $this->get_field_name('post_name');
        ?>
">
                <option value="-1">Select your option</option>
                <?php 
        foreach ($posts as $post) {
            ?>
                    <option value="<?php 
            echo $post->post_name;
            ?>
" <?php 
            selected($post->post_name, $instance['post_name']);
            ?>
 ><?php 
            echo strcmp($post->post_title, '') != 0 ? $post->post_title : $post->post_name;
            ?>
</option>
                <?php 
        }
        ?>
            </select>
        </p>
        <p>
            <label>
                <strong><?php 
        _e('Newsletter Form Icon', 'yit');
        ?>
:</strong>
                <select id="<?php 
        echo $this->get_field_id('icon_form');
        ?>
" name="<?php 
        echo $this->get_field_name('icon_form');
        ?>
">
                    <option value="-1">Select your option</option>
                    <?php 
        foreach ($icons as $id => $icon) {
            ?>
                        <option value="<?php 
            echo $id;
            ?>
" <?php 
            selected($id, $instance['icon_form']);
            ?>
 ><?php 
            echo $icon;
            ?>
</option>
                    <?php 
        }
        ?>
                </select>
            </label>
        </p>
        <p>
            <label>
                <strong><?php 
        _e('Form Border', 'yit');
        ?>
</strong>
                <select id="<?php 
        echo $this->get_field_id('with_border');
        ?>
" name="<?php 
        echo $this->get_field_name('with_border');
        ?>
">
                    <option value="yes" <?php 
        selected('yes', $instance['with_border']);
        ?>
 ><?php 
        _e('Yes', 'yit');
        ?>
</option>
                    <option value="no" <?php 
        selected('no', $instance['with_border']);
        ?>
 ><?php 
        _e('No', 'yit');
        ?>
</option>
                </select>
            </label>
        </p>
        <p>
            <label>
                <strong><?php 
        _e('Button Class', 'yit');
        ?>
</strong>
                <input type="text" class="widefat" id="<?php 
        echo $this->get_field_id('button_class');
        ?>
" name="<?php 
        echo $this->get_field_name('button_class');
        ?>
" value="<?php 
        echo $instance['button_class'];
        ?>
">
            </label>
        </p>
        <p>
            <label>
                <strong><?php 
        _e('Widget Text', 'yit');
        ?>
:</strong><br />
                <textarea class="widefat" rows="16" cols="20" id="<?php 
        echo $this->get_field_id('text');
        ?>
" name="<?php 
        echo $this->get_field_name('text');
        ?>
"><?php 
        echo $instance['text'];
        ?>
</textarea>

            </label>
        </p>
    <?php 
    }
コード例 #4
0
ファイル: shortcodes.php プロジェクト: jabue/wordpress
 */

/**
 * Return the list of shortcode and their settings
 *
 * @package Yithemes
 * @author Francesco Licandro  <*****@*****.**>
 * @since 1.0.0
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

include( $this->plugin_path.'/functions.php');

$button_style = get_button_style();
$awesome_icons = YIT_Plugin_Common::get_awesome_icons();
$awesome_icons_socials = YIT_Plugin_Common::get_awesome_icons_socials();
$null = array( '' =>__('None', 'yit') );
$awesome_icons_with_null = array_merge($null, $awesome_icons);
$categories = yit_get_categories( true );
$set_icons = get_set_icons();
$animate = yit_get_animate_effects();

$icon_list = array (
    'theme-icon' => __('Theme Icon', 'yit'),
    'custom' => __('Custom Icon', 'yit')
);

return array(

    /* === BOX SECTION === */
コード例 #5
0
ファイル: contactform.php プロジェクト: rinodung/live-theme
<?php

extract($args);
$types = array('text' => __('Text Input', 'yit'), 'checkbox' => __('Checkbox', 'yit'), 'select' => __('Select', 'yit'), 'textarea' => __('Textarea', 'yit'), 'radio' => __('Radio Input', 'yit'), 'password' => __('Password Field', 'yit'), 'file' => __('File Upload', 'yit'));
$defaults = array('order' => 0, 'title' => '', 'data_name' => '', 'type' => 'text', 'already_checked' => '', 'options' => array(), 'option_selected' => '', 'error' => '', 'required' => '', 'is_email' => '', 'reply_to' => '', 'class' => '', 'select-icon' => 'none', 'icon' => '', 'custom-icon' => '');
if (!is_array($value)) {
    $value = array();
}
foreach ($value as $i => $v) {
    $value[$i] = wp_parse_args($value[$i], $defaults);
}
$index = 1;
/* Select Font Awesome */
$options["select"] = array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit'));
$options["icon"] = YIT_Plugin_Common::get_awesome_icons();
/* End select Font Awesome */
?>


<p class="field-row">
    <a href="" class="button-secondary add-items"><?php 
_e('Add field', 'yit');
?>
</a>
    <img src="<?php 
echo esc_url(admin_url('images/wpspin_light.gif'));
?>
" class="ajax-loading" id="add-items-ajax-loading" alt="" />
</p>

コード例 #6
0
ファイル: settings.php プロジェクト: lieison/IndustriasFenix
<?php

/**
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
/**
 * Return an array with the options for Theme Options > Header > Logo
 *
 * @package Yithemes
 * @author Andrea Grillo <*****@*****.**>
 * @author Antonio La Rocca <*****@*****.**>
 * @since 2.0.0
 * @return mixed array
 *
 */
return array(array('type' => 'title', 'name' => __('General', 'yit'), 'desc' => ''), array('id' => 'header-skin', 'type' => 'select', 'name' => __('Header Skin', 'yit'), 'desc' => __('Select the skin for the header', 'yit'), 'options' => array('skin1' => __('Skin1 - Logo, menu, search, cart in one row', 'yit'), 'skin2' => __('Skin2 - Menu under the logo', 'yit')), 'std' => 'skin1', 'in_skin' => true), array('id' => 'header-sticky', 'type' => 'onoff', 'name' => __('Header Sticky', 'yit'), 'desc' => __('Want to use a stycky header?', 'yit'), 'std' => 'yes', 'in_skin' => true), array('type' => 'title', 'name' => __('Logo', 'yit'), 'desc' => ''), array('id' => 'header-custom-logo', 'type' => 'onoff', 'name' => __('Custom logo', 'yit'), 'desc' => __('Want to use a custom image as logo?', 'yit'), 'std' => 'yes', 'in_skin' => true), array('id' => 'header-custom-logo-image', 'type' => 'upload', 'name' => __('Custom logo image', 'yit'), 'desc' => __('Select the custom image to use as logo', 'yit'), 'std' => YIT_THEME_ASSETS_URL . '/images/logo.png', 'deps' => array('ids' => 'header-custom-logo', 'values' => 'yes')), array('id' => 'header-logo-tagline', 'type' => 'onoff', 'name' => __('Logo Tagline', 'yit'), 'desc' => __('Specify if you want the tagline to show below the logo. ', 'yit'), 'std' => 'no'), array('id' => 'header-logo-tagline-mobile', 'type' => 'onoff', 'name' => __('Show logo Tagline in mobile', 'yit'), 'desc' => __('Specify if you want the tagline to show below the logo on mobile devices. ', 'yit'), 'std' => 'no', 'deps' => array('ids' => 'header-logo-tagline', 'values' => 'yes')), array('id' => 'header-search-mini', 'type' => 'title', 'name' => __('Search mini', 'yit'), 'desc' => ''), array('id' => 'search_type', 'type' => 'select', 'name' => __('Search type header', 'yit'), 'desc' => __('Select the type of posts you want to search with searchform of the header.', 'yit'), 'options' => array('product' => __('Products', 'yit'), 'post' => __('Posts', 'yit'), 'any' => __('All', 'yit')), 'std' => 'product'), array('id' => 'header-search-mini-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Select search mini icon', 'yit'), 'desc' => __('Select the icon for search mini', 'yit'), 'std' => array('select' => 'custom', 'icon' => 'search', 'custom' => YIT_THEME_ASSETS_URL . '/images/icon_search.png'), 'in_skin' => true), array('id' => 'header-search-mini-icon-color', 'type' => 'colorpicker', 'variations' => array('normal' => __('Links', 'yit'), 'hover' => __('Links hover', 'yit')), 'name' => __('Search mini icon color', 'yit'), 'desc' => __('Select the type to use for the icon in search mini.', 'yit'), 'std' => array('color' => array('normal' => '#484848', 'hover' => '#f7c104')), 'deps' => array('ids' => 'header-search-mini-icon', 'values' => 'icon'), 'linked_to' => array('hover' => 'theme-color-1'), 'style' => array('normal' => array('selectors' => '#header-sidebar .widget_search_mini > a > i', 'properties' => 'color'), 'hover' => array('selectors' => '#header-sidebar .widget_search_mini > a > i:hover', 'properties' => 'color')), 'in_skin' => true));
コード例 #7
0
<?php

/**
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
/**
 * Return an array with the options for Theme Options > Shop > Single Product Page
 *
 * @package Yithemes
 * @author Andrea Grillo <*****@*****.**>
 * @author Antonio La Rocca <*****@*****.**>
 * @since 2.0.0
 * @return mixed array
 *
 */
return array(array('type' => 'title', 'name' => __('Single Product Page', 'yit'), 'desc' => ''), array('id' => 'shop-single-product-nav', 'type' => 'onoff', 'name' => __('Show nav prev/next link', 'yit'), 'desc' => __('Say if you want to show product navigation', 'yit'), 'std' => 'yes'), array('id' => 'shop-nav-in-category', 'type' => 'onoff', 'name' => __('Nav in same category', 'yit'), 'desc' => __('Select it to navigate in the same product category of the displayed product', 'yit'), 'std' => 'no', 'deps' => array('ids' => 'shop-single-product-nav', 'values' => 'yes')), array('id' => 'shop-single-product-title', 'type' => 'onoff', 'name' => __('Show title', 'yit'), 'desc' => __('Say if you want to show product title', 'yit'), 'std' => 'yes'), array('id' => 'shop-single-product-title-uppercase', 'type' => 'onoff', 'name' => __('Force title to uppercase', 'yit'), 'desc' => __('Say if you want to force product title to uppercase', 'yit'), 'std' => 'yes', 'deps' => array('ids' => 'shop-single-product-title', 'values' => 'yes')), array('id' => 'shop-single-product-price', 'type' => 'onoff', 'name' => __('Show price', 'yit'), 'desc' => __('Select if you want to show price.', 'yit'), 'std' => 'yes'), array('id' => 'shop-single-add-to-cart', 'type' => 'onoff', 'name' => __('Show button add to cart', 'yit'), 'desc' => __('Select if you want to show purchase button.', 'yit'), 'std' => 'yes'), array('id' => 'shop-single-show-wishlist', 'type' => 'onoff', 'name' => __('Show wishlist button', 'yit'), 'desc' => __('Say if you want to show wishlist button.', 'yit'), 'std' => 'yes'), array('id' => 'shop-single-share', 'type' => 'onoff', 'name' => __('Show share link', 'yit'), 'desc' => __('Say if you want to show link for sharing product.', 'yit'), 'std' => 'yes'), array('id' => 'shop-single-metas', 'type' => 'onoff', 'name' => __('Show product metas (categories and tags)', 'yit'), 'desc' => __('Say if you want to show product metas in your single product page. It also remove Brands if you are using WooCommerce Brands Addon.', 'yit'), 'std' => 'yes'), array('id' => 'shop-remove-reviews', 'type' => 'onoff', 'name' => __('Remove reviews tab', 'yit'), 'desc' => __('Say if you want to remove reviews tab from all products', 'yit'), 'std' => 'no'), array('id' => 'shop-products-tab-layout', 'type' => 'select', 'name' => __('Product tab orientation', 'yit'), 'desc' => __('Set the orientation for the product tab.', 'yit'), 'options' => array('vertical' => __('Vertical', 'yit'), 'horizontal' => __('Horizontal', 'yit')), 'std' => 'vertical'), array('id' => 'shop-products-tab-first-opened', 'type' => 'onoff', 'name' => __('Product Tab First Opened', 'yit'), 'desc' => __('Set if you want to keep opened the first tab.', 'yit'), 'std' => 'no', 'deps' => array('ids' => 'shop-products-tab-layout', 'values' => 'vertical')), array('type' => 'title', 'name' => __('Related products', 'yit'), 'desc' => ''), array('id' => 'shop-show-related', 'type' => 'onoff', 'name' => __('Show related products', 'yit'), 'desc' => __('Select if you want to display Related Products.', 'yit'), 'std' => 'yes'), array('id' => 'shop-show-custom-related', 'type' => 'onoff', 'name' => __('Custom Related Products number', 'yit'), 'desc' => __('Select if you want to customize the number of Related Products. Note: if you are already using a custom filter to do that, please don\'t enable this option', 'yit'), 'std' => 'no', 'deps' => array('ids' => 'shop-show-related', 'values' => 'yes')), array('id' => 'shop-number-related', 'type' => 'number', 'name' => __('Number of Related Products', 'yit'), 'desc' => __('Set the total numbers of the related products displayed, on the product detail page. Note: related products are displayed randomly from Woocommerce. Sometimes the number of related products could be less than the number of items selected. This number depends from the query plugin, not from the theme.', 'yit'), 'std' => 3, 'deps' => array('ids' => 'shop-show-custom-related', 'values' => 'yes')), !function_exists('YIT_Contact_Form') ? false : array('type' => 'title', 'name' => __('Inquiry Form Options', 'yit'), 'desc' => ''), !function_exists('YIT_Contact_Form') ? false : array('id' => 'shop-remove-inquiry-form', 'type' => 'onoff', 'name' => __('Remove inquiry form', 'yit'), 'desc' => __('Say if you want to remove inquiry form from all products', 'yit'), 'std' => 'no'), !function_exists('YIT_Contact_Form') ? false : array('id' => 'shop-inquiry-title', 'type' => 'text', 'name' => __('Inquiry box title', 'yit'), 'desc' => __('Set inquiry box title', 'yit'), 'std' => __('send an inquiry for this item', 'yit')), !function_exists('YIT_Contact_Form') ? false : array('id' => 'shop-inquiry-title-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show inquiry icon', 'yit'), 'desc' => __('Select the icon for inquiry box title. Note: Custom icon size will be scaled to 25x25', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'envelope-o', 'custom' => '')), !function_exists('YIT_Contact_Form') ? false : array('id' => 'shop-single-product-contact-form', 'type' => 'select', 'name' => __('Inquiry form', 'yit'), 'desc' => __('Select contact form type. Note: First you must create one contact form on plugin YIT Contact Form', 'yit'), 'options' => apply_filters('yit_get_contact_forms', array()), 'std' => false));
コード例 #8
0
ファイル: metabox.php プロジェクト: lieison/IndustriasFenix
<?php

/**
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
if (!defined('YIT')) {
    exit('Direct access forbidden.');
}
//Add Metabox to pages
$args1 = array('id' => 'yit-page-setting', 'label' => __('Page settings', 'yit'), 'pages' => 'page', 'context' => 'normal', 'priority' => 'high', 'tabs' => array('settings' => array('label' => __('Settings', 'yit'), 'fields' => array('active_page_options' => array('label' => __('Active Page Options', 'yit'), 'desc' => '', 'type' => 'checkbox', 'std' => '0'), 'show_title' => array('label' => __('Show Title', 'yit'), 'desc' => __('Show or not the title of the page', 'yit'), 'type' => 'checkbox', 'std' => ''), 'sep' => array('type' => 'sep'), 'show_breadcrumb' => array('label' => __('Show Breadcrumb', 'yit'), 'desc' => __('Show or not the breadcumb', 'yit'), 'type' => 'checkbox', 'std' => ''), 'sep1' => array('type' => 'sep'), 'show_slogan' => array('label' => __('Show Slogan', 'yit'), 'desc' => __('Enable Slogan in the header', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'slogan' => array('label' => __('Slogan', 'yit'), 'desc' => __('Show a slogan before the page content', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'sub_slogan' => array('label' => __('Sub Slogan', 'yit'), 'desc' => __('Show a sub slogan before the page content', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'sep3' => array('type' => 'sep'), 'sidebars' => array('label' => __('Sidebar', 'yit'), 'type' => 'sidebars', 'std' => array('layout' => 'sidebar-no')))), 'header' => array('label' => __('Header', 'yit'), 'fields' => array('static_image' => array('label' => __('Use static image', 'yit'), 'desc' => __('Set YES if you want a static header, instead of the slider.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'image_upload' => array('label' => __('Static image', 'yit'), 'desc' => __('Upload here the image to use for the static header, only if you have set to YES the option above.', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_static_image', 'values' => 'yes')), 'image_link' => array('label' => __('Static image link', 'yit'), 'desc' => __('The URL where the fixed image will link.', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_static_image', 'values' => 'yes')), 'image_target' => array('label' => __('Static image target', 'yit'), 'desc' => __('How to open the link of the static image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'frameset' => __('Parent frameset', 'yit'), 'full' => __('Full body of the window', 'yit'), 'new' => __('In a new window', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_static_image', 'values' => 'yes')), 'sep' => array('type' => 'sep'), 'parallax' => array('label' => __('Enable parallax effect', 'yit'), 'desc' => __('Enable Parallax Effect in the header image.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'parallax_height' => array('label' => __('Container height', 'yit'), 'desc' => '', 'type' => 'number', 'std' => '300', 'min' => '0', 'max' => '1000', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_content' => array('label' => __('Content', 'yit'), 'desc' => '', 'type' => 'textarea', 'std' => '', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_vertical_align' => array('label' => __('Vertical align', 'yit'), 'desc' => '', 'type' => 'select', 'options' => array('center' => __('Center', 'yit'), 'top' => __('Top', 'yit'), 'bottom' => __('Bottom', 'yit')), 'std' => 'center', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_horizontal_align' => array('label' => __('Horizontal align', 'yit'), 'desc' => '', 'type' => 'select', 'options' => array('center' => __('Center', 'yit'), 'left' => __('Left', 'yit'), 'right' => __('Right', 'yit')), 'std' => 'center', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_text_color' => array('label' => __('Content text color', 'yit'), 'desc' => '', 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_effect' => array('label' => __('Effect', 'yit'), 'desc' => '', 'type' => 'select', 'options' => array('fadeIn' => __('fadeIn', 'yit'), 'fadeInUp' => __('fadeInUp', 'yit'), 'fadeInDown' => __('fadeInDown', 'yit'), 'fadeInLeft' => __('fadeInLeft', 'yit'), 'fadeInRight' => __('fadeInRight', 'yit'), 'fadeInUpBig' => __('fadeInUpBig', 'yit'), 'fadeInDownBig' => __('fadeInDownBig', 'yit'), 'fadeInLeftBig' => __('fadeInLeftBig', 'yit'), 'fadeInRightBig' => __('fadeInRightBig', 'yit'), 'bounceIn' => __('bounceIn', 'yit'), 'bounceInDown' => __('bounceInDown', 'yit'), 'bounceInUp' => __('bounceInUp', 'yit'), 'bounceInLeft' => __('bounceInLeft', 'yit'), 'bounceInRight' => __('bounceInRight', 'yit'), 'rotateIn' => __('rotateIn', 'yit'), 'rotateInDownLeft' => __('rotateInDownLeft', 'yit'), 'rotateInDownRight' => __('rotateInDownRight', 'yit'), 'rotateInUpLeft' => __('rotateInUpLeft', 'yit'), 'rotateInUpRight' => __('rotateInUpRight', 'yit'), 'lightSpeedIn' => __('lightSpeedIn', 'yit'), 'hinge' => __('hinge', 'yit'), 'rollIn' => __('rollIn', 'yit')), 'std' => 'fadeIn', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_overlay_opacity' => array('label' => __('Overlay', 'yit'), 'desc' => __('Set an opacity of overlay (0-100)', 'yit'), 'type' => 'number', 'std' => '20', 'min' => '0', 'max' => '100', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'sep1' => array('type' => 'sep'), 'custom_background' => array('label' => __('Enable custom header background', 'yit'), 'desc' => __('Set YES if you want to customize the header background.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'header_bg_color' => array('label' => __('Header background color', 'yit'), 'desc' => __('Select a background color for the header', 'yit'), 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_image' => array('label' => __('Header background image', 'yit'), 'desc' => __('Select a background image for the header.', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_repeat' => array('label' => __('Background repeat', 'yit'), 'desc' => __('Select the repeat mode for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'repeat' => __('Repeat', 'yit'), 'repeat-x' => __('Repeat Horizontally', 'yit'), 'repeat-y' => __('Repeat Vertically', 'yit'), 'no-repeat' => __('No Repeat', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_position' => array('label' => __('Background position', 'yit'), 'desc' => __('Select the position for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'center' => __('Center', 'yit'), 'top left' => __('Top left', 'yit'), 'top center' => __('Top center', 'yit'), 'top right' => __('Top right', 'yit'), 'bottom left' => __('Bottom left', 'yit'), 'bottom center' => __('Bottom center', 'yit'), 'bottom right' => __('Bottom right', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_attachament' => array('label' => __('Background attachment', 'yit'), 'desc' => __('Select the attachment for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'scroll' => __('Scroll', 'yit'), 'fixed' => __('Fixed', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')))), 'body_background' => array('label' => __('Body Background', 'yit'), 'fields' => array('body_bg_color' => array('label' => __('Background color', 'yit'), 'desc' => __('Select the background color of the body (leave empty to use default, defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'colorpicker', 'std' => ''), 'sep' => array('type' => 'sep'), 'body_bg_image' => array('label' => __('Background image', 'yit'), 'desc' => __('Select the background image (leave empty to use default, defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'upload', 'std' => ''), 'body_bg_repeat' => array('label' => __('Background repeat', 'yit'), 'desc' => __('Select the repeat mode for the background image (default is defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'select', 'std' => 'default', 'options' => array('default' => __('Default', 'yit'), 'repeat' => __('Repeat', 'yit'), 'repeat-x' => __('Repeat Horizontally', 'yit'), 'repeat-y' => __('Repeat Vertically', 'yit'), 'no-repeat' => __('No Repeat', 'yit'))), 'body_bg_attachment' => array('label' => __('Background attachment', 'yit'), 'desc' => __('Select the attachment for the background image (default is defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'select', 'std' => 'default', 'options' => array('default' => __('Default', 'yit'), 'scroll' => __('Scroll', 'yit'), 'fixed' => __('Fixed', 'yit'))), 'body_bg_position' => array('label' => __('Background position', 'yit'), 'desc' => __('Select the position for the background image (default is defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'select', 'std' => 'default', 'options' => array('default' => __('Default', 'yit'), 'center' => __('Center', 'yit'), 'top left' => __('Top left', 'yit'), 'top center' => __('Top center', 'yit'), 'top right' => __('Top right', 'yit'), 'bottom left' => __('Bottom left', 'yit'), 'bottom center' => __('Bottom center', 'yit'), 'bottom right' => __('Bottom right', 'yit'))), 'sep1' => array('type' => 'sep'), 'wrapper_bg_color' => array('label' => __('Container background color for boxed layout', 'yit'), 'desc' => __('Select the background color of the container for boxed layout (leave empty to use default, defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'colorpicker', 'std' => ''))), 'google_map' => array('label' => __('Google Map', 'yit'), 'fields' => array('url' => array('label' => __('URL', 'yit'), 'desc' => __('Google map url', 'yit'), 'type' => 'text', 'std' => ''), 'sep' => array('type' => 'sep'), 'google_map_show_overlay_box' => array('label' => __('Show Overlay Info Box', 'yit'), 'desc' => __('Set the address', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'google_map_overlay_address' => array('label' => __('Address', 'yit'), 'desc' => __('set the adress for the info box', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_google_map_show_overlay_box', 'values' => 'yes')), 'google_map_overlay_info' => array('label' => __('Info', 'yit'), 'desc' => __('set info for the box', 'yit'), 'type' => 'textarea', 'std' => '', 'deps' => array('ids' => '_google_map_show_overlay_box', 'values' => 'yes'))))));
$metabox1 = YIT_Metabox('yit-page-setting');
$metabox1->init($args1);
//Add Metabox to post
$args2 = array('id' => 'yit-post-setting', 'label' => __('Post settings', 'yit'), 'pages' => 'post', 'context' => 'normal', 'priority' => 'high', 'tabs' => array('settings' => array('label' => __('Settings', 'yit'), 'fields' => array('active_page_options' => array('label' => __('Active Page Options', 'yit'), 'desc' => '', 'type' => 'checkbox', 'std' => '0'), 'sidebars' => array('label' => __('Sidebar', 'yit'), 'type' => 'sidebars', 'std' => ''))), 'post-formats' => array('label' => __('Post Formats', 'yit'), 'fields' => array('audio-url' => array('label' => __('Audio URL', 'yit'), 'desc' => __('Insert the <a target="_blank" href="http://soundcloud.com/">SoundCloud.com</a> song URL.', 'yit'), 'type' => 'text', 'std' => ''), 'audio-iframe' => array('label' => __('Use iFrame', 'yit'), 'desc' => __('Use iFrame instead of Flash.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'audio-comments' => array('label' => __('Show Comments', 'yit'), 'desc' => __('Show comments of the song.', 'yit'), 'type' => 'onoff', 'std' => 'no', 'deps' => array('ids' => '_audio-iframe', 'values' => 'yes')), 'audio-color' => array('label' => __('Color', 'yit'), 'desc' => __('Template color.', 'yit'), 'type' => 'colorpicker', 'std' => '#fab000', 'deps' => array('ids' => '_audio-iframe', 'values' => 'no')), 'sep1' => array('type' => 'sep'), 'video-id' => array('label' => __('Video ID', 'yit'), 'desc' => __('Insert the video ID.', 'yit'), 'type' => 'text', 'std' => ''), 'video-host' => array('label' => __('Video host', 'yit'), 'desc' => __('Select where is the video hosted.', 'yit'), 'type' => 'select', 'options' => array('youtube' => __('Youtube', 'yit'), 'vimeo' => __('Vimeo', 'yit')), 'std' => '')))));
$metabox2 = YIT_Metabox('yit-post-setting');
$metabox2->init($args2);
$args3 = array('id' => 'yit-product-setting', 'label' => __('Product Page Settings', 'yit'), 'pages' => 'product', 'context' => 'normal', 'priority' => 'high', 'tabs' => array('settings' => array('label' => __('Tabs', 'yit'), 'fields' => array('shop-enable' => array('label' => __('Active shop features', 'yit'), 'desc' => __('Set NO if you want this product shown as catalog, without ability to add to cart', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'yes' => __('Yes', 'yit'), 'no' => __('No', 'yit')), 'std' => 'default'), 'sep1' => array('type' => 'sep'), 'modal_window' => array('label' => __('Show modal window', 'yit'), 'desc' => __('Set YES if you want a modal window link in your product', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'modal_window_text' => array('label' => __('Modal window link text', 'yit'), 'desc' => __('Set the modal window link text', 'yit'), 'type' => 'text', 'std' => __('VIEW MODAL WINDOW', 'yit'), 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'modal_window_icon' => array('label' => __('Modal window link icon', 'yit'), 'desc' => __('Select the icon for modal window. Note: Custom icon size will be scaled to 25x25', 'yit'), 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'std' => array('select' => 'icon', 'icon' => '', 'custom' => ''), 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'modal_window_title' => array('label' => __('Modal window title', 'yit'), 'desc' => __('Set title for modal window', 'yit'), 'type' => 'text', 'std' => __('Modal Window', 'yit'), 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'modal_window_img' => array('label' => __('Modal window image', 'yit'), 'desc' => __('Select the image content of modal window', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'custom_tab' => array('label' => __('Tabs', 'yit'), 'desc' => __('Insert a custom tab.', 'yit'), 'type' => 'customtabs')))));
$metabox3 = YIT_Metabox('yit-product-setting');
$metabox3->init($args3);
コード例 #9
0
ファイル: blog.php プロジェクト: lieison/IndustriasFenix
<?php

/**
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
/**
 * Return an array with the options for Theme Options > Content > Blog
 *
 * @package Yithemes
 * @author  Andrea Grillo <*****@*****.**>
 * @author  Antonio La Rocca <*****@*****.**>
 * @since   2.0.0
 * @return mixed array
 *
 */
return array(array('type' => 'title', 'name' => __('List Posts', 'yit'), 'desc' => ''), array('id' => 'blog-type', 'type' => 'select', 'options' => apply_filters('yit_blog-type_option', array('small' => __('Small Thumbnail', 'yit'), 'big' => __('Big Thumbnail', 'yit'), 'masonry' => __('Masonry Thumbnail', 'yit'))), 'name' => __('Blog Type', 'yit'), 'desc' => __('Choose the layout for your blog page.', 'yit'), 'std' => 'big'), array('id' => 'blog-excluded-cats', 'type' => 'cat', 'cols' => 2, 'heads' => array(__('Blog Page', 'yit'), __('List cat. sidebar', 'yit')), 'name' => __('Exclude categories', 'yit'), 'desc' => __('Select witch categories you want exlude from blog.', 'yit')), array('id' => 'blog-show-featured-image', 'type' => 'onoff', 'name' => __('Show featured image', 'yit'), 'desc' => __('Select if you want to show the featured image of the post. ', 'yit'), 'std' => 'yes', 'deps' => array('ids' => 'blog-type', 'values' => 'small')), array('id' => 'blog-big-show-post-formats', 'type' => 'onoff', 'name' => __('Show post format', 'yit'), 'desc' => __('Select if you want to show the featured image/post formats of the post. ', 'yit'), 'std' => 'yes', 'deps' => array('ids' => 'blog-type', 'values' => 'big')), array('id' => 'blog-big-what-show', 'type' => 'select', 'options' => array('featured-image' => __('Featured image only', 'yit'), 'post-format' => __('Post format', 'yit')), 'name' => __('Show post formats or featured image', 'yit'), 'desc' => __('Select if you want to show the featured image or post formats of the post. ', 'yit'), 'std' => 'featured-image', 'deps' => array('ids' => 'blog-type', 'values' => 'big')), array('id' => 'blog-show-title', 'type' => 'onoff', 'name' => __('Show Title', 'yit'), 'desc' => __("Select if you want to show the title of the post.", 'yit'), 'std' => 'yes'), array('id' => 'blog-show-excerpt', 'type' => 'onoff', 'name' => __('Show Content', 'yit'), 'desc' => __("Select if you want to show the content of the post. It work only on masonry blog. If not enabled any post content will appear.", 'yit'), 'std' => 'yes', 'deps' => array('ids' => 'blog-type', 'values' => 'masonry')), array('id' => 'blog-show-date', 'type' => 'onoff', 'name' => __('Show date', 'yit'), 'desc' => __('Select if you want to show the date of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-show-author', 'type' => 'onoff', 'name' => __('Show author', 'yit'), 'desc' => __('Select if you want to show the author of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-author-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show author icon', 'yit'), 'desc' => __('Select the icon for post author.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'user', 'custom' => ''), 'deps' => array('ids' => 'blog-type', 'values' => 'small')), array('id' => 'blog-show-comments', 'type' => 'onoff', 'name' => __('Show comments', 'yit'), 'desc' => __('Select if you want to show the comments of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-comments-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show comments icon', 'yit'), 'desc' => __('Select the icon for post comments.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'comment', 'custom' => ''), 'deps' => array('ids' => 'blog-type', 'values' => 'small')), array('id' => 'blog-show-tags', 'type' => 'onoff', 'name' => __('Show tags', 'yit'), 'desc' => __('Select if you want to show the tags of the post.', 'yit'), 'std' => 'no'), array('id' => 'blog-tags-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show tags icon', 'yit'), 'desc' => __('Select the icon for post tags.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'tags', 'custom' => ''), 'deps' => array('ids' => 'blog-type', 'values' => 'small')), array('id' => 'blog-show-categories', 'type' => 'onoff', 'name' => __('Show categories', 'yit'), 'desc' => __('Select if you want to show the categories of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-categories-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show categories icon', 'yit'), 'desc' => __('Select the icon for post categories.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'tag', 'custom' => ''), 'deps' => array('ids' => 'blog-type', 'values' => 'small')), array('id' => 'blog-post-format-icon', 'type' => 'onoff', 'name' => __('Show post format icon', 'yit'), 'desc' => __('Select if you want to show the post format icon.', 'yit'), 'std' => 'yes'), array('id' => 'blog-show-read-more', 'type' => 'onoff', 'name' => __('Show "Read More" button', 'yit'), 'desc' => __('Select if you want to show the "Read More" button.', 'yit'), 'std' => 'yes'), array('id' => 'blog-read-more-text', 'type' => 'text', 'name' => __('Read More text', 'yit'), 'desc' => __('Write what you want to show on more link.', 'yit'), 'std' => '// read more'), array('type' => 'title', 'name' => __('Single Post', 'yit'), 'desc' => ''), array('id' => 'blog-single-type', 'type' => 'select', 'options' => apply_filters('yit_blog-single-type_option', array('small' => __('Small Thumbnail', 'yit'), 'big' => __('Big Thumbnail', 'yit'))), 'name' => __('Single Blog Type', 'yit'), 'desc' => __('Choose the layout for your single blog page.', 'yit'), 'std' => 'small'), array('id' => 'blog-single-hide-footer', 'type' => 'onoff', 'name' => __('Hide Footer', 'yit'), 'desc' => __("Select if you want to hide the footer on single post page in big style.", 'yit'), 'std' => 'yes', 'deps' => array('ids' => 'blog-single-type', 'values' => 'big')), array('id' => 'blog-single-show-featured-image', 'type' => 'onoff', 'name' => __('Show featured image', 'yit'), 'desc' => __('Select if you want to show the featured image of the post. ', 'yit'), 'std' => 'yes', 'deps' => array('ids' => 'blog-single-type', 'values' => 'small')), array('id' => 'blog-single-show-title', 'type' => 'onoff', 'name' => __('Show Title', 'yit'), 'desc' => __("Select if you want to show the title of the post.", 'yit'), 'std' => 'yes'), array('id' => 'blog-single-show-date', 'type' => 'onoff', 'name' => __('Show date', 'yit'), 'desc' => __('Select if you want to show the date of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-single-show-author', 'type' => 'onoff', 'name' => __('Show author', 'yit'), 'desc' => __('Select if you want to show the author of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-single-author-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show author icon', 'yit'), 'desc' => __('Select the icon for post author.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'user', 'custom' => ''), 'deps' => array('ids' => 'blog-single-type', 'values' => 'small')), array('id' => 'blog-single-show-categories', 'type' => 'onoff', 'name' => __('Show categories', 'yit'), 'desc' => __('Select if you want to show the categories of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-single-categories-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show categories icon', 'yit'), 'desc' => __('Select the icon for post categories.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'tag', 'custom' => ''), 'deps' => array('ids' => 'blog-single-type', 'values' => 'small')), array('id' => 'blog-single-show-tags', 'type' => 'onoff', 'name' => __('Show tags', 'yit'), 'desc' => __('Select if you want to show the tags of the post.', 'yit'), 'std' => 'no'), array('id' => 'blog-single-tags-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show tags icon', 'yit'), 'desc' => __('Select the icon for post tags, in single.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'tags', 'custom' => ''), 'deps' => array('ids' => 'blog-single-type', 'values' => 'small')), array('id' => 'blog-single-show-comments', 'type' => 'onoff', 'name' => __('Show comments', 'yit'), 'desc' => __('Select if you want to show the comments of the post.', 'yit'), 'std' => 'yes'), array('id' => 'blog-single-comments-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show comments icon', 'yit'), 'desc' => __('Select the icon for post comments, in single.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'comment', 'custom' => ''), 'deps' => array('ids' => 'blog-single-type', 'values' => 'small')), array('id' => 'blog-single-show-share', 'type' => 'onoff', 'name' => __('Show "Share"', 'yit'), 'desc' => __('Select if you want to show the "Share".', 'yit'), 'std' => 'yes'), array('id' => 'blog-single-share-text', 'type' => 'text', 'name' => __('Show "Share" text', 'yit'), 'desc' => __('Select the "Share" text.', 'yit'), 'std' => __('LOVE IT, SHARE IT', 'yit'), 'deps' => array('ids' => 'blog-single-show-share', 'values' => 'yes')), array('id' => 'blog-single-share-icon', 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'name' => __('Show comments icon', 'yit'), 'desc' => __('Select the icon for post comments, in single.', 'yit'), 'std' => array('select' => 'icon', 'icon' => 'share', 'custom' => ''), 'deps' => array('ids' => 'blog-single-show-share', 'values' => 'yes')));
コード例 #10
0
ファイル: YIT_Text_Image.php プロジェクト: jabue/wordpress
        function form( $instance ) {
            global $icons_name;

            /* Impostazioni di default del widget */
            $defaults = array(
                'title' => '',
                'icon' => '',
                'image' => '',
                'align' => '',
                'link' => '',
                'text'  => '',
                'autop' => false
            );

            $icons = YIT_Plugin_Common::get_awesome_icons();


            $instance = wp_parse_args( (array) $instance, $defaults ); ?>

            <p>
                <label for="<?php $this->get_field_id( 'title' ) ?>"><?php _e( 'Title', 'yit' ) ?></label>
                <input class="widefat" type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" />
            </p>

            <p>
                <label for="<?php echo $this->get_field_id( 'icon' ) ?>"><?php _e( 'Icon', 'yit' ) ?></label>
                <select style="font-family: 'FontAwesome';" id="<?php echo $this->get_field_id( 'icon' ); ?>" name="<?php echo $this->get_field_name( 'icon' ); ?>">
                    <?php foreach( $icons as $key => $icon ): ?>
                        <option value="<?php echo $icon ?>"<?php selected( $instance['icon'], $icon ); ?>><?php echo '&#x' . $key . '; ' . $icon ?></option>
                    <?php endforeach; ?>
                </select>
                <span><?php _e( 'If you set an image this field is invalid', 'yit' )?></span>
            </p>

            <p>
                <label for="<?php echo $this->get_field_id( 'image' ) ?>"><?php _e( 'Image', 'yit' ) ?></label>
                <input type="text" id="<?php echo $this->get_field_id( 'image' ); ?>" name="<?php echo $this->get_field_name( 'image' ); ?>" value="<?php echo $instance['image']; ?>" />
                <input type="button" value="Upload" id="<?php echo $this->get_field_id( 'image' ); ?>-button" class="upload_button button" />
            </p>

            <p>
                <label for="<?php echo $this->get_field_id( 'align' ) ?>"><?php _e( 'Image Alignment', 'yit' ) ?></label>
                <select id="<?php echo $this->get_field_id( 'align' ); ?>" name="<?php echo $this->get_field_name( 'align' ); ?>">
                    <option value="left"<?php selected( $instance['align'], 'left' ); ?>>Left</option>
                    <option value="center"<?php selected( $instance['align'], 'center' ); ?>>Center</option>
                    <option value="right"<?php selected( $instance['align'], 'right' ); ?>>Right</option>
                </select>
            </p>

            <p>
                <label for="<?php echo $this->get_field_id( 'link' ); ?>"><?php _e( 'Link Image', 'yit' ) ?></label>
                <input type="text" id="<?php echo $this->get_field_id( 'link' ); ?>" name="<?php echo $this->get_field_name( 'link' ); ?>" value="<?php echo $instance['link']; ?>" />
            </p>

            <p>
                <label for="<?php echo $this->get_field_id( 'text' ); ?>"><?php _e( 'Text ( you can use html )', 'yit' ); ?></label>
                <textarea class="widefat" id="<?php echo $this->get_field_id( 'text' ); ?>" name="<?php echo $this->get_field_name( 'text' ); ?>" cols="20" rows="16"><?php echo $instance['text']; ?></textarea>
            </p>

            <p>
                <label for="<?php echo $this->get_field_id( 'autop' ); ?>"><?php _e( 'Automatically add paragraphs', 'yit' ) ?></label>
                <input type="checkbox" id="<?php echo $this->get_field_id( 'autop' ); ?>" name="<?php echo $this->get_field_name( 'autop' ); ?>" value="1"<?php if ( $instance['autop'] ) { echo 'checked="checked"'; } ?> />
            </p>

        <?php
        }
コード例 #11
0
ファイル: metabox.php プロジェクト: jabue/wordpress
<?php

/**
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
if (!defined('YIT')) {
    exit('Direct access forbidden.');
}
//Add Metabox to pages
$args1 = array('id' => 'yit-page-setting', 'label' => __('Page settings', 'yit'), 'pages' => 'page', 'context' => 'normal', 'priority' => 'high', 'tabs' => array('settings' => array('label' => __('Settings', 'yit'), 'fields' => array('active_page_options' => array('label' => __('Active Page Options', 'yit'), 'desc' => '', 'type' => 'checkbox', 'std' => '0'), 'show_title' => array('label' => __('Show Title', 'yit'), 'desc' => __('Show or not the title of the page', 'yit'), 'type' => 'checkbox', 'std' => '1'), 'sep' => array('type' => 'sep'), 'show_breadcrumb' => array('label' => __('Show Breadcrumb', 'yit'), 'desc' => __('Show or not the breadcumb', 'yit'), 'type' => 'checkbox', 'std' => ''), 'sep1' => array('type' => 'sep'), 'show_slogan' => array('label' => __('Show Slogan', 'yit'), 'desc' => __('Enable Slogan in the header', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'slogan' => array('label' => __('Slogan', 'yit'), 'desc' => __('Show a slogan before the page content', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_color' => array('label' => __('Slogan color', 'yit'), 'desc' => __('Select a color for the slogan', 'yit'), 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'sub_slogan' => array('label' => __('Sub Slogan', 'yit'), 'desc' => __('Show a sub slogan before the page content', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'subslogan_color' => array('label' => __('Subslogan color', 'yit'), 'desc' => __('Select a color for the sublogan', 'yit'), 'type' => 'colorpicker', 'std' => '#b0b0b0', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_border' => array('label' => __('Enable slogan border', 'yit'), 'desc' => __('Set YES if you want to customize the border of slogan', 'yit'), 'type' => 'onoff', 'std' => 'yes', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_border_color' => array('label' => __('Slogan border color', 'yit'), 'desc' => __('Select a color for the border of slogan', 'yit'), 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_slogan_border', 'values' => 'yes')), 'slogan_image_background' => array('label' => __('Enable slogan background', 'yit'), 'desc' => __('Set YES if you want to customize the background of slogan', 'yit'), 'type' => 'onoff', 'std' => 'no', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_image_height' => array('label' => __('Slogan height', 'yit'), 'desc' => __('Set 0 for auto height', 'yit'), 'type' => 'number', 'std' => '0', 'min' => '0', 'max' => '1000', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_bg_color' => array('label' => __('Slogan background color', 'yit'), 'desc' => __('Select a background color for the slogan', 'yit'), 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_bg_image' => array('label' => __('Slogan background image', 'yit'), 'desc' => __('Select a background image for the slogan.', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_bg_repeat' => array('label' => __('Background repeat', 'yit'), 'desc' => __('Select the repeat mode for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'repeat' => __('Repeat', 'yit'), 'repeat-x' => __('Repeat Horizontally', 'yit'), 'repeat-y' => __('Repeat Vertically', 'yit'), 'no-repeat' => __('No Repeat', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_bg_position' => array('label' => __('Background position', 'yit'), 'desc' => __('Select the position for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'center' => __('Center', 'yit'), 'top left' => __('Top left', 'yit'), 'top center' => __('Top center', 'yit'), 'top right' => __('Top right', 'yit'), 'bottom left' => __('Bottom left', 'yit'), 'bottom center' => __('Bottom center', 'yit'), 'bottom right' => __('Bottom right', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'slogan_bg_attachment' => array('label' => __('Background attachment', 'yit'), 'desc' => __('Select the attachment for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'scroll' => __('Scroll', 'yit'), 'fixed' => __('Fixed', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_show_slogan', 'values' => 'yes')), 'sep3' => array('type' => 'sep'), 'sidebars' => array('label' => __('Sidebar', 'yit'), 'type' => 'sidebars', 'std' => array('layout' => 'sidebar-no')))), 'header' => array('label' => __('Header', 'yit'), 'fields' => array('static_image' => array('label' => __('Use static image', 'yit'), 'desc' => __('Set YES if you want a static header, instead of the slider.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'image_upload' => array('label' => __('Static image', 'yit'), 'desc' => __('Upload here the image to use for the static header, only if you have set to YES the option above.', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_static_image', 'values' => 'yes')), 'image_link' => array('label' => __('Static image link', 'yit'), 'desc' => __('The URL where the fixed image will link.', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_static_image', 'values' => 'yes')), 'image_target' => array('label' => __('Static image target', 'yit'), 'desc' => __('How to open the link of the static image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'frameset' => __('Parent frameset', 'yit'), 'full' => __('Full body of the window', 'yit'), 'new' => __('In a new window', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_static_image', 'values' => 'yes')), 'sep' => array('type' => 'sep'), 'parallax' => array('label' => __('Enable parallax effect', 'yit'), 'desc' => __('Enable Parallax Effect in the header image.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'parallax_height' => array('label' => __('Container height', 'yit'), 'desc' => '', 'type' => 'number', 'std' => '300', 'min' => '0', 'max' => '1000', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_content' => array('label' => __('Content', 'yit'), 'desc' => '', 'type' => 'textarea', 'std' => '', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_vertical_align' => array('label' => __('Vertical align', 'yit'), 'desc' => '', 'type' => 'select', 'options' => array('center' => __('Center', 'yit'), 'top' => __('Top', 'yit'), 'bottom' => __('Bottom', 'yit')), 'std' => 'center', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_horizontal_align' => array('label' => __('Horizontal align', 'yit'), 'desc' => '', 'type' => 'select', 'options' => array('center' => __('Center', 'yit'), 'left' => __('Left', 'yit'), 'right' => __('Right', 'yit')), 'std' => 'center', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_text_color' => array('label' => __('Content text color', 'yit'), 'desc' => '', 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_effect' => array('label' => __('Effect', 'yit'), 'desc' => '', 'type' => 'select', 'options' => array('fadeIn' => __('fadeIn', 'yit'), 'fadeInUp' => __('fadeInUp', 'yit'), 'fadeInDown' => __('fadeInDown', 'yit'), 'fadeInLeft' => __('fadeInLeft', 'yit'), 'fadeInRight' => __('fadeInRight', 'yit'), 'fadeInUpBig' => __('fadeInUpBig', 'yit'), 'fadeInDownBig' => __('fadeInDownBig', 'yit'), 'fadeInLeftBig' => __('fadeInLeftBig', 'yit'), 'fadeInRightBig' => __('fadeInRightBig', 'yit'), 'bounceIn' => __('bounceIn', 'yit'), 'bounceInDown' => __('bounceInDown', 'yit'), 'bounceInUp' => __('bounceInUp', 'yit'), 'bounceInLeft' => __('bounceInLeft', 'yit'), 'bounceInRight' => __('bounceInRight', 'yit'), 'rotateIn' => __('rotateIn', 'yit'), 'rotateInDownLeft' => __('rotateInDownLeft', 'yit'), 'rotateInDownRight' => __('rotateInDownRight', 'yit'), 'rotateInUpLeft' => __('rotateInUpLeft', 'yit'), 'rotateInUpRight' => __('rotateInUpRight', 'yit'), 'lightSpeedIn' => __('lightSpeedIn', 'yit'), 'hinge' => __('hinge', 'yit'), 'rollIn' => __('rollIn', 'yit')), 'std' => 'fadeIn', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'parallax_overlay_opacity' => array('label' => __('Overlay', 'yit'), 'desc' => __('Set an opacity of overlay (0-100)', 'yit'), 'type' => 'number', 'std' => '20', 'min' => '0', 'max' => '100', 'deps' => array('ids' => '_parallax', 'values' => 'yes')), 'sep1' => array('type' => 'sep'), 'custom_background' => array('label' => __('Enable custom header background', 'yit'), 'desc' => __('Set YES if you want to customize the header background.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'header_bg_color' => array('label' => __('Header background color', 'yit'), 'desc' => __('Select a background color for the header', 'yit'), 'type' => 'colorpicker', 'std' => '#ffffff', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_image' => array('label' => __('Header background image', 'yit'), 'desc' => __('Select a background image for the header.', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_repeat' => array('label' => __('Background repeat', 'yit'), 'desc' => __('Select the repeat mode for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'repeat' => __('Repeat', 'yit'), 'repeat-x' => __('Repeat Horizontally', 'yit'), 'repeat-y' => __('Repeat Vertically', 'yit'), 'no-repeat' => __('No Repeat', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_position' => array('label' => __('Background position', 'yit'), 'desc' => __('Select the position for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'center' => __('Center', 'yit'), 'top left' => __('Top left', 'yit'), 'top center' => __('Top center', 'yit'), 'top right' => __('Top right', 'yit'), 'bottom left' => __('Bottom left', 'yit'), 'bottom center' => __('Bottom center', 'yit'), 'bottom right' => __('Bottom right', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'header_bg_attachament' => array('label' => __('Background attachment', 'yit'), 'desc' => __('Select the attachment for the background image.', 'yit'), 'type' => 'select', 'options' => array('default' => __('Default', 'yit'), 'scroll' => __('Scroll', 'yit'), 'fixed' => __('Fixed', 'yit')), 'std' => 'default', 'deps' => array('ids' => '_custom_background', 'values' => 'yes')), 'sep3' => array('type' => 'sep'), 'enable_dark_header' => array('label' => __('Enable style for dark header', 'yit'), 'desc' => __('Set YES to change the style of typography in header, useful if you are using the trasparent header and you have a dark static image.', 'yit'), 'type' => 'onoff', 'std' => 'no'))), 'body_background' => array('label' => __('Body Background', 'yit'), 'fields' => array('body_bg_color' => array('label' => __('Background color', 'yit'), 'desc' => __('Select the background color of the body (leave empty to use default, defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'colorpicker', 'std' => ''), 'sep' => array('type' => 'sep'), 'body_bg_image' => array('label' => __('Background image', 'yit'), 'desc' => __('Select the background image (leave empty to use default, defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'upload', 'std' => ''), 'body_bg_repeat' => array('label' => __('Background repeat', 'yit'), 'desc' => __('Select the repeat mode for the background image (default is defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'select', 'std' => 'default', 'options' => array('default' => __('Default', 'yit'), 'repeat' => __('Repeat', 'yit'), 'repeat-x' => __('Repeat Horizontally', 'yit'), 'repeat-y' => __('Repeat Vertically', 'yit'), 'no-repeat' => __('No Repeat', 'yit'))), 'body_bg_attachment' => array('label' => __('Background attachment', 'yit'), 'desc' => __('Select the attachment for the background image (default is defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'select', 'std' => 'default', 'options' => array('default' => __('Default', 'yit'), 'scroll' => __('Scroll', 'yit'), 'fixed' => __('Fixed', 'yit'))), 'body_bg_position' => array('label' => __('Background position', 'yit'), 'desc' => __('Select the position for the background image (default is defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'select', 'std' => 'default', 'options' => array('default' => __('Default', 'yit'), 'center' => __('Center', 'yit'), 'top left' => __('Top left', 'yit'), 'top center' => __('Top center', 'yit'), 'top right' => __('Top right', 'yit'), 'bottom left' => __('Bottom left', 'yit'), 'bottom center' => __('Bottom center', 'yit'), 'bottom right' => __('Bottom right', 'yit'))), 'sep1' => array('type' => 'sep'), 'wrapper_bg_color' => array('label' => __('Container background color for boxed layout', 'yit'), 'desc' => __('Select the background color of the container for boxed layout (leave empty to use default, defined in Theme Options -> Colors -> General).', 'yit'), 'type' => 'colorpicker', 'std' => ''))), 'google_map' => array('label' => __('Google Map', 'yit'), 'fields' => array('google_map_full_width' => array('label' => __('Full Width', 'yit'), 'type' => 'onoff', 'std' => 'yes'), 'google_map_width' => array('label' => __('Width', 'yit'), 'desc' => __('set the width for the google map', 'yit'), 'type' => 'text', 'std' => '', 'deps' => array('ids' => '_google_map_full_width', 'values' => 'no')), 'google_map_height' => array('label' => __('Height', 'yit'), 'desc' => __('set the height for the google map', 'yit'), 'type' => 'text', 'std' => ''), 'sep' => array('type' => 'sep'), 'google_map_overlay_address' => array('label' => __('Address', 'yit'), 'desc' => __('set the address (like "1600 Amphitheatre Parkway, Mountain View, CA" )', 'yit'), 'type' => 'text', 'std' => ''), 'google_map_overlay_latitude' => array('label' => __('Latitude', 'yit'), 'desc' => __('set the latitude', 'yit'), 'type' => 'text', 'std' => ''), 'google_map_overlay_longitude' => array('label' => __('Longitude', 'yit'), 'desc' => __('set the longitude', 'yit'), 'type' => 'text', 'std' => ''), 'google_map_overlay_zoom' => array('label' => __('Zoom of map', 'yit'), 'desc' => __('Set the zoom of map (0-19)', 'yit'), 'type' => 'number', 'std' => '15', 'min' => '0', 'max' => '19'), 'sep' => array('type' => 'sep'), 'google_map_overlay_marker' => array('label' => __('Marker image', 'yit'), 'desc' => __('upload a image for the marker', 'yit'), 'type' => 'upload', 'std' => ''), 'google_map_overlay_style' => array('label' => __('Style of map', 'yit'), 'desc' => __('Selectthe style of map', 'yit'), 'type' => 'select', 'options' => array('color' => __('Color', 'yit'), 'black' => __('Black and White', 'yit')), 'std' => 'black')))));
$metabox1 = YIT_Metabox('yit-page-setting');
$metabox1->init($args1);
//Add Metabox to post
$args2 = array('id' => 'yit-post-setting', 'label' => __('Post settings', 'yit'), 'pages' => 'post', 'context' => 'normal', 'priority' => 'high', 'tabs' => array('settings' => array('label' => __('Settings', 'yit'), 'fields' => array('active_page_options' => array('label' => __('Active Page Options', 'yit'), 'desc' => '', 'type' => 'checkbox', 'std' => '0'), 'sidebars' => array('label' => __('Sidebar', 'yit'), 'type' => 'sidebars', 'std' => ''))), 'post-formats' => array('label' => __('Post Formats', 'yit'), 'fields' => array('audio-url' => array('label' => __('Audio URL', 'yit'), 'desc' => __('Insert the <a target="_blank" href="http://soundcloud.com/">SoundCloud.com</a> song URL.', 'yit'), 'type' => 'text', 'std' => ''), 'audio-iframe' => array('label' => __('Use iFrame', 'yit'), 'desc' => __('Use iFrame instead of Flash.', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'audio-comments' => array('label' => __('Show Comments', 'yit'), 'desc' => __('Show comments of the song.', 'yit'), 'type' => 'onoff', 'std' => 'no', 'deps' => array('ids' => '_audio-iframe', 'values' => 'yes')), 'audio-color' => array('label' => __('Color', 'yit'), 'desc' => __('Template color.', 'yit'), 'type' => 'colorpicker', 'std' => '#fab000', 'deps' => array('ids' => '_audio-iframe', 'values' => 'no')), 'sep1' => array('type' => 'sep'), 'video-id' => array('label' => __('Video ID', 'yit'), 'desc' => __('Insert the video ID.', 'yit'), 'type' => 'text', 'std' => ''), 'video-host' => array('label' => __('Video host', 'yit'), 'desc' => __('Select where is the video hosted.', 'yit'), 'type' => 'select', 'options' => array('youtube' => __('Youtube', 'yit'), 'vimeo' => __('Vimeo', 'yit')), 'std' => '')))));
$metabox2 = YIT_Metabox('yit-post-setting');
$metabox2->init($args2);
$args3 = array('id' => 'yit-product-setting', 'label' => __('Product Page Settings', 'yit'), 'pages' => 'product', 'context' => 'normal', 'priority' => 'high', 'tabs' => array('settings' => array('label' => __('Tabs', 'yit'), 'fields' => array('modal_window' => array('label' => __('Show modal window', 'yit'), 'desc' => __('Set YES if you want a modal window link in your product', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'modal_window_text' => array('label' => __('Modal window link text', 'yit'), 'desc' => __('Set the modal window link text', 'yit'), 'type' => 'text', 'std' => __('VIEW MODAL WINDOW', 'yit'), 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'modal_window_icon' => array('label' => __('Modal window link icon', 'yit'), 'desc' => __('Select the icon for modal window. Note: Custom icon size will be scaled to 25x25', 'yit'), 'type' => 'select-icon', 'options' => array('select' => array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit')), 'icon' => YIT_Plugin_Common::get_awesome_icons()), 'std' => array('select' => 'icon', 'icon' => '', 'custom' => ''), 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'modal_window_title' => array('label' => __('Modal window title', 'yit'), 'desc' => __('Set title for modal window', 'yit'), 'type' => 'text', 'std' => __('Modal Window', 'yit'), 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'modal_window_img' => array('label' => __('Modal window image', 'yit'), 'desc' => __('Select the image content of modal window', 'yit'), 'type' => 'upload', 'std' => '', 'deps' => array('ids' => '_modal_window', 'values' => 'yes')), 'custom_tab' => array('label' => __('Tabs', 'yit'), 'desc' => __('Insert a custom tab.', 'yit'), 'type' => 'customtabs'), 'add_extra_content' => array('label' => __('Add Extra Content', 'yit'), 'desc' => __('Add extra content to product page', 'yit'), 'type' => 'onoff', 'std' => 'no'), 'extra_content' => array('desc' => __('Add extra content to product page', 'yit'), 'type' => 'textarea-editor', 'deps' => array('ids' => '_add_extra_content', 'values' => 'yes'))))));
$metabox3 = YIT_Metabox('yit-product-setting');
$metabox3->init($args3);
コード例 #12
0
 function yit_newsletter_shortcode_options($options, $opt)
 {
     $options['newsletter_cta'] = array('title' => __('Call to action newsletter', 'yit'), 'description' => __('Show a message with newsletter subscription', 'yit'), 'tab' => 'shortcodes', 'create' => false, 'in_visual_composer' => true, 'has_content' => false, 'attributes' => array('title' => array('title' => __('Title', 'yit'), 'type' => 'text', 'std' => ''), 'title_size' => array('title' => __('Title size', 'yit'), 'type' => 'number', 'min' => 10, 'max' => 99, 'std' => 18), 'title_color' => array('title' => __('Title color', 'yit'), 'type' => 'colorpicker', 'std' => '#383838'), 'incipit' => array('title' => __('Incipit', 'yit'), 'type' => 'text', 'std' => ''), 'incipit_size' => array('title' => __('Incipit size', 'yit'), 'type' => 'number', 'min' => 10, 'max' => 99, 'std' => 14), 'incipit_color' => array('title' => __('Incipit color', 'yit'), 'type' => 'colorpicker', 'std' => '#5b5a5a'), 'post_name' => array('title' => __('Newsletter Form', 'yit'), 'type' => 'select', 'options' => $opt, 'std' => ''), 'icon_form' => array('title' => __('Newsletter Form Icon', 'yit'), 'type' => 'select', 'options' => YIT_Plugin_Common::get_awesome_icons(), 'std' => 'f003'), 'button_class' => array('title' => __('Form Button Class', 'yit'), 'type' => 'select', 'options' => array('btn-ghost' => __('Ghost', 'yit'), 'btn-flat-red' => __('Flat Red', 'yit'), 'btn-flat-orange' => __('Flat Orange', 'yit')), 'std' => 'btn-flat-orange')));
     return $options;
 }