/**
  * add_tab_metabox
  * Register metabox for product sldier
  * @author Yithemes
  * @since 1.0.0
  */
 public function add_tab_metabox()
 {
     $args = (include_once YWCPS_INC . '/metaboxes/product_slider-metabox.php');
     if (!function_exists('YIT_Metabox')) {
         require_once 'plugin-fw/yit-plugin.php';
     }
     $metabox = YIT_Metabox('yit-product-slider-setting');
     $metabox->init($args);
 }
 public function add_metabox()
 {
     $args = (require_once 'plugin-options/metabox/ywcm_metabox.php');
     if (!function_exists('YIT_Metabox')) {
         require_once 'plugin-fw/yit-plugin.php';
     }
     $metabox = YIT_Metabox('yit-cart-messages-info');
     $metabox->init($args);
 }
 public function add_metabox()
 {
     $post = isset($_REQUEST['post']) ? $_REQUEST['post'] : (isset($_REQUEST['post_ID']) ? $_REQUEST['post_ID'] : 0);
     $post = get_post($post);
     if ($post && $post->post_type == $this->post_type_name) {
         $args = (require_once 'plugin-options/metabox/ywcm_metabox.php');
         if (!function_exists('YIT_Metabox')) {
             require_once 'plugin-fw/yit-plugin.php';
         }
         $metabox = YIT_Metabox('yit-cart-messages-info');
         $metabox->init($args);
     }
 }
Example #4
0
 /**
  * Add field to metabox testimonial
  *
  */
 function yit_add_field_to_testimonial_meta()
 {
     $args = array('yit_testimonial_rating' => array('label' => __('Rating Star', 'yit'), 'desc' => __('Insert the rating', 'yit'), 'type' => 'number', 'min' => '1', 'max' => '5', 'std' => '0'));
     YIT_Metabox('yit-testimonial-info')->add_field('settings', $args, 'last');
 }
Example #5
0
    /**
     * Register Metaboxes options
     *
     * Add the metabox for the portfolio settings
     *
     * @return void
     * @since  1.0
     * @author Antonino Scarfi' <*****@*****.**>
     */
    public function add_metabox_item_fields() {
        global $pagenow, $post_type;

        // get the actual post type, to add the metabox only if necessary
        if ( $pagenow == 'post.php' && isset( $_REQUEST['post'] ) ) {
            $post_type = get_post_type( intval( $_REQUEST['post'] ) );
        }
        elseif( $pagenow == 'post.php' && isset( $_REQUEST['post_ID'] ) ){
            $post_type = get_post_type( intval( $_REQUEST['post_ID'] ) );
        }
        elseif ( $pagenow == 'post-new.php' && isset( $_REQUEST['post_type'] ) ) {
            $post_type = $_REQUEST['post_type'];
        } else {
            return;
        }

        $layout = get_post_meta( $this->_get_id_by_name( $post_type ), $this->_args['layout_option'], true );

        if ( empty( $this->layouts[ $layout ]['item_fields'] ) ) {
            return;
        }

        $metabox_args = array(
            'label'    => __( 'Settings', 'yith-plugin-fw' ),
            'pages'    => $post_type, //or array( 'post-type1', 'post-type2')
            'context'  => 'normal', //('normal', 'advanced', or 'side')
            'priority' => 'default',
            'tabs'     => array(
                'settings' => array(
                    'label'  => __( 'Settings', 'yith-plugin-fw' ),
                    'fields' => $this->layouts[ $layout ]['item_fields']
                )
            )
        );

        $metabox = YIT_Metabox( $post_type . '_item_fields' );
        $metabox->init( $metabox_args );

    }
Example #6
0
 /**
  * Add metabox to pages and post
  *
  * Add metabox to pages and posts to set seo
  *
  * @return void
  * @since  1.0
  * @author Francesco Licandro <*****@*****.**>
  */
 public function add_metabox()
 {
     $args = array('seo' => array('label' => __('SEO', 'yit'), 'fields' => array('seo_title' => array('label' => __('Page title', 'yit'), 'desc' => __('Page title for head "title" tag', 'yit'), 'type' => 'text', 'std' => ''), 'seo_description' => array('label' => __('Page description', 'yit'), 'desc' => __('Page description for description meta-tag', 'yit'), 'type' => 'textarea', 'std' => ''), 'seo_keywords' => array('label' => __('Page Keywords', 'yit'), 'desc' => __('Page keywords for keywords meta-tag', 'yit'), 'type' => 'text', 'std' => ''))));
     YIT_Metabox('yit-page-setting')->add_tab($args, 'after', 'settings');
     YIT_Metabox('yit-post-setting')->add_tab($args, 'after', 'settings');
 }
Example #7
0
function yit_add_inquiry_form_action()
{
    if (!function_exists('YIT_Contact_Form')) {
        return;
    }
    $args = array('info_form' => array('label' => __('Show ask info form?', 'yit'), 'desc' => __('Set YES if you want a tab with the "Ask Info" form. Set options in Theme Options->Shop->Single Product Page', 'yit'), 'type' => 'onoff', 'std' => 'no'));
    $meta_prod = YIT_Metabox('yit-product-setting');
    $meta_prod->add_field('settings', $args, 'before', 'modal_window');
    add_action('woocommerce_single_product_summary', 'yit_woocommerce_add_inquiry_form', 32);
}
Example #8
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
 */
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);
 /**
  * add_tab_metabox
  * Register metabox for global tab
  * @author Yithemes
  * @since 1.0.0
  */
 public function add_tab_metabox()
 {
     $args = (include_once YWTM_INC . '/metabox/tab-metabox.php');
     if (!function_exists('YIT_Metabox')) {
         require_once YWTM_DIR . 'plugin-fw/yit-plugin.php';
     }
     $metabox = YIT_Metabox('yit-tab-manager-setting');
     $metabox->init($args);
 }
