コード例 #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
 function ypop_get_icon_data($icon)
 {
     $icon_list = YIT_Plugin_Common::get_icon_list();
     $icon_data = '';
     if ($icon != '') {
         $ic = explode(':', $icon);
         if (count($ic) < 2) {
             return $icon_data;
         }
         $icon_code = array_search($ic[1], $icon_list[$ic[0]]);
         if ($icon_code) {
             $icon_code = strpos($icon_code, '\\') === 0 ? '&#x' . substr($icon_code, 1) . ';' : $icon_code;
         }
         $icon_data = 'data-font="' . esc_attr($ic[0]) . '" data-name="' . esc_attr($icon_code) . '" data-key="' . esc_attr($ic[1]) . '" data-icon="' . $icon_code . '"';
     }
     return $icon_data;
 }
コード例 #3
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));
コード例 #4
0
ファイル: functions.php プロジェクト: lieison/IndustriasFenix
 function yit_get_animate_effects()
 {
     $config = YIT_Plugin_Common::load();
     return $config['animate'];
 }
コード例 #5
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;
 }
コード例 #6
0
                <label for="yit_mailchimp_newsletter_form_email"><?php 
    _e('Email', 'yit');
    ?>
</label>
                <?php 
}
?>
                <div class="newsletter_form_email">
                    <input type="text" <?php 
echo $shortcode == 'newsletter_cta' ? 'placeholder="' . __('Email', 'yit') . '"' : '';
?>
 name="yit_mailchimp_newsletter_form_email" id="yit_mailchimp_newsletter_form_email" class="email-field text-field autoclear" />
                     <?php 
if (isset($icon_form) && $icon_form != '-1') {
    if (strpos($icon_form, ':')) {
        $icon_data = YIT_Plugin_Common::get_icon($icon_form);
        $icon = '<span class="mail-icon-' . $sc_type . '" ' . $icon_data . '></span>';
    } else {
        $icon = '<span class="fa fa-' . $icon_form . ' mail-icon-' . $sc_type . '"></span>';
        $icon .= '<style>.mail-icon-' . $sc_type . ':before { content: "\\' . $icon_form . '"; }</style>';
    }
    echo $icon;
}
?>
                </div>

            </li>
            <li>
                <input type="hidden" name="yit_mailchimp_newsletter_form_id" value="<?php 
echo $post_id;
?>
コード例 #7
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 
    }
コード例 #8
0
 *
 * 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
 */
/**
 * Template file for show a list with bullet
 *
 * @package Yithemes
 * @author  Francesco Licandro <*****@*****.**>
 * @since   1.0.0
 */
$content = str_replace('<ul>', '', $content);
$content = str_replace('</ul>', '', $content);
$code = YIT_Plugin_Common::get_awesome_icons_code_by_value($icon);
$id_link = "list_bullet" . $index;
$animate_data = $animate != '' ? 'data-animate="' . $animate . '"' : '';
$animate_data .= $animation_delay != '' ? ' data-delay="' . $animation_delay . '"' : '';
$animate = $animate != '' ? ' yit_animate ' . $animate : '';
?>

