<?php
/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <info@yithemes.com>
 *
 * 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
 */

 
/**
 * Add more shortcodes to the framework
 * 
 */
function yit_add_shortcodes( $shortcodes ) {
	/** Edit attributes in existing shortcodes */
    unset($shortcodes['section_blog']['attributes']['other_posts_label']);
    unset($shortcodes['section_blog']['attributes']['show_featured']);
    unset($shortcodes['section_blog']['attributes']['show_excerpt']);
    unset($shortcodes['section_blog']['attributes']['show_readmore']);

    unset($shortcodes['section_blog']['attributes']['excerpt_length']);
    unset($shortcodes['section_blog']['attributes']['readmore_text']);
    unset($shortcodes['section_blog']['attributes']['show_featured']);
    unset($shortcodes['section_services']['attributes']['show_detail_hover']);
	unset($shortcodes['section_services']['attributes']['show_title_hover']);
    unset($shortcodes['arrow']);
    unset($shortcodes['team']);

    /*$shortcodes['team']['attributes']['style'] = array(
        'title' => __('Style', 'yit'),
        'type' => 'select',
        'options' => array(
            'accordion' => __('Accordion', 'yit'),
            'rounded' => __('Round and Fade', 'yit')
        ),
        'std'  => 'accordion'
    );
	*/
	$shortcodes['section']['attributes']['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'
	);
	
	$shortcodes['section']['attributes']['show_services_button'] = array(
		'title' => __('Show Button', 'yit'),
		'type' => 'checkbox',
        'std' => 'yes'
	);
	
	$shortcodes['section']['attributes']['services_button_text'] = array(
		'title' => __('Button Text', 'yit'),
		'type' => 'text',
        'std' => 'Read More'
	);

    $shortcodes['section_services']['attributes']['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'
	);

	$shortcodes['section_services']['attributes']['show_services_button'] = array(
		'title' => __('Show Button', 'yit'),
		'type' => 'checkbox',
        'std' => 'yes'
	);

	$shortcodes['section_services']['attributes']['services_button_text'] = array(
		'title' => __('Button Text', 'yit'),
		'type' => 'text',
        'std' => 'Read More'
	);

    $shortcodes['section_services']['attributes']['services_icon_title'] = array(
        'title' => __( 'Title icon URL', 'yit' ),
        'type' => 'text',
        'desc' => __( 'Select the icon to use for the title.', 'yit' ),
        'std'  => ''
    );

    $shortcodes['section']['attributes']['services_icon_title'] = array(
        'title' => __( 'Title icon URL', 'yit' ),
        'type' => 'text',
        'desc' => __( 'Select the icon to use for the title.', 'yit' ),
        'std'  => ''
    );

	$shortcodes['section']['attributes']['portfolio_style'] = array(
        'title' => __('Style', 'yit'),
        'type' => 'select',
        'options' => array(
        '' => __('Select an option', 'yit'),
        'classic' => __('Classic', 'yit'),
            'pinterest' => __('Pinterest', 'yit'),
        ),
        'std'  => 'classic'
    );
	$shortcodes['section_portfolio']['attributes'] = array(
        'items' => array(
			'title' => __('N. of items', 'yit'),
            'description' => __('Show all with -1', 'yit'),
            'type' => 'number',
            'std' => '-1'
        ),
        'title' => array(
        	'title' => __('Title', 'yit'),
            'type' => 'text',
            'std' => ''
        ),
        'portfolio_icon_title' => array(
            'title' => __('Title icon URL', 'yit'),
            'type' => 'text',
            'desc' => __( 'Select the icon to use for the title.', 'yit' ),
            'std'  => ''
        ),
        'description' => array(
        	'title' => __('Description', 'yit'),
            'type' => 'text',
            'std' => ''
        ),
        'portfolio' => array(
        	'title' => __('Portfolio', 'yit'),
            'type' => 'select',
            'options' => yit_get_model('shortcodes')->get_portfolios(),
            'std' => ''
        ),
        'portfolio_style' => array(
            'title' => __('Style', 'yit'),
            'type' => 'select',
            'options' => array(
                ''          => __('Select an option', 'yit'),
                'classic'   => __('Classic', 'yit'),
                'pinterest' => __('Pinterest', 'yit')
            ),
            'std'  => 'classic'
        ),
 		'show_lightbox_hover' => array(
            'title' => __('Show lightbox hover', 'yit'),
            'type' => 'checkbox',
            'std' => 'no'
        )
    );

    $shortcodes['section']['attributes']['portfolio_icon_title'] = array(
        'title' => __('Title icon URL', 'yit'),
        'type' => 'text',
        'desc' => __( 'Select the icon to use for the title.', 'yit' ),
        'std'  => ''
    );

    $shortcodes['section']['attributes']['blog_icon_title'] = array(
        'title' => __('Title icon URL', 'yit'),
        'type' => 'text',
        'desc' => __( 'Select the icon to use for the title.', 'yit' ),
        'std'  => ''
    );
    $shortcodes['section_blog']['attributes']['blog_icon_title'] = array(
        'title' => __('Title icon URL', 'yit'),
        'type' => 'text',
        'desc' => __( 'Select the icon to use for the title.', 'yit' ),
        'std'  => ''
    );
    $shortcodes['section_blog']['attributes']['show_author'] = array(
        'title' => __('Show Author', 'yit'),
        'type' => 'checkbox',
        'std'  => 'yes'
    );
     $shortcodes['section']['attributes']['show_author'] = array(
        'title' => __('Show Author', 'yit'),
        'type' => 'checkbox',
        'std'  => 'yes'
    );

    $shortcodes['section']['attributes']['enable_slider'] =
    $shortcodes['section_blog']['attributes']['enable_slider'] = array(
        'title' => __('Enable Slider', 'yit'),
        'type' => 'checkbox',
        'std'  => 'yes'
    );

    $shortcodes['section']['attributes']['blog_show_hover'] = array(
        'title' => __('Enable hover', 'yit'),
        'type' => 'checkbox',
        'std'  => 'yes'
    );

	/** Adding Icon Type to share **/
	$shortcodes['share']['attributes']['icon_type'] = array(
				 		'title' => __('Icon Type', 'yit'),
						'type' => 'select',
						'options' => array(
							'' => __('Simple', 'yit'),
							'fade' => __('Round', 'yit'),
						),
						'std'  => ''
    );

	/** Adding button value in the [button] shortcode **/
    $shortcodes['button']['attributes']['color']['options']   = array_merge( array( 'white-button' => __( 'White Button', 'yit' ) ), $shortcodes['button']['attributes']['color']['options'] );
    $shortcodes['button']['attributes']['color']['options']   = array_merge( array( 'red-button' => __( 'Red Button', 'yit' ) ), $shortcodes['button']['attributes']['color']['options'] );
    $shortcodes['button']['attributes']['color']['options']   = array_merge( array( 'black-button' => __( 'Black Button', 'yit' ) ), $shortcodes['button']['attributes']['color']['options'] );

    $shortcodes['button']['attributes']['color']['options']   = array_merge( array( 'white-big-button' => __( 'White Big Button', 'yit' ) ), $shortcodes['button']['attributes']['color']['options'] );
    $shortcodes['button']['attributes']['color']['options']   = array_merge( array( 'black-big-button' => __( 'Black Big Button', 'yit' ) ), $shortcodes['button']['attributes']['color']['options'] );

    $shortcodes['call_two']['attributes']['color']['options'] = array_merge( array( 'button' => __( 'Default style', 'yit' ) ), $shortcodes['call_two']['attributes']['color']['options'] );

	$faq_categories = yit_get_faq_categories();
	$testimonial_categories = yit_get_testimonial_categories();
	
    return array_merge( $shortcodes, array(
		/* === TESTIMONIALS === */
		'testimonials' => array(
			'title' => __('Testimonials', 'yit' ),
			'description' => __('Show all post on testimonials post types', 'yit' ),
			'tab' => 'cpt',
            'has_content' => false,
			'attributes' => array(
				'items' => array(
					'title' => __('N. of items', 'yit'),
					'description' => __('Show all with -1', 'yit'),
            		'type' => 'number', 
					'std'  => '-1'
				),
				'cat' => array(
					'title' => __('Categories', 'yit'),
					'description' => __('Select the categories of posts to show', 'yit'),
            		'type' => 'select', 
            		'options' => $testimonial_categories,
					'std'  => ''
                )
			)
		),
		/* === TESTIMONIALS SLIDER === */
        'testimonials_slider' => array(
        	'title' => __('Testimonials slider', 'yit' ),
        	'description' =>  __('Show a slider with testimonials', 'yit' ),
        	'tab' => 'shortcodes',
            'has_content' => false,
        	'attributes' => array(
        		'items' => array(
        			'title' => __('N. of items', 'yit'),
        			'description' => __('Show all with -1', 'yit'),
            		'type' => 'number', 
        			'std'  => '-1'
        		),
        		'excerpt' => array(
        			'title' => __('Limit words', 'yit'),
            		'type' => 'number', 
        			'std'  => '32'
        		),
        		'speed' => array(
        			'title' => __('Speed (ms)', 'yit'),
            		'type' => 'number', 
        			'std'  => '500'
        		),
        		'timeout' => array(
        			'title' => __('Time out (ms)', 'yit'),
            		'type' => 'number', 
        			'std'  => '5000'
        		),
        		'cat' => array(
					'title' => __('Categories', 'yit'),
					'description' => __('Select the categories of posts to show', 'yit'),
            		'type' => 'select', 
            		'options' => $testimonial_categories,
					'std'  => ''
                ),
                'title' => array(
                    'title' => __('Slider Title', 'yit'),
                    'description' => __('Select the title of the slider', 'yit'),
                    'type' => 'text',
                    'std'  => 'Happy customers'
                ),
        	)
        ),
        /* === LOGOS SLIDER === */
        'logos_slider' => array(
        	'title' => __('Logos slider', 'yit' ),
        	'description' =>  __('Show a slider with logos', 'yit' ),
        	'tab' => 'cpt',
            'has_content' => false,
        	'attributes' => array(
        		'title' => array(
        			'title' => __('Title', 'yit'),
            		'type' => 'text', 
        			'std'  => ''
        		),
        		'items' => array(
        			'title' => __('N. of items', 'yit'),
            		'type' => 'number', 
        			'std'  => '-1'
        		),
				'height' => array(
						'title' => __('Height (px)', 'yit'),
						'type' => 'number', 
						'std'  => '50'
					),
				'speed' => array(
					'title' => __('Speed (ms)', 'yit'),
					'type' => 'number', 
					'std'  => '500'
				)
        	)
        ),
		/* === SOCIAL === */
        'social' => array(
            	'title' => __('Social', 'yit' ),
            	'description' =>  __('Print a simple icon link for social', 'yit' ),
            	'tab' => 'shortcodes',
            	'has_content' => false,
            	'attributes' => array(
            		'type' => array(
            			'title' => __('Type', 'yit'),
            			'type' => 'select', // facebook|twitter|rss|ecc
            			'options' => array(
							'facebook' => __('Facebook', 'yit'),
							'twitter' => __('Twitter', 'yit'),
							'rss' => __('RSS', 'yit'),
							'google' => __('Google Plus', 'yit'),
                            'pinterest' => __('Pinterest', 'yit'),
                            'instagram' => __('Instagram', 'yit'),
                            'bookmark' => __('Bookmark', 'yit'),
							'mail' => __('Mail', 'yit'),
                            'flickr' => __('Flickr', 'yit'),
                            'skype' => __('Skype', 'yit'),
                            'youtube' => __('Youtube', 'yit')
						),
            			'std'  => ''
            		),
            		'icon_type' => array(
            			'title' => __('Icon Type', 'yit'),
            			'type' => 'select',
            			'options' => array(
                            'default' => __('Default', 'yit'),
                            'round' => __('Round', 'yit'),
                            'simple-black' => __('Simple Black', 'yit'),
                            'simple-white' => __('Simple White', 'yit'),
						),
            			'std'  => 'default'
            		),
            		'size' => array(
            			'title' => __('Size', 'yit'),
            			'type' => 'select', // small|
            			'options' => array(
							'small' => __('Small', 'yit'),
							'' => __('Normal', 'yit')
						),
            			'std'  => ''
            		),
            		'href' => array(
            			'title' => __('URL', 'yit'),
            			'type' => 'text', 
            			'std'  => '#'
            		),
            		'target' => array(
            			'title' => __('Target', 'yit'),
            			'type' => 'select',
            			'options' => array(
							'' => __('Default', 'yit'),
							'_blank' => __('Blank', 'yit'),
							'_parent' => __('Parent', 'yit'),
							'_top' => __('Top', 'yit')						
						),
            			'std'  => ''
            		),
            		'title' => array(
            			'title' => __('Title', 'yit'),
            			'type' => 'text',
            			'std'  => ''
            		)
            	)
            ),
        /* === RANDOM NUMBERS === */
        'random_numbers' => array(
        	'title' => __('Random numbers', 'yit' ),
        	'description' =>  __('Show a icon with a block text', 'yit' ),
        	'tab' => 'shortcodes',
            'has_content' => false,
        	'attributes' => array(
        		'icon' => array(
        			'title' => __('Icon URL', 'yit'),
            		'type' => 'text', 
        			'std'  => ''
        		),
        		'text' => array(
        			'title' => __('Text', 'yit'),
            		'type' => 'text', 
        			'std'  => ''
        		),
        		'number' => array(
        			'title' => __('Number', 'yit'),
            		'type' => 'text', 
        			'std'  => ''
        		),
        		'last' => array(
        			'title' => __('Last element', 'yit'),
        			'type' => 'checkbox',
        			'std'  => 'no'
        		)    		
        	)
        ),
        /* === BOX TITLE === */
        'box_title' => array(
        	'title' => __('Box title', 'yit' ),
        	'description' =>  __('Show a title centered with line', 'yit' ),
        	'tab' => 'shortcodes',
            'has_content' => true,
        	'attributes' => array(
                'class' => array(
        			'title' => __('Class', 'yit'),
        			'type' => 'text',
        			'std'  => ''
        		),
                'border' => array(
                    'title' => __('Border', 'yit'),
                    'type' => 'select',
                    'options' => array(
                        'bottom' => __('bottom', 'yit'),
                        'middle' => __('middle', 'yit'),
                        'around' => __('around', 'yit'),
                        'none' => __('none', 'yit')
                    ),
                    'std'  => 'middle'
                ),
        	)
        ),
        /* === FAQ === */        
        'faq' => array(
           	'title' => __('FAQ', 'yit' ),
        	'description' =>  __('Show a Frequently Asked Questions', 'yit' ),
        	'tab' => 'cpt',
            'has_content' => false,
        	'attributes' => array(
        		'category' => array(
        			'title' => __('Category', 'yit'),
        			'type' => 'checklist',
					'options' => $faq_categories,
        			'std'  => ''
        		),
        	)
         ),
         /* === CALL TO ACTION 3 === */
        'call_three' => array(
        'title' => __('Call to action newsletter', 'yit' ),
        'description' =>  __('Show a message with newsletter subscription', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => false,
        'attributes' => array(
            'title' => array(
                'title' => __('Title', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'incipit' => array(
                'title' => __('Incipit', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'email' => array(
                'title' => __('E-mail', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'email_label' => array(
                'title' => __('E-mail label', 'yit'),
                'type' => 'text',
                'std'  => 'your e-mail'
            ),
            'submit' => array(
                'title' => __('Button text', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'action' => array(
                'title' => __('Action URL', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'hidden_fields' => array(
                'title' => __('Hidden fields', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'method' => array(
                'title' => __('Method', 'yit'),
                'type' => 'select', // post|get
                'options' => array(
                    'post' => __('POST', 'yit'),
                    'get' => __('GET', 'yit')
                ),
                'std'  => 'post'
            )
        )
        ),
        /* === CALL TO ACTION 4 === */
        'call_four' => array(
            'title' => __('Call to action with banner button', 'yit' ),
            'description' =>  __('Shows a box with an banner, text and button', 'yit' ),
            'tab' => 'shortcodes',
            'has_content' => false,
            'attributes' => array(
                'href' => array(
                    'title' => __('URL', 'yit'),
                    'type' => 'text',
                    'std'  => '#'
                ),
                'background_image_url' => array(
                    'title' => __('Background image URL', 'yit'),
                    'type' => 'text',
                    'std'  => '#'
                ),
                'label_button' => array(
                    'title' => __('Label button', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'slogan' => array(
                    'title' => __('Slogan', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'subslogan' => array(
                    'title' => __('Subslogan', 'yit'),
                    'type' => 'text', // btn-view-over-the-town-1|btn-the-bizzniss-1|btn-french-1|ecc
                    'std'  => ''
                ),
                'hover_color' => array(
                    'title' => __('Hover Color', 'yit'),
                    'type' => 'colorpicker',
                    'std'  => '#000000'
                ),
            )
        ),
        'logo' => array(
        'title' => __('Logo font', 'yit' ),
        'description' =>  __('Show a text with logo style', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => true,
        'attributes' => array(
            'size' => array(
                'title' => __('Size of text', 'yit'),
                'type' => 'number',
                'std'  => '44'
            ),
            'unit' => array(
                'title' => __('Unit', 'yit'),
                'type' => 'select',
                'options' => array(
                    'px' => 'px',
                    'em' => 'em',
                    '%' => '%'
                ),
                'std'  => 'px'
            ),
            'color' => array(
                'title' => __('Color', 'yit'),
                'type' => 'colorpicker',
                'std'  => '#b6b6b7'
            )
        )
        ),
        'numbers_sections' => array(
        'title' => __('Numbers sections', 'yit' ),
        'description' =>  __('Show a number background with a title and text', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => true,
        'attributes' => array(
            'number' => array(
                'title' => __('Number', 'yit'),
                'type' => 'number',
                'std'  => '1'
            ),
            'title' => array(
                'title' => __('Title', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'last' => array(
                'title' => __('Last element', 'yit'),
                'type' => 'checkbox',
                'std'  => 'no'
            )
        )
        ),
        'box_service' => array(
        'title' => __('Box service', 'yit' ),
        'description' =>  __('Show a box with services style', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => true,
        'attributes' => array(
            'title' => array(
                'title' => __('Title', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'url' => array(
                'title' => __('URL', 'yit'),
                'type' => 'text',
                'std'  => 'http://'
            ),
            'img' => array(
                'title' => __('Image URL', 'yit'),
                'type' => 'text',
                'std'  => 'http://'
            ),
            /*
            'last' => array(
                'title' => __('Last element', 'yit'),
                'type' => 'checkbox',
                'std'  => 'no'
            ),
            */
            'show_title' => array(
                'title' => __('Show Title', 'yit'),
                'type' => 'checkbox',
                'std'  => 'yes'
            ),
            'show_content' => array(
                'title' => __('Show Content', 'yit'),
                'type' => 'checkbox',
                'std'  => 'yes'
            ),
            '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'
            )
        )
        ),
        'grid' => array(
        'title' => __('Grid', 'yit' ),
        'description' =>  __('Use the grid for the responsive', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => true,
        'attributes' => array(
            'first' => array(
                'title' => __('First', 'yit'),
                'type' => 'checkbox',
                'std'  => 'no'
            ),
            'last' => array(
                'title' => __('Last', 'yit'),
                'type' => 'checkbox',
                'std'  => 'no'
            ),
            'columns' => array(
                'title' => __('Columns', 'yit'),
                'description' => __('value between 1 and 12', 'yit'),
                'type' => 'number',
                'std'  => '1',
                'min'  => '1',
                'max'  => '12',
            )
        )
        ),
        'icon_list' => array(
        'title' => __('Icon list', 'yit' ),
        'description' =>  __('Use a list with an icon', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => false,
        'multiple' => true,
        'unlimited'   => true,
        'attributes' => array(
            'title' => array(
                'title' => __('Title', 'yit'),
                'type' => 'text',
                'std'  => ''
            ),
            'last' => array(
                'title' => __('Last element', 'yit'),
                'type' => 'checkbox',
                'std'  => 'no'
            ),
            'icon_1' => array(
                'title' => __('Icon', 'yit'),
                'type' => 'select',
                'options' => yit_get_model('shortcodes')->get_awesome_icons(),
                'std'  => '',
                'multiple' => true
            ),
            'icon_url_1' => array(
                'title' => __('Icon url', 'yit'),
                'type' => 'text',
                'std'  => '',
                'multiple' => true
            ),
            'item_1' => array(
                'title' => __('Item', 'yit'),
                'type' => 'text',
                'std'  => '',
                'multiple' => true
            ),
            'item_link_1' => array(
                'title' => __('Item link', 'yit'),
                'type' => 'text',
                'std'  => '',
                'multiple' => true
            ),
        )
        ),
        'sitemap' => array(
        'title' => __('Sitemap', 'yit' ),
        'description' =>  __('The sitemap can be configured in Theme Options settings.', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => false,
        'multiple' => false,
        'unlimited'   => false,
        'attributes' => array(
            'title' => array(
                'title' => __('Title', 'yit'),
                'type' => 'text',
                'std'  => ''
            )
        )
        ),
        /* === CREDIT CARD === */
        'credit_card' => array(
        'title' => __('Credit card', 'yit' ),
        'description' =>  __('Show an images of credit cards', 'yit' ),
        'tab' => 'shortcodes',
        'has_content' => false,
        'attributes' => array(
            'type' => array(
                'title' => __('Type', 'yit'),
                'type' => 'checklist',
                'options'  => array(
                    'amazon' => 'Amazon',
                    'amex' => 'American Express',
                    'amex_gold' => 'American Express Gold',
                    'amex_green' => 'American Express Green',
                    'amex_silver' => 'American Express Silver',
                    'apple' => 'Apple',
                    'bank' => 'Bank',
                    'cash' => 'Cash',
                    'chase' => 'Chase',
                    'coupon' => 'Coupon',
                    'credit' => 'Credit',
                    'debit' => 'Debit',
                    'discover' => 'Discover',
                    'discover_novus' => 'Discover Novus',
                    'echeck' => 'eCheck',
                    'generic_1' => 'Generic 1',
                    'generic_2' => 'Generic 2',
                    'generic_3' => 'Generic 3',
                    'gift' => 'Gift',
                    'gold' => 'Gold',
                    'googleckout' => 'Google Checkout',
                    'itunes' => 'iTunes (red)',
                    'itunes_2' => 'iTunes (blue)',
                    'itunes_3' => 'iTunes (green)',
                    'mastercard' => 'Mastercard',
                    'mileage' => 'Mileage',
                    'paypal' => 'PayPal',
                    'sapphire' => 'Sapphire',
                    'solo' => 'Solo',
                    'visa' => 'Visa'
                ),
                'std' => 'generic_1'
            ),
        )
        ),
        'teaser' => array(
            'title' => __('Teaser', 'yit' ),
            'description' =>  __('Create a banner with an image, a link and text.', 'yit' ),
            'tab' => 'shortcodes',
            'has_content' => false,
            'multiple' => false,
            'unlimited'   => false,
            'attributes' => array(
                'title' => array(
                    'title' => __('Title', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'subtitle' => array(
                    'title' => __('Subtitle', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'image' => array(
                    'title' => __('Image URL', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'link' => array(
                    'title' => __('Link', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'target' => array(
                    'title' => __('Target','yit'),
                    'type' => 'select',
                    'options'  => array(
                        '' => '',
                        '_blank' => __('Blank', 'yit'),
                        '_parent' => __('Parent', 'yit'),
                        '_self' => __('Self', 'yit'),
                        '_top' => __('Top', 'yit'),
                    ),
                    'std' => ''
                ),
                'hover_class' => array(
                    'title' => __('Hover Skin', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'black' => __('Black', 'yit'),
                        'white' => __('White', 'yit'),
                    ),
                    'std' => ''
                ),
                'slogan_position' => array(
                    'title' => __('Slogan Position', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'top' => __('Top', 'yit'),
                        'center' => __('Center', 'yit'),
                        'bottom' => __('Bottom', 'yit'),
                    ),
                    'std' => ''
                ),
            )
        ),

        'parallax' => array(
            'title' => __('Parallax effect', 'yit' ),
            'description' =>  __('Create a fancy full-width parallax effect', 'yit' ),
            'tab' => 'shortcodes',
            'has_content' => true,
            'multiple' => false,
            'unlimited'   => false,
            'attributes' => array(
                'height' => array(
                    'title' => __('Container height', 'yit'),
                    'type' => 'number',
                    'std'  => 300
                ),
                'image' => array(
                    'title' => __('Background Image URL', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'valign' => array(
                    'title' => __('Vertical Align', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'top' => __('Top', 'yit'),
                        'center' => __('Center', 'yit'),
                        'bottom' => __('Bottom', 'yit'),
                    ),
                    'std' => 'center'
                ),
                'halign' => array(
                    'title' => __('Horizontal Align', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'left' => __('Left', 'yit'),
                        'center' => __('Center', 'yit'),
                        'right' => __('Right', 'yit'),
                    ),
                    'std' => 'center'
                ),
                'color' => array(
                    'title' => __('Content Text Color', 'yit'),
                    'type' => 'colorpicker',
                    'std'  => '#ffffff'
                ),
                'hover_color' => array(
                    'title' => __('Links hover Color', 'yit'),
                    'type' => 'colorpicker',
                    'std'  => '#000'
                ),
                'effect' => array(
                    'title' => __('Effect', 'yit'),
                    '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'
                ),
                'button_size' => array(
                    'title' => __('Button Size', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'large' => __('Large', 'yit'),
                        'small' => __('Small', 'yit')
                    ),
                    'std' => 'small'
                ),

/*

                'link' => array(
                    'title' => __('Link', 'yit'),
                    'type' => 'text',
                    'std'  => ''
                ),
                'hover_class' => array(
                    'title' => __('Hover Skin', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'black' => __('Black', 'yit'),
                        'white' => __('White', 'yit'),
                    ),
                    'std' => ''
                ),
                'slogan_position' => array(
                    'title' => __('Slogan Position', 'yit'),
                    'type' => 'select',
                    'options'  => array(
                        'top' => __('Top', 'yit'),
                        'center' => __('Center', 'yit'),
                        'bottom' => __('Bottom', 'yit'),
                    ),
                    'std' => ''
                ),
*/
            )
        ),
        /* === HIDE FOR THIS THEME === */
        'label' => array(
        'hide' => true,
        )
	));
}
add_filter( 'yit_add_shortcodes', 'yit_add_shortcodes' );

add_action('wp_enqueue_scripts', 'add_shortcodes_theme_css');

if( !function_exists( 'add_shortcodes_theme_css' ) ) {
	/*
	 * Add style of widgets in theme
	 */
	function add_shortcodes_theme_css(){
		$url = YIT_THEME_ASSETS_URL . '/css/shortcodes.css';
	    //wp_register_style('shortcodes_theme_css', $url);
	    yit_wp_enqueue_style(1201, 'shortcodes_theme_css', $url);	
	}
}

function yit_get_faq_categories(){
	global $wpdb, $blog_id, $current_blog;
	
	wp_reset_query();
	$terms = $wpdb->get_results( "SELECT name, t.term_id FROM $wpdb->terms AS t, $wpdb->term_taxonomy AS tt WHERE t.term_id = tt.term_id AND taxonomy = 'category-faq' ORDER BY name ASC" );
	
	$categories = array();
	$categories['0'] = __('All categories', 'yit');
	if ($terms) :
		foreach ($terms as $cat) : 
			$categories[$cat->term_id] = ($cat->name) ? $cat->name : 'ID: '. $cat->term_id;
		endforeach;
	endif;
	return $categories;		
}

function yit_get_testimonial_categories(){
	global $wpdb, $blog_id, $current_blog;
	
	wp_reset_query();
	$terms = $wpdb->get_results('SELECT name, ' . $wpdb->prefix . 'terms.term_id FROM ' . $wpdb->prefix . 'terms, ' . $wpdb->prefix . 'term_taxonomy WHERE ' . $wpdb->prefix . 'terms.term_id = ' . $wpdb->prefix . 'term_taxonomy.term_id AND taxonomy = "category-testimonial" ORDER BY name ASC;');
	
	$categories = array();
	$categories['0'] = __('All categories', 'yit');
	if ($terms) :
		foreach ($terms as $cat) : 
			$categories[$cat->term_id] = ($cat->name) ? $cat->name : 'ID: '. $cat->term_id;
		endforeach;
	endif;
	return $categories;		
}