Example #10
0
    /**
     * Add custom metabox in shop page admin
     *
     * @author Andrea Grillo <*****@*****.**>
     * @since 2.0.0
     * @return void
     */
    function yit_register_shop_metabox(){

        $post_id            = yit_admin_post_id();
        $my_account_page_id = wc_get_page_id( 'myaccount' );
        $checkout_page_id   = wc_get_page_id( 'checkout' );
        $cart_page_id       = wc_get_page_id( 'cart' );
        $metaboxes_file     = apply_filters( 'yit_extra_shop_metaboxes', YIT_THEME_PATH . '/shop-metabox.php' );
        $metaboxes          = include( $metaboxes_file );

        switch( $post_id ){

            case $my_account_page_id:
                YIT_Metabox( 'yit-page-setting' )->remove_fields( $metaboxes['remove'] );
                YIT_Metabox( 'yit-page-setting' )->add_field( 'settings', $metaboxes['myaccount'], 'last' );
                break;

            case $checkout_page_id:
            case $cart_page_id:
                YIT_Metabox( 'yit-page-setting' )->remove_fields( $metaboxes['remove'] );
                YIT_Metabox( 'yit-page-setting' )->add_field( 'settings', $metaboxes['checkout'], 'last' );
                break;
        }
    }
Example #11
0
 /**
  * Add metabox to pages and post
  *
  * Add metabox to pages and posts to set sitemap visibility
  *
  * @return void
  * @since  1.0
  * @author Antonio La Rocca <*****@*****.**>
  */
 public function add_metabox()
 {
     $args = array('sep-sitemap' => array('type' => 'sep'), 'sitemap_display' => array('label' => __('Display this page in the sitemap', 'yit'), 'desc' => __('Check if you want to show this page in the sitemap', 'yit'), 'type' => 'onoff', 'std' => 'yes'));
     YIT_Metabox('yit-page-setting')->add_field('settings', $args, 'last');
     YIT_Metabox('yit-post-setting')->add_field('settings', $args, 'last');
 }
Example #12
0
 /**
  * Add the metaboxes in the page settings of YIThemes themes and add the field in the layout plugin of YIT
  *
  * @return void
  * @since  1.0
  * @author Antonino Scarfì <*****@*****.**>
  */
 public function add_metaboxes()
 {
     $sliders = get_posts("post_type={$this->sliders_post_type}&posts_per_page=-1");
     $options = array('none' => __('None', 'yit'));
     foreach ($sliders as $slider) {
         $options[$slider->post_name] = $slider->post_title;
     }
     $field = array('slider_name' => array('label' => __('Slider', 'yit'), 'desc' => __('Select the slider to use in this page', 'yit'), 'type' => 'select', 'options' => $options, 'std' => ''));
     YIT_Metabox('yit-page-setting')->add_field('header', $field, 'first');
 }
 /**
  * Add metabox in popup page
  *
  * @since  1.0.0
  * @return void
  * @author Andrea Grillo <*****@*****.**>
  */
 public function add_metabox()
 {
     if (!function_exists('YIT_Metabox')) {
         require_once 'plugin-fw/yit-plugin.php';
     }
     $args = (require_once YITH_YPOP_DIR . '/plugin-options/metabox/ypop_template.php');
     $metabox_template = YIT_Metabox('yit-pop');
     $metabox_template->init($args);
     $args = (require_once YITH_YPOP_DIR . '/plugin-options/metabox/ypop_metabox.php');
     $metabox = YIT_Metabox('yit-pop-info');
     $metabox->init($args);
     $args = (require_once YITH_YPOP_DIR . '/plugin-options/metabox/ypop_cpt_metabox.php');
     $metabox = YIT_Metabox('yit-cpt-info');
     $metabox->init($args);
 }
 /**
  * Add metabox to testimonial custom post
  *
  * Add metabox to the custom post
  *
  * @return void
  * @since  1.0
  * @author Emanuela Castorina <*****@*****.**>
  */
 public function add_metabox()
 {
     $args = array('label' => __('Other Testimonial Info', 'yit'), 'pages' => $this->testimonial_post_type, 'context' => 'normal', 'priority' => 'default', 'tabs' => array('settings' => array('label' => __('Settings', 'yit'), 'fields' => apply_filters('yit_testimonial_metabox', array('yit_testimonial_social' => array('label' => __('Label', 'yit'), 'desc' => __('Insert the label used for testimonial if Website Url is set.', 'yit'), 'type' => 'text', 'std' => ''), 'yit_testimonial_website' => array('label' => __('Web Site Url', 'yit'), 'desc' => __('Insert the url referred to Testimonial', 'yit'), 'type' => 'text', 'std' => ''), 'yit_testimonial_small_quote' => array('label' => __('Small Quote', 'yit'), 'desc' => __('Insert the text to show with blockquote', 'yit'), 'type' => 'text', 'std' => ''))))));
     $metabox = YIT_Metabox('yit-testimonial-info');
     $metabox->init($args);
 }