<?php 
if (isset($code) && $code) {
    ?>
    <style>
        ul#<?php 
    echo $id_link;
    ?>
 li:before {
            content: '\<?php 
コード例 #9
0
ファイル: icon-list.php プロジェクト: lieison/IndustriasFenix
 * 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
 */
/**
 * Icon Manager
 *
 * @package    Yithemes
 * @author     Emanuela Castorina <*****@*****.**>
 * @since      1.0.0
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$icon_list = YIT_Plugin_Common::get_icon_list();
?>
<div class="fieldset" id="<?php 
echo $var[0] . '-' . $var[2];
?>
-container" <?php 
if (isset($var[1]['deps'])) {
    ?>
data-field="<?php 
    echo $var[0] . '-' . $var[2];
    ?>
" data-dep="<?php 
    echo $var[1]['deps']['ids'] . '-' . $var[2];
    ?>
" data-value="<?php 
    echo $var[1]['deps']['values'];
コード例 #10
0
ファイル: icon.php プロジェクト: lieison/IndustriasFenix
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$icon_data = '';
$icon = '';
$icon_type = $icon_type == '' ? 'theme-icon' : $icon_type;
if ($icon_type == 'theme-icon') {
    $color_property = $color == '' ? '' : 'color:' . $color . ';';
    $border_color = $color == '' ? '' : 'border-color:' . $color . ';';
    $icon_size = $icon_size == '' ? '60' : $icon_size;
    $circle = $circle == 'no' ? false : true;
    if (isset($icon_theme) && $icon_theme != '') {
        if (strpos($icon_theme, ':')) {
            $icon_data = YIT_Plugin_Common::get_icon($icon_theme);
            $icon = '<i ' . $icon_data . ' style="' . $color_property . ' font-size: ' . $icon_size . 'px"></i>';
        } else {
            $icon = '<i class="fa fa-' . $icon_theme . '" style="' . $color_property . ' font-size: ' . $icon_size . 'px"></i>';
        }
    }
    ?>
    <?php 
    if ($circle) {
        ?>
    <span class="icon-circle" style="width:<?php 
        echo $circle_size;
        ?>
px; height:<?php 
        echo $circle_size;
        ?>
コード例 #11
0
 /**
  * Add new icon style
  *
  * @since  2.0.0
  * @author Andrea Grillo <*****@*****.**>
  */
 function yit_change_newsletter_cta_default_args($shortcodes)
 {
     if (function_exists('YIT_Newsletter') && isset($shortcodes['newsletter_cta']['attributes']['icon_form'])) {
         $shortcodes['newsletter_cta']['attributes']['icon_form'] = array('title' => __('Newsletter Form Icon', 'yit'), 'type' => 'icon-list', 'options' => YIT_Plugin_Common::get_icon_list(), 'std' => '');
     }
     return $shortcodes;
 }
コード例 #12
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
        }
コード例 #13
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);
コード例 #14
0
    /**
     * Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0)
     *
     * @see    Walker::start_el()
     * @since  1.0.0
     *
     * @param string       $output            Passed by reference. Used to append additional content.
     * @param object       $item              Menu item data object.
     * @param int          $depth             Depth of menu item. Used for padding. (Default = 0)
     * @param array|object $args              An argument array
     * @param int          $current_object_id The id of current object. Default = 0)
     *
     * @return void
     * @author Simone D'Amico <*****@*****.**>
     */
    function start_el(&$output, $item, $depth = 0, $args = array(), $current_object_id = 0)
    {
        global $_wp_nav_menu_max_depth;
        $_wp_nav_menu_max_depth = $depth > $_wp_nav_menu_max_depth ? $depth : $_wp_nav_menu_max_depth;
        $indent = $depth ? str_repeat("\t", $depth) : '';
        ob_start();
        $item_id = esc_attr($item->ID);
        $removed_args = array('action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce');
        $original_title = '';
        if ('taxonomy' == $item->type) {
            $original_title = get_term_field('name', $item->object_id, $item->object, 'raw');
            if (is_wp_error($original_title)) {
                $original_title = false;
            }
        } elseif ('post_type' == $item->type) {
            $original_object = get_post($item->object_id);
            $original_title = $original_object->post_title;
        }
        $classes = array('menu-item menu-item-depth-' . $depth, 'menu-item-' . esc_attr($item->object), 'menu-item-edit-' . ($item_id == YIT_Request()->get('edit-menu-item') ? 'active' : 'inactive'));
        $title = $item->title;
        if (!empty($item->_invalid)) {
            $classes[] = 'menu-item-invalid';
            /* translators: %s: title of menu item which is invalid */
            $title = sprintf(__('%s (Invalid)', 'yit'), $item->title);
        } elseif (isset($item->post_status) && 'draft' == $item->post_status) {
            $classes[] = 'pending';
            /* translators: %s: title of menu item in draft status */
            $title = sprintf(__('%s (Pending)', 'yit'), $item->title);
        }
        $title = empty($item->label) ? $title : $item->label;
        // $awesome = YIT_Plugin_Common::get_awesome_icons();
        $icon_list = YIT_Plugin_Common::get_icon_list();
        ?>
    <li id="menu-item-<?php 
        echo $item_id;
        ?>
" class="<?php 
        echo implode(' ', $classes);
        ?>
">
        <dl class="menu-item-bar">
            <dt class="menu-item-handle">
                <span class="item-title"><?php 
        echo esc_html($title);
        ?>
</span>
					<span class="item-controls">
						<span class="item-type"><?php 
        echo esc_html($item->type_label);
        ?>
</span>
						<span class="item-order hide-if-js">
							<a href="<?php 
        echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'move-up-menu-item', 'menu-item' => $item_id), remove_query_arg($removed_args, admin_url('nav-menus.php'))), 'move-menu_item'));
        ?>
" class="item-move-up"><abbr title="<?php 
        esc_attr_e('Move up');
        ?>
">&#8593;</abbr></a>
							|
							<a href="<?php 
        echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'move-down-menu-item', 'menu-item' => $item_id), remove_query_arg($removed_args, admin_url('nav-menus.php'))), 'move-menu_item'));
        ?>
" class="item-move-down"><abbr title="<?php 
        esc_attr_e('Move down');
        ?>
">&#8595;</abbr></a>
						</span>
						<a class="item-edit" id="edit-<?php 
        echo $item_id;
        ?>
" title="<?php 
        esc_attr_e('Edit Menu Item', 'yit');
        ?>
" href="<?php 
        echo $item_id == YIT_Request()->get('edit-menu-item') ? admin_url('nav-menus.php') : esc_url(add_query_arg('edit-menu-item', $item_id, remove_query_arg($removed_args, admin_url('nav-menus.php#menu-item-settings-' . $item_id))));
        ?>
"><?php 
        _e('Edit Menu Item', 'yit');
        ?>
</a>
					</span>
            </dt>
        </dl>

        <div class="menu-item-settings" id="menu-item-settings-<?php 
        echo $item_id;
        ?>
">
            <?php 
        if ('custom' == $item->type) {
            ?>
                <p class="field-url description description-wide">
                    <label for="edit-menu-item-url-<?php 
            echo $item_id;
            ?>
">
                        <?php 
            _e('URL', 'yit');
            ?>
<br />
                        <input type="text" id="edit-menu-item-url-<?php 
            echo $item_id;
            ?>
" class="widefat code edit-menu-item-url" name="menu-item-url[<?php 
            echo $item_id;
            ?>
]" value="<?php 
            echo esc_attr($item->url);
            ?>
" />
                    </label>
                </p>
            <?php 
        }
        ?>
            <p class="description description-thin">
                <label for="edit-menu-item-title-<?php 
        echo $item_id;
        ?>
">
                    <?php 
        _e('Navigation Label', 'yit');
        ?>
<br />
                    <input type="text" id="edit-menu-item-title-<?php 
        echo $item_id;
        ?>
" class="widefat edit-menu-item-title" name="menu-item-title[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->title);
        ?>
" />
                </label>
            </p>
            <p class="description description-thin">
                <label for="edit-menu-item-attr-title-<?php 
        echo $item_id;
        ?>
">
                    <?php 
        _e('Title Attribute', 'yit');
        ?>
<br />
                    <input type="text" id="edit-menu-item-attr-title-<?php 
        echo $item_id;
        ?>
" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->post_excerpt);
        ?>
" />
                </label>
            </p>
            <p class="field-link-target description">
                <label for="edit-menu-item-target-<?php 
        echo $item_id;
        ?>
">
                    <input type="checkbox" id="edit-menu-item-target-<?php 
        echo $item_id;
        ?>
" value="_blank" name="menu-item-target[<?php 
        echo $item_id;
        ?>
]"<?php 
        checked($item->target, '_blank');
        ?>
 />
                    <?php 
        _e('Open link in a new window/tab', 'yit');
        ?>
                </label>
            </p>
            <p class="field-css-classes description description-thin">
                <label for="edit-menu-item-classes-<?php 
        echo $item_id;
        ?>
">
                    <?php 
        _e('CSS Classes (optional)', 'yit');
        ?>
<br />
                    <input type="text" id="edit-menu-item-classes-<?php 
        echo $item_id;
        ?>
" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr(implode(' ', $item->classes));
        ?>
" />
                </label>
            </p>

            <p class="field-xfn description description-thin">
                <label for="edit-menu-item-xfn-<?php 
        echo $item_id;
        ?>
">
                    <?php 
        _e('Link Relationship (XFN)', 'yit');
        ?>
<br />
                    <input type="text" id="edit-menu-item-xfn-<?php 
        echo $item_id;
        ?>
" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->xfn);
        ?>
" />
                </label>
            </p>
            <p class="field-description description description-wide">
                <label for="edit-menu-item-description-<?php 
        echo $item_id;
        ?>
">
                    <?php 
        _e('Description', 'yit');
        ?>
<br />
                    <textarea id="edit-menu-item-description-<?php 
        echo $item_id;
        ?>
" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php 
        echo $item_id;
        ?>
]"><?php 
        echo esc_html($item->description);
        // textarea_escaped
        ?>
</textarea>
                    <span class="description"><?php 
        _e('The description will be displayed in the menu if the current theme supports it.', 'yit');
        ?>
</span>
                </label>
            </p>



            <!-- custom code -->
            <?php 
        $custom_fields = YIT_Registry::get_instance()->{'navmenu'}->fields;
        ?>
            <?php 
        if (!empty($custom_fields)) {
            ?>


                <div class="clear"></div>
                <p style="margin-top: 20px"><strong><?php 
            _e('Customize menu', 'yit');
            ?>
</strong></p>


                <?php 
            foreach ($custom_fields as $id => $field) {
                ?>
                    <p class="description description-<?php 
                echo $field['width'];
                ?>
">
                        <label for="edit-menu-item-<?php 
                echo $id;
                ?>
-<?php 
                echo $item_id;
                ?>
">
                            <?php 
                _e($field['label'], 'yit');
                ?>

                            <?php 
                if ($field['type'] == 'input') {
                    ?>
                                <input type="text" id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
" class="widefat code" name="menu-item-<?php 
                    echo $id;
                    ?>
[<?php 
                    echo $item_id;
                    ?>
]" value="<?php 
                    if (isset($item->{$id})) {
                        echo esc_attr($item->{$id});
                    }
                    ?>
" />
                            <?php 
                } elseif ($field['type'] == 'textarea') {
                    ?>
                                <textarea id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
" class="widefat" rows="3" cols="20" name="menu-item-<?php 
                    echo $id;
                    ?>
[<?php 
                    echo $item_id;
                    ?>
]"><?php 
                    if (isset($item->{$id})) {
                        echo esc_html($item->{$id});
                    }
                    // textarea_escaped
                    ?>
</textarea>
                                <span class="description"><?php 
                    _e($field['description'], 'yit');
                    ?>
</span>
                            <?php 
                } elseif ($field['type'] == 'text') {
                    ?>
                                <input type="text" id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
" name="menu-item-<?php 
                    echo $id;
                    ?>
[<?php 
                    echo $item_id;
                    ?>
]"   class="widefat code" value="<?php 
                    if (isset($item->{$id})) {
                        echo esc_html(trim($item->{$id}));
                    }
                    ?>
"/>
                                <span class="description"><?php 
                    _e($field['description'], 'yit');
                    ?>
</span>
                            <?php 
                } elseif ($field['type'] == 'select-icon') {
                    ?>
                                <div class="icon-manager-wrapper">
                                    <div class="icon-manager-text">
                                        <div class="icon-preview"></div>
                                        <input type="text" id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
" class="icon-text" data-sfx="icon" name="menu-item-<?php 
                    echo $id;
                    ?>
[<?php 
                    echo $item_id;
                    ?>
]" value="<?php 
                    if (isset($item->{$id})) {
                        echo esc_attr($item->{$id});
                    }
                    ?>
" />
                                    </div>
                                    <div class="icon-manager">
                                        <ul id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
" class="icon-list-wrapper" >
                                            <?php 
                    foreach ($icon_list as $font => $icons) {
                        foreach ($icons as $key => $icon) {
                            ?>
                                                    <li data-font="<?php 
                            echo esc_attr($font);
                            ?>
" data-icon="<?php 
                            echo strpos($key, '\\') === 0 ? '&#x' . substr($key, 1) : $key;
                            ?>
" data-key="<?php 
                            echo esc_attr($key);
                            ?>
" data-name="<?php 
                            echo esc_attr($icon);
                            ?>
" value="<?php 
                            echo $font . ':' . $icon;
                            ?>
" <?php 
                            echo selected($item->{$id}, $font . ':' . $icon);
                            ?>
></li>
                                                <?php 
                        }
                    }
                    ?>
                                        </ul>
                                    </div>
                                </div>
                            <?php 
                } elseif ($field['type'] == 'upload') {
                    ?>
                                <input type="text" id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
" class="widefat code menu-custom-field menu-custom-field-upload"  data-sfx="background" value="<?php 
                    if (isset($item->{$id})) {
                        echo esc_attr($item->{$id});
                    }
                    ?>
" />
                                <input type="button" value="<?php 
                    _e('Upload', 'yit');
                    ?>
" id="edit-menu-item-<?php 
                    echo $id;
                    ?>
-<?php 
                    echo $item_id;
                    ?>
-button" class="upload_button button" />
                            <?php 
                }
                ?>
                        </label>
                    </p>
                <?php 
            }
            ?>
            <?php 
        }
        ?>
            <!-- /custom code -->



            <div class="menu-item-actions description-wide submitbox">
                <?php 
        if ('custom' != $item->type && $original_title !== false) {
            ?>
                    <p class="link-to-original">
                        <?php 
            printf(__('Original: %s', 'yit'), '<a href="' . esc_attr($item->url) . '">' . esc_html($original_title) . '</a>');
            ?>
                    </p>
                <?php 
        }
        ?>
                <a class="item-delete submitdelete deletion" id="delete-<?php 
        echo $item_id;
        ?>
" href="<?php 
        echo esc_url(wp_nonce_url(add_query_arg(array('action' => 'delete-menu-item', 'menu-item' => $item_id), remove_query_arg($removed_args, admin_url('nav-menus.php'))), 'delete-menu_item_' . $item_id));
        ?>
"><?php 
        _e('Remove', 'yit');
        ?>
</a> <span class="meta-sep"> | </span> <a class="item-cancel submitcancel" id="cancel-<?php 
        echo $item_id;
        ?>
" href="<?php 
        echo esc_url(add_query_arg(array('edit-menu-item' => $item_id, 'cancel' => time()), remove_query_arg($removed_args, admin_url('nav-menus.php'))));
        ?>
#menu-item-settings-<?php 
        echo $item_id;
        ?>
"><?php 
        _e('Cancel', 'yit');
        ?>
</a>
            </div>

            <input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item_id);
        ?>
" />
            <input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->object_id);
        ?>
" />
            <input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->object);
        ?>
" />
            <input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->menu_item_parent);
        ?>
" />
            <input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->menu_order);
        ?>
" />
            <input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php 
        echo $item_id;
        ?>
]" value="<?php 
        echo esc_attr($item->type);
        ?>
" />
        </div><!-- .menu-item-settings-->
        <ul class="menu-item-transport"></ul>
        <?php 
        $output .= ob_get_clean();
    }
コード例 #15
0
 /**
  * Shortcode list for services
  *
  * Return shortcode list for services
  *
  * @return array()
  * @since 1.0.0
  * @author Antonio La Rocca <*****@*****.**>
  */
 public function service_shortcode_list()
 {
     $assets = YIT_Plugin_Common::load();
     $animate = $assets['animate'];
     return array('services' => array('title' => __('Services', 'yit'), 'description' => __('Print a services type.', 'yit'), 'tab' => 'section', 'create' => false, 'in_visual_composer' => true, 'has_content' => false, 'attributes' => array('title' => array('title' => __('Title', 'yit'), 'type' => 'text', 'std' => ''), 'description' => array('title' => __('Description', 'yit'), 'type' => 'text', 'std' => ''), 'items' => array('title' => __('Select services', 'yit'), 'type' => 'select', 'multiple' => true, 'options' => $this->yit_get_services(), 'std' => serialize(array())), 'show_excerpt' => array('title' => __('Show excerpt', 'yit'), 'type' => 'checkbox', 'std' => 'yes'), 'excerpt_length' => array('title' => __('Limit words', 'yit'), 'type' => 'number', 'std' => 10), 'show_title' => array('title' => 'Show title', 'type' => 'checkbox', 'std' => 'yes'), 'show_border' => array('title' => __('Show border animation', 'yit'), 'type' => 'checkbox', 'std' => 'yes'), 'items_per_row' => array('title' => __('Items per row', 'yit'), 'type' => 'select', 'options' => array('2' => __('2 items', 'yit'), '3' => __('3 items', 'yit'), '4' => __('4 items', 'yit'), '6' => __('6 items', 'yit')), 'std' => '4'), 'show_services_button' => array('title' => __('Show button', 'yit'), 'type' => 'checkbox', 'std' => 'yes'), 'services_button_text' => array('title' => __('Button text', 'yit'), 'type' => 'text', 'std' => __('Read More', 'yit')), 'services_icon_title' => array('title' => __('Title icon url', 'yit'), 'type' => 'text', 'std' => ''), 'animate' => array('title' => __('Animation', 'yit'), 'type' => 'select', 'options' => $animate, 'std' => ''), 'animation_delay' => array('title' => __('Animation Delay', 'yit'), 'type' => 'text', 'desc' => __('This value determines the delay to which the animation starts once it\'s visible on the screen.', 'yit'), 'std' => '0'))));
 }
コード例 #16
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 === */
    'box_section' => array(
コード例 #17
0
 * This file belongs to the YIT Plugin 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('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$no_form_plugin = '';
$inquiry_form = '';
$yit_contact_form = '';
$contact_form_7 = '';
$active_plugins = array('none' => __('None', 'ywctm'));
if (function_exists('YIT_Contact_Form')) {
    $active_plugins['yit-contact-form'] = __('YIT Contact Form', 'ywctm');
}
if (function_exists('wpcf7_contact_form')) {
    $active_plugins['contact-form-7'] = __('Contact Form 7', 'ywctm');
}
if (function_exists('YIT_Contact_Form') || function_exists('wpcf7_contact_form')) {
    $inquiry_form = array('name' => __('Inquiry form', 'ywctm'), 'type' => 'select', 'desc' => __('Choose one among activated plugins to display an inquiry form in product page', 'ywctm'), 'options' => $active_plugins, 'default' => 'none', 'id' => 'ywctm_inquiry_form_type');
    $yit_contact_form = array('name' => '', 'type' => 'select', 'desc' => __('Choose the form to display', 'ywctm'), 'options' => apply_filters('yit_get_contact_forms', array()), 'id' => 'ywctm_inquiry_yit_contact_form_id', 'class' => 'yit-contact-form');
    $contact_form_7 = array('name' => '', 'type' => 'select', 'desc' => __('Choose the form to display', 'ywctm'), 'options' => apply_filters('wpcf7_get_contact_forms', array()), 'id' => 'ywctm_inquiry_contact_form_7_id', 'class' => 'contact-form-7');
} else {
    $no_form_plugin = __('To use this feature, YIT Contact Form or Contact Form 7 must be installed and activated.', 'ywctm');
}
return array('premium' => array('catalog_mode_premium_section_title_price' => array('name' => __('Product Price', 'ywctm'), 'type' => 'title', 'desc' => '', 'id' => 'ywctm_premium_title_price'), 'catalog_mode_premium_hide_price' => array('name' => __('Product Price', 'ywctm'), 'type' => 'checkbox', 'desc' => __('Hide', 'ywctm'), 'id' => 'ywctm_hide_price', 'default' => 'no', 'checkboxgroup' => 'start'), 'catalog_mode_premium_exclude_products' => array('name' => '', 'type' => 'checkbox', 'desc' => __('Exclude selected products (See "Exclusions" tab)', 'ywctm'), 'id' => 'ywctm_exclude_hide_price', 'default' => 'no', 'checkboxgroup' => ''), 'catalog_mode_premium_exclude_products_reverse' => array('name' => '', 'type' => 'checkbox', 'desc' => __('Reverse Exclusion List (Restrict Catalog Mode to selected items only)', 'ywctm'), 'id' => 'ywctm_exclude_hide_price_reverse', 'default' => 'no', 'checkboxgroup' => 'end'), 'catalog_mode_premium_price_alternative_text' => array('name' => __('Alternative text', 'ywctm'), 'type' => 'text', 'desc' => __('This text will replace price (Optional)', 'ywctm'), 'id' => 'ywctm_exclude_price_alternative_text', 'default' => ''), 'catalog_mode_premium_hide_price_users' => array('name' => __('Target users', 'ywctm'), 'type' => 'select', 'desc' => __('Users who will not see the price and the add to cart button', 'ywctm'), 'options' => array('all' => __('All users', 'ywctm'), 'unregistered' => __('Unregistered users only', 'ywctm')), 'default' => 'all', 'id' => 'ywctm_hide_price_users'), 'catalog_mode_premium_section_end_price' => array('type' => 'sectionend', 'id' => 'ywctm_premium_end_price'), 'catalog_mode_premium_section_title_form' => array('name' => __('Inquiry Form', 'ywctm'), 'type' => 'title', 'desc' => $no_form_plugin, 'id' => 'ywctm_premium_title_form'), 'catalog_mode_premium_inquiry_form' => $inquiry_form, 'catalog_mode_premium_yit_contact_form' => $yit_contact_form, 'catalog_mode_premium_contact_form_7' => $contact_form_7, 'catalog_mode_premium_section_end_form' => array('type' => 'sectionend', 'id' => 'ywctm_premium_end_form'), 'catalog_mode_premium_section_title_button' => array('name' => __('Custom Button', 'ywctm'), 'type' => 'title', 'desc' => '', 'id' => 'ywctm_premium_title_button'), 'catalog_mode_premium_enable_custom_button' => array('name' => __('Custom button', 'ywctm'), 'type' => 'checkbox', 'desc' => __('Show in product details page', 'ywctm'), 'id' => 'ywctm_custom_button', 'default' => 'no', 'checkboxgroup' => 'start'), 'catalog_mode_premium_enable_custom_button_loop' => array('name' => __('Custom button', 'ywctm'), 'type' => 'checkbox', 'desc' => __('Show in shop page', 'ywctm'), 'id' => 'ywctm_custom_button_loop', 'default' => 'no', 'checkboxgroup' => 'end'), 'catalog_mode_premium_custom_button_text' => array('name' => __('Button text', 'ywctm'), 'type' => 'text', 'desc' => '', 'id' => 'ywctm_button_text'), 'catalog_mode_premium_custom_button_color' => array('name' => __('Color', 'ywctm'), 'type' => 'color', 'desc' => __('Color of the text (Optional)', 'ywctm'), 'id' => 'ywctm_button_color'), 'catalog_mode_premium_custom_button_hover' => array('name' => __('Hover Color', 'ywctm'), 'type' => 'color', 'desc' => __('Color of the text on hover (Optional)', 'ywctm'), 'id' => 'ywctm_button_hover'), 'catalog_mode_premium_custom_button_icon' => array('name' => __('Icon', 'ywctm'), 'type' => 'icon', 'desc' => __('Show optional icon', 'ywctm'), 'options' => array('select' => array('none' => __('None', 'ywctm'), 'icon' => __('Theme Icon', 'ywctm'), 'custom' => __('Custom Icon', 'ywctm')), 'icon' => YIT_Plugin_Common::get_icon_list()), 'id' => 'ywctm_button_icon', 'default' => array('select' => 'none', 'icon' => 'retinaicon-font:retina-the-essentials-082', 'custom' => '')), 'catalog_mode_premium_custom_button_url_type' => array('name' => __('URL Protocol Type', 'ywctm'), 'type' => 'select', 'desc' => __('Specify the type of the URL (Optional)', 'ywctm'), 'options' => array('generic' => __('Generic URL', 'ywctm'), 'mailto' => __('E-mail address', 'ywctm'), 'tel' => __('Phone number', 'ywctm'), 'skype' => __('Skype contact', 'ywctm')), 'default' => 'generic', 'id' => 'ywctm_button_url_type'), 'catalog_mode_premium_custom_button_url' => array('name' => __('URL Link', 'ywctm'), 'type' => 'text', 'desc' => __('Specify the URL (Optional)', 'ywctm'), 'id' => 'ywctm_button_url', 'default' => ''), 'catalog_mode_premium_section_end_button' => array('type' => 'sectionend', 'id' => 'ywctm_premium_end_button'), 'catalog_mode_premium_section_title_review' => array('name' => __('Reviews', 'ywctm'), 'type' => 'title', 'desc' => '', 'id' => 'ywctm_premium_title_review'), 'catalog_mode_premium_disable_review' => array('name' => __('Product Reviews', 'ywctm'), 'type' => 'select', 'desc' => '', 'id' => 'ywctm_disable_review', 'default' => 'no', 'options' => array('no' => __('Enabled', 'ywctm'), 'all' => __('Disabled for all users', 'ywctm'), 'unregistered' => __('Disabled only for unregistered users', 'ywctm'))), 'catalog_mode_premium_section_end_review' => array('type' => 'sectionend', 'id' => 'ywctm_premium_end_review')));
コード例 #18
0
ファイル: shortcodes.php プロジェクト: jabue/wordpress
/**
 * Return the list of shortcodes and their settings
 *
 * @package Yithemes
 * @author  Francesco Licandro  <*****@*****.**>
 * @since   1.0.0
 */

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


$config          = YIT_Plugin_Common::load();
$awesome_icons   = YIT_Plugin_Common::get_awesome_icons();
$simple_line_icons   = yit_get_simple_line_icons();
$animate         = $config['animate'];

$shop_shortcodes = array ();

$theme_shortcodes = array(

    /* === BOX SECTION === */
    'box_section' => array(
        'title' => __('Icon box', 'yit' ),
        'description' =>  __('Shows a box, with Title and icons on left and a text of section (you can use HTML tags)', 'yit' ),
        'tab' => 'shortcodes',
        'in_visual_composer' => true,
        'has_content' => true,
        'attributes' => array(
コード例 #19
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>

コード例 #20
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')));
コード例 #21
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);
コード例 #22
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));
コード例 #23
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);
 }
コード例 #24
0
/**
 * Awesome Icon Admin View
 *
 * @package	Yithemes
 * @author Emanuela Castorina <*****@*****.**>
 * @since 1.0.0
 */
extract($args);
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$current_options = wp_parse_args($args['value'], $args['std']);
$current_icon = YIT_Icon()->get_icon_data($current_options['icon']);
$current_icon = YIT_Icon()->get_icon_data($std['icon']);
$options['icon'] = YIT_Plugin_Common::get_icon_list();
?>



<div id="<?php 
echo $id;
?>
-container" <?php 
if (isset($deps)) {
    ?>
data-field="<?php 
    echo $id;
    ?>
" data-dep="<?php 
    echo $deps['ids'];
コード例 #25
0
        function form($instance)
        {
            global $icons_name;
            $defaults = array('title' => '', 'phone' => '', 'icon_type' => 'icon', 'text' => '', 'class' => '');
            $icon_list = YIT_Plugin_Common::get_icon_list();
            $instance = wp_parse_args((array) $instance, $defaults);
            $current_icon = isset($instance['icon']) ? YIT_Icon()->get_icon_data($instance['icon']) : '';
            ?>

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

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

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

            <div class="widget-icon-manager">
                <div class="icon-manager-wrapper">
                    <label for="<?php 
            echo esc_attr($this->get_field_id('icon'));
            ?>
"><?php 
            _e('Icon', 'yit');
            ?>
</label>
                    <div class="icon-manager-text">
                        <div class="icon-preview" <?php 
            echo $current_icon;
            ?>
></div>
                        <input type="text" id="<?php 
            echo esc_attr($this->get_field_id('icon'));
            ?>
" class="icon-text" name="<?php 
            echo esc_attr($this->get_field_name('icon'));
            ?>
" value="<?php 
            echo esc_attr($instance['icon']);
            ?>
" />
                    </div>


                    <div class="icon-manager">
                        <ul class="icon-list-wrapper">
                            <?php 
            foreach ($icon_list as $font => $icons) {
                foreach ($icons as $key => $icon) {
                    ?>
                                    <li data-font="<?php 
                    echo $font;
                    ?>
" data-icon="<?php 
                    echo strpos($key, '\\') === 0 ? '&#x' . substr($key, 1) . ';' : $key;
                    ?>
" data-key="<?php 
                    echo $key;
                    ?>
" data-name="<?php 
                    echo $icon;
                    ?>
"></li>
                                <?php 
                }
            }
            ?>
                        </ul>
                    </div>
                </div>
            </div>

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

        <?php 
        }
コード例 #26
0
        function form($instance)
        {
            global $icons_name;
            /* Impostazioni di default del widget */
            $defaults = array('title' => '', 'icon_type' => 'icon', 'icon' => '', 'image' => '', 'align' => '', 'link' => '', 'text' => '', 'autop' => false);
            $icon_type_option_list = array('icon' => __('Theme Icon', 'yit'), 'custom' => __('Custom Icon', 'yit'), 'none' => __('None', 'yit'));
            $icon_list = YIT_Plugin_Common::get_icon_list();
            $instance = wp_parse_args((array) $instance, $defaults);
            $current_icon = YIT_Icon()->get_icon_data($instance['icon']);
            ?>

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

            <p class="widget_select_action">
                <label for="<?php 
            echo esc_attr($this->get_field_id('icon_type'));
            ?>
"><?php 
            _e('Icon Type', 'yit');
            ?>
</label>
                <select id="<?php 
            echo esc_attr($this->get_field_id('icon_type'));
            ?>
" name="<?php 
            echo esc_attr($this->get_field_name('icon_type'));
            ?>
" class="widget_icon_type">
                    <?php 
            foreach ($icon_type_option_list as $key => $type) {
                ?>
                        <option value="<?php 
                echo esc_attr($key);
                ?>
" <?php 
                selected($instance['icon_type'], $key);
                ?>
><?php 
                echo $type;
                ?>
</option>
                    <?php 
            }
            ?>
                </select>
                <span><?php 
            _e('Choose the type of icon', 'yit');
            ?>
</span>
            </p>

            <div class="widget-icon-manager">
                <div class="icon-manager-wrapper">
                    <label for="<?php 
            echo esc_attr($this->get_field_id('icon'));
            ?>
"><?php 
            _e('Icon', 'yit');
            ?>
</label>
                    <div class="icon-manager-text">
                        <div class="icon-preview" <?php 
            echo $current_icon;
            ?>
></div>
                        <input type="text" id="<?php 
            echo esc_attr($this->get_field_id('icon'));
            ?>
" class="icon-text" name="<?php 
            echo esc_attr($this->get_field_name('icon'));
            ?>
" value="<?php 
            echo esc_attr($instance['icon']);
            ?>
" />
                    </div>


                    <div class="icon-manager">
                        <ul class="icon-list-wrapper">
                            <?php 
            foreach ($icon_list as $font => $icons) {
                foreach ($icons as $key => $icon) {
                    ?>
                                    <li data-font="<?php 
                    echo esc_attr($font);
                    ?>
" data-icon="<?php 
                    echo strpos($key, '\\') === 0 ? '&#x' . substr($key, 1) . ';' : $key;
                    ?>
" data-key="<?php 
                    echo esc_attr($key);
                    ?>
" data-name="<?php 
                    echo esc_attr($icon);
                    ?>
"></li>
                                <?php 
                }
            }
            ?>
                        </ul>
                    </div>
                </div>
            </div>


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

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

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

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

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

        <?php 
        }