예제 #1
1
    function meta_box_callback()
    {
        global $post, $post_type;
        // Use nonce for verification
        echo '<input type="hidden" name="' . $post_type . '_meta_box_nonce" value="' . wp_create_nonce(basename(__FILE__)) . '" />';
        // Begin the field table and loop
        echo '<table class="form-table meta_box">';
        if (is_array($this->fields)) {
            foreach ($this->fields as $field) {
                // get data for this field
                extract($field);
                if (!empty($desc)) {
                    $desc = '<span class="description">' . $desc . '</span>';
                }
                // get value of this field if it exists for this post
                $meta = get_post_meta($post->ID, $id, true);
                if (function_exists('vibe_get_option')) {
                    $cache_duration = vibe_get_option('cache_duration');
                    if (!isset($cache_duration) || !$cache_duration) {
                        $cache_duration = 0;
                    }
                }
                // begin a table row with
                echo '<tr>
					<th><label for="' . $id . '">' . $label . '</label></th>
					<td>';
                switch ($type) {
                    case 'number':
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        echo '<input type="number" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" size="20" />
									<br />' . $desc;
                        break;
                        // text
                    // text
                    case 'text':
                        echo '<input type="text" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" size="20" />
									<br />' . $desc;
                        break;
                    case 'duration':
                        echo '<select name="' . $id . '" id="' . $id . '" class="select">';
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        $options = array(array('value' => '1', 'label' => __('Seconds', 'vibe-customtypes')), array('value' => '60', 'label' => __('Minutes', 'vibe-customtypes')), array('value' => '3600', 'label' => __('Hours', 'vibe-customtypes')), array('value' => '86400', 'label' => __('Days', 'vibe-customtypes')), array('value' => '604800', 'label' => __('Weeks', 'vibe-customtypes')), array('value' => '2592000', 'label' => __('Months', 'vibe-customtypes')));
                        foreach ($options as $option) {
                            echo '<option' . selected(esc_attr($meta), $option['value'], false) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
                        }
                        echo '</select><br />' . $desc;
                        break;
                        // textarea
                    // textarea
                    case 'textarea':
                        echo '<textarea name="' . $id . '" id="' . $id . '" cols="60" rows="4">' . esc_attr($meta) . '</textarea>
									<br />' . $desc;
                        break;
                        // editor
                    // editor
                    case 'editor':
                        wp_editor($meta, $id, array('wpautop' => true, 'media_buttons' => true, 'teeny' => true, 'textarea_rows' => '4', 'textarea_cols' => '30', 'tinymce' => array('theme_advanced_buttons1' => 'save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,', 'theme_advanced_buttons2' => "styleselect,formatselect,fontselect,fontsizeselect,", 'theme_advanced_buttons3' => ",bullist,numlist,|,outdent,indent,blockquote,|,link,anchor,image,|,insertdate,forecolor,backcolor,|,tablecontrols,|,hr,|,fullscreen", 'theme_advanced_buttons4' => "", 'theme_advanced_text_colors' => '0f3156,636466,0486d3'), 'quicktags' => array('buttons' => 'b,i,ul,ol,li,link,close')));
                        echo '<br />' . $desc;
                        break;
                    case 'faicons':
                        echo "<ul class='the-icons unstyled'><li><i class='fa fa-var-500px'></i><span class='i-name'>fa fa-var-500px</span></li><li><i class='fa fa-var-adjust'></i><span class='i-name'>fa fa-var-adjust</span></li><li><i class='fa fa-var-adn'></i><span class='i-name'>fa fa-var-adn</span></li><li><i class='fa fa-var-align-center'></i><span class='i-name'>fa fa-var-align-center</span></li><li><i class='fa fa-var-align-justify'></i><span class='i-name'>fa fa-var-align-justify</span></li><li><i class='fa fa-var-align-left'></i><span class='i-name'>fa fa-var-align-left</span></li><li><i class='fa fa-var-align-right'></i><span class='i-name'>fa fa-var-align-right</span></li><li><i class='fa fa-var-amazon'></i><span class='i-name'>fa fa-var-amazon</span></li><li><i class='fa fa-var-ambulance'></i><span class='i-name'>fa fa-var-ambulance</span></li><li><i class='fa fa-var-anchor'></i><span class='i-name'>fa fa-var-anchor</span></li><li><i class='fa fa-var-android'></i><span class='i-name'>fa fa-var-android</span></li><li><i class='fa fa-var-angellist'></i><span class='i-name'>fa fa-var-angellist</span></li><li><i class='fa fa-var-angle-double-down'></i><span class='i-name'>fa fa-var-angle-double-down</span></li><li><i class='fa fa-var-angle-double-left'></i><span class='i-name'>fa fa-var-angle-double-left</span></li><li><i class='fa fa-var-angle-double-right'></i><span class='i-name'>fa fa-var-angle-double-right</span></li><li><i class='fa fa-var-angle-double-up'></i><span class='i-name'>fa fa-var-angle-double-up</span></li><li><i class='fa fa-var-angle-down'></i><span class='i-name'>fa fa-var-angle-down</span></li><li><i class='fa fa-var-angle-left'></i><span class='i-name'>fa fa-var-angle-left</span></li><li><i class='fa fa-var-angle-right'></i><span class='i-name'>fa fa-var-angle-right</span></li><li><i class='fa fa-var-angle-up'></i><span class='i-name'>fa fa-var-angle-up</span></li><li><i class='fa fa-var-apple'></i><span class='i-name'>fa fa-var-apple</span></li><li><i class='fa fa-var-archive'></i><span class='i-name'>fa fa-var-archive</span></li><li><i class='fa fa-var-area-chart'></i><span class='i-name'>fa fa-var-area-chart</span></li><li><i class='fa fa-var-arrow-circle-down'></i><span class='i-name'>fa fa-var-arrow-circle-down</span></li><li><i class='fa fa-var-arrow-circle-left'></i><span class='i-name'>fa fa-var-arrow-circle-left</span></li><li><i class='fa fa-var-arrow-circle-o-down'></i><span class='i-name'>fa fa-var-arrow-circle-o-down</span></li><li><i class='fa fa-var-arrow-circle-o-left'></i><span class='i-name'>fa fa-var-arrow-circle-o-left</span></li><li><i class='fa fa-var-arrow-circle-o-right'></i><span class='i-name'>fa fa-var-arrow-circle-o-right</span></li><li><i class='fa fa-var-arrow-circle-o-up'></i><span class='i-name'>fa fa-var-arrow-circle-o-up</span></li><li><i class='fa fa-var-arrow-circle-right'></i><span class='i-name'>fa fa-var-arrow-circle-right</span></li><li><i class='fa fa-var-arrow-circle-up'></i><span class='i-name'>fa fa-var-arrow-circle-up</span></li><li><i class='fa fa-var-arrow-down'></i><span class='i-name'>fa fa-var-arrow-down</span></li><li><i class='fa fa-var-arrow-left'></i><span class='i-name'>fa fa-var-arrow-left</span></li><li><i class='fa fa-var-arrow-right'></i><span class='i-name'>fa fa-var-arrow-right</span></li><li><i class='fa fa-var-arrow-up'></i><span class='i-name'>fa fa-var-arrow-up</span></li><li><i class='fa fa-var-arrows'></i><span class='i-name'>fa fa-var-arrows</span></li><li><i class='fa fa-var-arrows-alt'></i><span class='i-name'>fa fa-var-arrows-alt</span></li><li><i class='fa fa-var-arrows-h'></i><span class='i-name'>fa fa-var-arrows-h</span></li><li><i class='fa fa-var-arrows-v'></i><span class='i-name'>fa fa-var-arrows-v</span></li><li><i class='fa fa-var-asterisk'></i><span class='i-name'>fa fa-var-asterisk</span></li><li><i class='fa fa-var-at'></i><span class='i-name'>fa fa-var-at</span></li><li><i class='fa fa-var-automobile'></i><span class='i-name'>fa fa-var-automobile</span></li><li><i class='fa fa-var-backward'></i><span class='i-name'>fa fa-var-backward</span></li><li><i class='fa fa-var-balance-scale'></i><span class='i-name'>fa fa-var-balance-scale</span></li><li><i class='fa fa-var-ban'></i><span class='i-name'>fa fa-var-ban</span></li><li><i class='fa fa-var-bank'></i><span class='i-name'>fa fa-var-bank</span></li><li><i class='fa fa-var-bar-chart'></i><span class='i-name'>fa fa-var-bar-chart</span></li><li><i class='fa fa-var-bar-chart-o'></i><span class='i-name'>fa fa-var-bar-chart-o</span></li><li><i class='fa fa-var-barcode'></i><span class='i-name'>fa fa-var-barcode</span></li><li><i class='fa fa-var-bars'></i><span class='i-name'>fa fa-var-bars</span></li><li><i class='fa fa-var-battery-0'></i><span class='i-name'>fa fa-var-battery-0</span></li><li><i class='fa fa-var-battery-1'></i><span class='i-name'>fa fa-var-battery-1</span></li><li><i class='fa fa-var-battery-2'></i><span class='i-name'>fa fa-var-battery-2</span></li><li><i class='fa fa-var-battery-3'></i><span class='i-name'>fa fa-var-battery-3</span></li><li><i class='fa fa-var-battery-4'></i><span class='i-name'>fa fa-var-battery-4</span></li><li><i class='fa fa-var-battery-empty'></i><span class='i-name'>fa fa-var-battery-empty</span></li><li><i class='fa fa-var-battery-full'></i><span class='i-name'>fa fa-var-battery-full</span></li><li><i class='fa fa-var-battery-half'></i><span class='i-name'>fa fa-var-battery-half</span></li><li><i class='fa fa-var-battery-quarter'></i><span class='i-name'>fa fa-var-battery-quarter</span></li><li><i class='fa fa-var-battery-three-quarters'></i><span class='i-name'>fa fa-var-battery-three-quarters</span></li><li><i class='fa fa-var-bed'></i><span class='i-name'>fa fa-var-bed</span></li><li><i class='fa fa-var-beer'></i><span class='i-name'>fa fa-var-beer</span></li><li><i class='fa fa-var-behance'></i><span class='i-name'>fa fa-var-behance</span></li><li><i class='fa fa-var-behance-square'></i><span class='i-name'>fa fa-var-behance-square</span></li><li><i class='fa fa-var-bell'></i><span class='i-name'>fa fa-var-bell</span></li><li><i class='fa fa-var-bell-o'></i><span class='i-name'>fa fa-var-bell-o</span></li><li><i class='fa fa-var-bell-slash'></i><span class='i-name'>fa fa-var-bell-slash</span></li><li><i class='fa fa-var-bell-slash-o'></i><span class='i-name'>fa fa-var-bell-slash-o</span></li><li><i class='fa fa-var-bicycle'></i><span class='i-name'>fa fa-var-bicycle</span></li><li><i class='fa fa-var-binoculars'></i><span class='i-name'>fa fa-var-binoculars</span></li><li><i class='fa fa-var-birthday-cake'></i><span class='i-name'>fa fa-var-birthday-cake</span></li><li><i class='fa fa-var-bitbucket'></i><span class='i-name'>fa fa-var-bitbucket</span></li><li><i class='fa fa-var-bitbucket-square'></i><span class='i-name'>fa fa-var-bitbucket-square</span></li><li><i class='fa fa-var-bitcoin'></i><span class='i-name'>fa fa-var-bitcoin</span></li><li><i class='fa fa-var-black-tie'></i><span class='i-name'>fa fa-var-black-tie</span></li><li><i class='fa fa-var-bluetooth'></i><span class='i-name'>fa fa-var-bluetooth</span></li><li><i class='fa fa-var-bluetooth-b'></i><span class='i-name'>fa fa-var-bluetooth-b</span></li><li><i class='fa fa-var-bold'></i><span class='i-name'>fa fa-var-bold</span></li><li><i class='fa fa-var-bolt'></i><span class='i-name'>fa fa-var-bolt</span></li><li><i class='fa fa-var-bomb'></i><span class='i-name'>fa fa-var-bomb</span></li><li><i class='fa fa-var-book'></i><span class='i-name'>fa fa-var-book</span></li><li><i class='fa fa-var-bookmark'></i><span class='i-name'>fa fa-var-bookmark</span></li><li><i class='fa fa-var-bookmark-o'></i><span class='i-name'>fa fa-var-bookmark-o</span></li><li><i class='fa fa-var-briefcase'></i><span class='i-name'>fa fa-var-briefcase</span></li><li><i class='fa fa-var-btc'></i><span class='i-name'>fa fa-var-btc</span></li><li><i class='fa fa-var-bug'></i><span class='i-name'>fa fa-var-bug</span></li><li><i class='fa fa-var-building'></i><span class='i-name'>fa fa-var-building</span></li><li><i class='fa fa-var-building-o'></i><span class='i-name'>fa fa-var-building-o</span></li><li><i class='fa fa-var-bullhorn'></i><span class='i-name'>fa fa-var-bullhorn</span></li><li><i class='fa fa-var-bullseye'></i><span class='i-name'>fa fa-var-bullseye</span></li><li><i class='fa fa-var-bus'></i><span class='i-name'>fa fa-var-bus</span></li><li><i class='fa fa-var-buysellads'></i><span class='i-name'>fa fa-var-buysellads</span></li><li><i class='fa fa-var-cab'></i><span class='i-name'>fa fa-var-cab</span></li><li><i class='fa fa-var-calculator'></i><span class='i-name'>fa fa-var-calculator</span></li><li><i class='fa fa-var-calendar'></i><span class='i-name'>fa fa-var-calendar</span></li><li><i class='fa fa-var-calendar-check-o'></i><span class='i-name'>fa fa-var-calendar-check-o</span></li><li><i class='fa fa-var-calendar-minus-o'></i><span class='i-name'>fa fa-var-calendar-minus-o</span></li><li><i class='fa fa-var-calendar-o'></i><span class='i-name'>fa fa-var-calendar-o</span></li><li><i class='fa fa-var-calendar-plus-o'></i><span class='i-name'>fa fa-var-calendar-plus-o</span></li><li><i class='fa fa-var-calendar-times-o'></i><span class='i-name'>fa fa-var-calendar-times-o</span></li><li><i class='fa fa-var-camera'></i><span class='i-name'>fa fa-var-camera</span></li><li><i class='fa fa-var-camera-retro'></i><span class='i-name'>fa fa-var-camera-retro</span></li><li><i class='fa fa-var-car'></i><span class='i-name'>fa fa-var-car</span></li><li><i class='fa fa-var-caret-down'></i><span class='i-name'>fa fa-var-caret-down</span></li><li><i class='fa fa-var-caret-left'></i><span class='i-name'>fa fa-var-caret-left</span></li><li><i class='fa fa-var-caret-right'></i><span class='i-name'>fa fa-var-caret-right</span></li><li><i class='fa fa-var-caret-square-o-down'></i><span class='i-name'>fa fa-var-caret-square-o-down</span></li><li><i class='fa fa-var-caret-square-o-left'></i><span class='i-name'>fa fa-var-caret-square-o-left</span></li><li><i class='fa fa-var-caret-square-o-right'></i><span class='i-name'>fa fa-var-caret-square-o-right</span></li><li><i class='fa fa-var-caret-square-o-up'></i><span class='i-name'>fa fa-var-caret-square-o-up</span></li><li><i class='fa fa-var-caret-up'></i><span class='i-name'>fa fa-var-caret-up</span></li><li><i class='fa fa-var-cart-arrow-down'></i><span class='i-name'>fa fa-var-cart-arrow-down</span></li><li><i class='fa fa-var-cart-plus'></i><span class='i-name'>fa fa-var-cart-plus</span></li><li><i class='fa fa-var-cc'></i><span class='i-name'>fa fa-var-cc</span></li><li><i class='fa fa-var-cc-amex'></i><span class='i-name'>fa fa-var-cc-amex</span></li><li><i class='fa fa-var-cc-diners-club'></i><span class='i-name'>fa fa-var-cc-diners-club</span></li><li><i class='fa fa-var-cc-discover'></i><span class='i-name'>fa fa-var-cc-discover</span></li><li><i class='fa fa-var-cc-jcb'></i><span class='i-name'>fa fa-var-cc-jcb</span></li><li><i class='fa fa-var-cc-mastercard'></i><span class='i-name'>fa fa-var-cc-mastercard</span></li><li><i class='fa fa-var-cc-paypal'></i><span class='i-name'>fa fa-var-cc-paypal</span></li><li><i class='fa fa-var-cc-stripe'></i><span class='i-name'>fa fa-var-cc-stripe</span></li><li><i class='fa fa-var-cc-visa'></i><span class='i-name'>fa fa-var-cc-visa</span></li><li><i class='fa fa-var-certificate'></i><span class='i-name'>fa fa-var-certificate</span></li><li><i class='fa fa-var-chain'></i><span class='i-name'>fa fa-var-chain</span></li><li><i class='fa fa-var-chain-broken'></i><span class='i-name'>fa fa-var-chain-broken</span></li><li><i class='fa fa-var-check'></i><span class='i-name'>fa fa-var-check</span></li><li><i class='fa fa-var-check-circle'></i><span class='i-name'>fa fa-var-check-circle</span></li><li><i class='fa fa-var-check-circle-o'></i><span class='i-name'>fa fa-var-check-circle-o</span></li><li><i class='fa fa-var-check-square'></i><span class='i-name'>fa fa-var-check-square</span></li><li><i class='fa fa-var-check-square-o'></i><span class='i-name'>fa fa-var-check-square-o</span></li><li><i class='fa fa-var-chevron-circle-down'></i><span class='i-name'>fa fa-var-chevron-circle-down</span></li><li><i class='fa fa-var-chevron-circle-left'></i><span class='i-name'>fa fa-var-chevron-circle-left</span></li><li><i class='fa fa-var-chevron-circle-right'></i><span class='i-name'>fa fa-var-chevron-circle-right</span></li><li><i class='fa fa-var-chevron-circle-up'></i><span class='i-name'>fa fa-var-chevron-circle-up</span></li><li><i class='fa fa-var-chevron-down'></i><span class='i-name'>fa fa-var-chevron-down</span></li><li><i class='fa fa-var-chevron-left'></i><span class='i-name'>fa fa-var-chevron-left</span></li><li><i class='fa fa-var-chevron-right'></i><span class='i-name'>fa fa-var-chevron-right</span></li><li><i class='fa fa-var-chevron-up'></i><span class='i-name'>fa fa-var-chevron-up</span></li><li><i class='fa fa-var-child'></i><span class='i-name'>fa fa-var-child</span></li><li><i class='fa fa-var-chrome'></i><span class='i-name'>fa fa-var-chrome</span></li><li><i class='fa fa-var-circle'></i><span class='i-name'>fa fa-var-circle</span></li><li><i class='fa fa-var-circle-o'></i><span class='i-name'>fa fa-var-circle-o</span></li><li><i class='fa fa-var-circle-o-notch'></i><span class='i-name'>fa fa-var-circle-o-notch</span></li><li><i class='fa fa-var-circle-thin'></i><span class='i-name'>fa fa-var-circle-thin</span></li><li><i class='fa fa-var-clipboard'></i><span class='i-name'>fa fa-var-clipboard</span></li><li><i class='fa fa-var-clock-o'></i><span class='i-name'>fa fa-var-clock-o</span></li><li><i class='fa fa-var-clone'></i><span class='i-name'>fa fa-var-clone</span></li><li><i class='fa fa-var-close'></i><span class='i-name'>fa fa-var-close</span></li><li><i class='fa fa-var-cloud'></i><span class='i-name'>fa fa-var-cloud</span></li><li><i class='fa fa-var-cloud-download'></i><span class='i-name'>fa fa-var-cloud-download</span></li><li><i class='fa fa-var-cloud-upload'></i><span class='i-name'>fa fa-var-cloud-upload</span></li><li><i class='fa fa-var-cny'></i><span class='i-name'>fa fa-var-cny</span></li><li><i class='fa fa-var-code'></i><span class='i-name'>fa fa-var-code</span></li><li><i class='fa fa-var-code-fork'></i><span class='i-name'>fa fa-var-code-fork</span></li><li><i class='fa fa-var-codepen'></i><span class='i-name'>fa fa-var-codepen</span></li><li><i class='fa fa-var-codiepie'></i><span class='i-name'>fa fa-var-codiepie</span></li><li><i class='fa fa-var-coffee'></i><span class='i-name'>fa fa-var-coffee</span></li><li><i class='fa fa-var-cog'></i><span class='i-name'>fa fa-var-cog</span></li><li><i class='fa fa-var-cogs'></i><span class='i-name'>fa fa-var-cogs</span></li><li><i class='fa fa-var-columns'></i><span class='i-name'>fa fa-var-columns</span></li><li><i class='fa fa-var-comment'></i><span class='i-name'>fa fa-var-comment</span></li><li><i class='fa fa-var-comment-o'></i><span class='i-name'>fa fa-var-comment-o</span></li><li><i class='fa fa-var-commenting'></i><span class='i-name'>fa fa-var-commenting</span></li><li><i class='fa fa-var-commenting-o'></i><span class='i-name'>fa fa-var-commenting-o</span></li><li><i class='fa fa-var-comments'></i><span class='i-name'>fa fa-var-comments</span></li><li><i class='fa fa-var-comments-o'></i><span class='i-name'>fa fa-var-comments-o</span></li><li><i class='fa fa-var-compass'></i><span class='i-name'>fa fa-var-compass</span></li><li><i class='fa fa-var-compress'></i><span class='i-name'>fa fa-var-compress</span></li><li><i class='fa fa-var-connectdevelop'></i><span class='i-name'>fa fa-var-connectdevelop</span></li><li><i class='fa fa-var-contao'></i><span class='i-name'>fa fa-var-contao</span></li><li><i class='fa fa-var-copy'></i><span class='i-name'>fa fa-var-copy</span></li><li><i class='fa fa-var-copyright'></i><span class='i-name'>fa fa-var-copyright</span></li><li><i class='fa fa-var-creative-commons'></i><span class='i-name'>fa fa-var-creative-commons</span></li><li><i class='fa fa-var-credit-card'></i><span class='i-name'>fa fa-var-credit-card</span></li><li><i class='fa fa-var-credit-card-alt'></i><span class='i-name'>fa fa-var-credit-card-alt</span></li><li><i class='fa fa-var-crop'></i><span class='i-name'>fa fa-var-crop</span></li><li><i class='fa fa-var-crosshairs'></i><span class='i-name'>fa fa-var-crosshairs</span></li><li><i class='fa fa-var-css3'></i><span class='i-name'>fa fa-var-css3</span></li><li><i class='fa fa-var-cube'></i><span class='i-name'>fa fa-var-cube</span></li><li><i class='fa fa-var-cubes'></i><span class='i-name'>fa fa-var-cubes</span></li><li><i class='fa fa-var-cut'></i><span class='i-name'>fa fa-var-cut</span></li><li><i class='fa fa-var-cutlery'></i><span class='i-name'>fa fa-var-cutlery</span></li><li><i class='fa fa-var-dashboard'></i><span class='i-name'>fa fa-var-dashboard</span></li><li><i class='fa fa-var-dashcube'></i><span class='i-name'>fa fa-var-dashcube</span></li><li><i class='fa fa-var-database'></i><span class='i-name'>fa fa-var-database</span></li><li><i class='fa fa-var-dedent'></i><span class='i-name'>fa fa-var-dedent</span></li><li><i class='fa fa-var-delicious'></i><span class='i-name'>fa fa-var-delicious</span></li><li><i class='fa fa-var-desktop'></i><span class='i-name'>fa fa-var-desktop</span></li><li><i class='fa fa-var-deviantart'></i><span class='i-name'>fa fa-var-deviantart</span></li><li><i class='fa fa-var-diamond'></i><span class='i-name'>fa fa-var-diamond</span></li><li><i class='fa fa-var-digg'></i><span class='i-name'>fa fa-var-digg</span></li><li><i class='fa fa-var-dollar'></i><span class='i-name'>fa fa-var-dollar</span></li><li><i class='fa fa-var-dot-circle-o'></i><span class='i-name'>fa fa-var-dot-circle-o</span></li><li><i class='fa fa-var-download'></i><span class='i-name'>fa fa-var-download</span></li><li><i class='fa fa-var-dribbble'></i><span class='i-name'>fa fa-var-dribbble</span></li><li><i class='fa fa-var-dropbox'></i><span class='i-name'>fa fa-var-dropbox</span></li><li><i class='fa fa-var-drupal'></i><span class='i-name'>fa fa-var-drupal</span></li><li><i class='fa fa-var-edge'></i><span class='i-name'>fa fa-var-edge</span></li><li><i class='fa fa-var-edit'></i><span class='i-name'>fa fa-var-edit</span></li><li><i class='fa fa-var-eject'></i><span class='i-name'>fa fa-var-eject</span></li><li><i class='fa fa-var-ellipsis-h'></i><span class='i-name'>fa fa-var-ellipsis-h</span></li><li><i class='fa fa-var-ellipsis-v'></i><span class='i-name'>fa fa-var-ellipsis-v</span></li><li><i class='fa fa-var-empire'></i><span class='i-name'>fa fa-var-empire</span></li><li><i class='fa fa-var-envelope'></i><span class='i-name'>fa fa-var-envelope</span></li><li><i class='fa fa-var-envelope-o'></i><span class='i-name'>fa fa-var-envelope-o</span></li><li><i class='fa fa-var-envelope-square'></i><span class='i-name'>fa fa-var-envelope-square</span></li><li><i class='fa fa-var-eraser'></i><span class='i-name'>fa fa-var-eraser</span></li><li><i class='fa fa-var-eur'></i><span class='i-name'>fa fa-var-eur</span></li><li><i class='fa fa-var-euro'></i><span class='i-name'>fa fa-var-euro</span></li><li><i class='fa fa-var-exchange'></i><span class='i-name'>fa fa-var-exchange</span></li><li><i class='fa fa-var-exclamation'></i><span class='i-name'>fa fa-var-exclamation</span></li><li><i class='fa fa-var-exclamation-circle'></i><span class='i-name'>fa fa-var-exclamation-circle</span></li><li><i class='fa fa-var-exclamation-triangle'></i><span class='i-name'>fa fa-var-exclamation-triangle</span></li><li><i class='fa fa-var-expand'></i><span class='i-name'>fa fa-var-expand</span></li><li><i class='fa fa-var-expeditedssl'></i><span class='i-name'>fa fa-var-expeditedssl</span></li><li><i class='fa fa-var-external-link'></i><span class='i-name'>fa fa-var-external-link</span></li><li><i class='fa fa-var-external-link-square'></i><span class='i-name'>fa fa-var-external-link-square</span></li><li><i class='fa fa-var-eye'></i><span class='i-name'>fa fa-var-eye</span></li><li><i class='fa fa-var-eye-slash'></i><span class='i-name'>fa fa-var-eye-slash</span></li><li><i class='fa fa-var-eyedropper'></i><span class='i-name'>fa fa-var-eyedropper</span></li><li><i class='fa fa-var-facebook'></i><span class='i-name'>fa fa-var-facebook</span></li><li><i class='fa fa-var-facebook-f'></i><span class='i-name'>fa fa-var-facebook-f</span></li><li><i class='fa fa-var-facebook-official'></i><span class='i-name'>fa fa-var-facebook-official</span></li><li><i class='fa fa-var-facebook-square'></i><span class='i-name'>fa fa-var-facebook-square</span></li><li><i class='fa fa-var-fast-backward'></i><span class='i-name'>fa fa-var-fast-backward</span></li><li><i class='fa fa-var-fast-forward'></i><span class='i-name'>fa fa-var-fast-forward</span></li><li><i class='fa fa-var-fax'></i><span class='i-name'>fa fa-var-fax</span></li><li><i class='fa fa-var-feed'></i><span class='i-name'>fa fa-var-feed</span></li><li><i class='fa fa-var-female'></i><span class='i-name'>fa fa-var-female</span></li><li><i class='fa fa-var-fighter-jet'></i><span class='i-name'>fa fa-var-fighter-jet</span></li><li><i class='fa fa-var-file'></i><span class='i-name'>fa fa-var-file</span></li><li><i class='fa fa-var-file-archive-o'></i><span class='i-name'>fa fa-var-file-archive-o</span></li><li><i class='fa fa-var-file-audio-o'></i><span class='i-name'>fa fa-var-file-audio-o</span></li><li><i class='fa fa-var-file-code-o'></i><span class='i-name'>fa fa-var-file-code-o</span></li><li><i class='fa fa-var-file-excel-o'></i><span class='i-name'>fa fa-var-file-excel-o</span></li><li><i class='fa fa-var-file-image-o'></i><span class='i-name'>fa fa-var-file-image-o</span></li><li><i class='fa fa-var-file-movie-o'></i><span class='i-name'>fa fa-var-file-movie-o</span></li><li><i class='fa fa-var-file-o'></i><span class='i-name'>fa fa-var-file-o</span></li><li><i class='fa fa-var-file-pdf-o'></i><span class='i-name'>fa fa-var-file-pdf-o</span></li><li><i class='fa fa-var-file-photo-o'></i><span class='i-name'>fa fa-var-file-photo-o</span></li><li><i class='fa fa-var-file-picture-o'></i><span class='i-name'>fa fa-var-file-picture-o</span></li><li><i class='fa fa-var-file-powerpoint-o'></i><span class='i-name'>fa fa-var-file-powerpoint-o</span></li><li><i class='fa fa-var-file-sound-o'></i><span class='i-name'>fa fa-var-file-sound-o</span></li><li><i class='fa fa-var-file-text'></i><span class='i-name'>fa fa-var-file-text</span></li><li><i class='fa fa-var-file-text-o'></i><span class='i-name'>fa fa-var-file-text-o</span></li><li><i class='fa fa-var-file-video-o'></i><span class='i-name'>fa fa-var-file-video-o</span></li><li><i class='fa fa-var-file-word-o'></i><span class='i-name'>fa fa-var-file-word-o</span></li><li><i class='fa fa-var-file-zip-o'></i><span class='i-name'>fa fa-var-file-zip-o</span></li><li><i class='fa fa-var-files-o'></i><span class='i-name'>fa fa-var-files-o</span></li><li><i class='fa fa-var-film'></i><span class='i-name'>fa fa-var-film</span></li><li><i class='fa fa-var-filter'></i><span class='i-name'>fa fa-var-filter</span></li><li><i class='fa fa-var-fire'></i><span class='i-name'>fa fa-var-fire</span></li><li><i class='fa fa-var-fire-extinguisher'></i><span class='i-name'>fa fa-var-fire-extinguisher</span></li><li><i class='fa fa-var-firefox'></i><span class='i-name'>fa fa-var-firefox</span></li><li><i class='fa fa-var-flag'></i><span class='i-name'>fa fa-var-flag</span></li><li><i class='fa fa-var-flag-checkered'></i><span class='i-name'>fa fa-var-flag-checkered</span></li><li><i class='fa fa-var-flag-o'></i><span class='i-name'>fa fa-var-flag-o</span></li><li><i class='fa fa-var-flash'></i><span class='i-name'>fa fa-var-flash</span></li><li><i class='fa fa-var-flask'></i><span class='i-name'>fa fa-var-flask</span></li><li><i class='fa fa-var-flickr'></i><span class='i-name'>fa fa-var-flickr</span></li><li><i class='fa fa-var-floppy-o'></i><span class='i-name'>fa fa-var-floppy-o</span></li><li><i class='fa fa-var-folder'></i><span class='i-name'>fa fa-var-folder</span></li><li><i class='fa fa-var-folder-o'></i><span class='i-name'>fa fa-var-folder-o</span></li><li><i class='fa fa-var-folder-open'></i><span class='i-name'>fa fa-var-folder-open</span></li><li><i class='fa fa-var-folder-open-o'></i><span class='i-name'>fa fa-var-folder-open-o</span></li><li><i class='fa fa-var-font'></i><span class='i-name'>fa fa-var-font</span></li><li><i class='fa fa-var-fonticons'></i><span class='i-name'>fa fa-var-fonticons</span></li><li><i class='fa fa-var-fort-awesome'></i><span class='i-name'>fa fa-var-fort-awesome</span></li><li><i class='fa fa-var-forumbee'></i><span class='i-name'>fa fa-var-forumbee</span></li><li><i class='fa fa-var-forward'></i><span class='i-name'>fa fa-var-forward</span></li><li><i class='fa fa-var-foursquare'></i><span class='i-name'>fa fa-var-foursquare</span></li><li><i class='fa fa-var-frown-o'></i><span class='i-name'>fa fa-var-frown-o</span></li><li><i class='fa fa-var-futbol-o'></i><span class='i-name'>fa fa-var-futbol-o</span></li><li><i class='fa fa-var-gamepad'></i><span class='i-name'>fa fa-var-gamepad</span></li><li><i class='fa fa-var-gavel'></i><span class='i-name'>fa fa-var-gavel</span></li><li><i class='fa fa-var-gbp'></i><span class='i-name'>fa fa-var-gbp</span></li><li><i class='fa fa-var-ge'></i><span class='i-name'>fa fa-var-ge</span></li><li><i class='fa fa-var-gear'></i><span class='i-name'>fa fa-var-gear</span></li><li><i class='fa fa-var-gears'></i><span class='i-name'>fa fa-var-gears</span></li><li><i class='fa fa-var-genderless'></i><span class='i-name'>fa fa-var-genderless</span></li><li><i class='fa fa-var-get-pocket'></i><span class='i-name'>fa fa-var-get-pocket</span></li><li><i class='fa fa-var-gg'></i><span class='i-name'>fa fa-var-gg</span></li><li><i class='fa fa-var-gg-circle'></i><span class='i-name'>fa fa-var-gg-circle</span></li><li><i class='fa fa-var-gift'></i><span class='i-name'>fa fa-var-gift</span></li><li><i class='fa fa-var-git'></i><span class='i-name'>fa fa-var-git</span></li><li><i class='fa fa-var-git-square'></i><span class='i-name'>fa fa-var-git-square</span></li><li><i class='fa fa-var-github'></i><span class='i-name'>fa fa-var-github</span></li><li><i class='fa fa-var-github-alt'></i><span class='i-name'>fa fa-var-github-alt</span></li><li><i class='fa fa-var-github-square'></i><span class='i-name'>fa fa-var-github-square</span></li><li><i class='fa fa-var-gittip'></i><span class='i-name'>fa fa-var-gittip</span></li><li><i class='fa fa-var-glass'></i><span class='i-name'>fa fa-var-glass</span></li><li><i class='fa fa-var-globe'></i><span class='i-name'>fa fa-var-globe</span></li><li><i class='fa fa-var-google'></i><span class='i-name'>fa fa-var-google</span></li><li><i class='fa fa-var-google-plus'></i><span class='i-name'>fa fa-var-google-plus</span></li><li><i class='fa fa-var-google-plus-square'></i><span class='i-name'>fa fa-var-google-plus-square</span></li><li><i class='fa fa-var-google-wallet'></i><span class='i-name'>fa fa-var-google-wallet</span></li><li><i class='fa fa-var-graduation-cap'></i><span class='i-name'>fa fa-var-graduation-cap</span></li><li><i class='fa fa-var-gratipay'></i><span class='i-name'>fa fa-var-gratipay</span></li><li><i class='fa fa-var-group'></i><span class='i-name'>fa fa-var-group</span></li><li><i class='fa fa-var-h-square'></i><span class='i-name'>fa fa-var-h-square</span></li><li><i class='fa fa-var-hacker-news'></i><span class='i-name'>fa fa-var-hacker-news</span></li><li><i class='fa fa-var-hand-grab-o'></i><span class='i-name'>fa fa-var-hand-grab-o</span></li><li><i class='fa fa-var-hand-lizard-o'></i><span class='i-name'>fa fa-var-hand-lizard-o</span></li><li><i class='fa fa-var-hand-o-down'></i><span class='i-name'>fa fa-var-hand-o-down</span></li><li><i class='fa fa-var-hand-o-left'></i><span class='i-name'>fa fa-var-hand-o-left</span></li><li><i class='fa fa-var-hand-o-right'></i><span class='i-name'>fa fa-var-hand-o-right</span></li><li><i class='fa fa-var-hand-o-up'></i><span class='i-name'>fa fa-var-hand-o-up</span></li><li><i class='fa fa-var-hand-paper-o'></i><span class='i-name'>fa fa-var-hand-paper-o</span></li><li><i class='fa fa-var-hand-peace-o'></i><span class='i-name'>fa fa-var-hand-peace-o</span></li><li><i class='fa fa-var-hand-pointer-o'></i><span class='i-name'>fa fa-var-hand-pointer-o</span></li><li><i class='fa fa-var-hand-rock-o'></i><span class='i-name'>fa fa-var-hand-rock-o</span></li><li><i class='fa fa-var-hand-scissors-o'></i><span class='i-name'>fa fa-var-hand-scissors-o</span></li><li><i class='fa fa-var-hand-spock-o'></i><span class='i-name'>fa fa-var-hand-spock-o</span></li><li><i class='fa fa-var-hand-stop-o'></i><span class='i-name'>fa fa-var-hand-stop-o</span></li><li><i class='fa fa-var-hashtag'></i><span class='i-name'>fa fa-var-hashtag</span></li><li><i class='fa fa-var-hdd-o'></i><span class='i-name'>fa fa-var-hdd-o</span></li><li><i class='fa fa-var-header'></i><span class='i-name'>fa fa-var-header</span></li><li><i class='fa fa-var-headphones'></i><span class='i-name'>fa fa-var-headphones</span></li><li><i class='fa fa-var-heart'></i><span class='i-name'>fa fa-var-heart</span></li><li><i class='fa fa-var-heart-o'></i><span class='i-name'>fa fa-var-heart-o</span></li><li><i class='fa fa-var-heartbeat'></i><span class='i-name'>fa fa-var-heartbeat</span></li><li><i class='fa fa-var-history'></i><span class='i-name'>fa fa-var-history</span></li><li><i class='fa fa-var-home'></i><span class='i-name'>fa fa-var-home</span></li><li><i class='fa fa-var-hospital-o'></i><span class='i-name'>fa fa-var-hospital-o</span></li><li><i class='fa fa-var-hotel'></i><span class='i-name'>fa fa-var-hotel</span></li><li><i class='fa fa-var-hourglass'></i><span class='i-name'>fa fa-var-hourglass</span></li><li><i class='fa fa-var-hourglass-1'></i><span class='i-name'>fa fa-var-hourglass-1</span></li><li><i class='fa fa-var-hourglass-2'></i><span class='i-name'>fa fa-var-hourglass-2</span></li><li><i class='fa fa-var-hourglass-3'></i><span class='i-name'>fa fa-var-hourglass-3</span></li><li><i class='fa fa-var-hourglass-end'></i><span class='i-name'>fa fa-var-hourglass-end</span></li><li><i class='fa fa-var-hourglass-half'></i><span class='i-name'>fa fa-var-hourglass-half</span></li><li><i class='fa fa-var-hourglass-o'></i><span class='i-name'>fa fa-var-hourglass-o</span></li><li><i class='fa fa-var-hourglass-start'></i><span class='i-name'>fa fa-var-hourglass-start</span></li><li><i class='fa fa-var-houzz'></i><span class='i-name'>fa fa-var-houzz</span></li><li><i class='fa fa-var-html5'></i><span class='i-name'>fa fa-var-html5</span></li><li><i class='fa fa-var-i-cursor'></i><span class='i-name'>fa fa-var-i-cursor</span></li><li><i class='fa fa-var-ils'></i><span class='i-name'>fa fa-var-ils</span></li><li><i class='fa fa-var-image'></i><span class='i-name'>fa fa-var-image</span></li><li><i class='fa fa-var-inbox'></i><span class='i-name'>fa fa-var-inbox</span></li><li><i class='fa fa-var-indent'></i><span class='i-name'>fa fa-var-indent</span></li><li><i class='fa fa-var-industry'></i><span class='i-name'>fa fa-var-industry</span></li><li><i class='fa fa-var-info'></i><span class='i-name'>fa fa-var-info</span></li><li><i class='fa fa-var-info-circle'></i><span class='i-name'>fa fa-var-info-circle</span></li><li><i class='fa fa-var-inr'></i><span class='i-name'>fa fa-var-inr</span></li><li><i class='fa fa-var-instagram'></i><span class='i-name'>fa fa-var-instagram</span></li><li><i class='fa fa-var-institution'></i><span class='i-name'>fa fa-var-institution</span></li><li><i class='fa fa-var-internet-explorer'></i><span class='i-name'>fa fa-var-internet-explorer</span></li><li><i class='fa fa-var-intersex'></i><span class='i-name'>fa fa-var-intersex</span></li><li><i class='fa fa-var-ioxhost'></i><span class='i-name'>fa fa-var-ioxhost</span></li><li><i class='fa fa-var-italic'></i><span class='i-name'>fa fa-var-italic</span></li><li><i class='fa fa-var-joomla'></i><span class='i-name'>fa fa-var-joomla</span></li><li><i class='fa fa-var-jpy'></i><span class='i-name'>fa fa-var-jpy</span></li><li><i class='fa fa-var-jsfiddle'></i><span class='i-name'>fa fa-var-jsfiddle</span></li><li><i class='fa fa-var-key'></i><span class='i-name'>fa fa-var-key</span></li><li><i class='fa fa-var-keyboard-o'></i><span class='i-name'>fa fa-var-keyboard-o</span></li><li><i class='fa fa-var-krw'></i><span class='i-name'>fa fa-var-krw</span></li><li><i class='fa fa-var-language'></i><span class='i-name'>fa fa-var-language</span></li><li><i class='fa fa-var-laptop'></i><span class='i-name'>fa fa-var-laptop</span></li><li><i class='fa fa-var-lastfm'></i><span class='i-name'>fa fa-var-lastfm</span></li><li><i class='fa fa-var-lastfm-square'></i><span class='i-name'>fa fa-var-lastfm-square</span></li><li><i class='fa fa-var-leaf'></i><span class='i-name'>fa fa-var-leaf</span></li><li><i class='fa fa-var-leanpub'></i><span class='i-name'>fa fa-var-leanpub</span></li><li><i class='fa fa-var-legal'></i><span class='i-name'>fa fa-var-legal</span></li><li><i class='fa fa-var-lemon-o'></i><span class='i-name'>fa fa-var-lemon-o</span></li><li><i class='fa fa-var-level-down'></i><span class='i-name'>fa fa-var-level-down</span></li><li><i class='fa fa-var-level-up'></i><span class='i-name'>fa fa-var-level-up</span></li><li><i class='fa fa-var-life-bouy'></i><span class='i-name'>fa fa-var-life-bouy</span></li><li><i class='fa fa-var-life-buoy'></i><span class='i-name'>fa fa-var-life-buoy</span></li><li><i class='fa fa-var-life-ring'></i><span class='i-name'>fa fa-var-life-ring</span></li><li><i class='fa fa-var-life-saver'></i><span class='i-name'>fa fa-var-life-saver</span></li><li><i class='fa fa-var-lightbulb-o'></i><span class='i-name'>fa fa-var-lightbulb-o</span></li><li><i class='fa fa-var-line-chart'></i><span class='i-name'>fa fa-var-line-chart</span></li><li><i class='fa fa-var-link'></i><span class='i-name'>fa fa-var-link</span></li><li><i class='fa fa-var-linkedin'></i><span class='i-name'>fa fa-var-linkedin</span></li><li><i class='fa fa-var-linkedin-square'></i><span class='i-name'>fa fa-var-linkedin-square</span></li><li><i class='fa fa-var-linux'></i><span class='i-name'>fa fa-var-linux</span></li><li><i class='fa fa-var-list'></i><span class='i-name'>fa fa-var-list</span></li><li><i class='fa fa-var-list-alt'></i><span class='i-name'>fa fa-var-list-alt</span></li><li><i class='fa fa-var-list-ol'></i><span class='i-name'>fa fa-var-list-ol</span></li><li><i class='fa fa-var-list-ul'></i><span class='i-name'>fa fa-var-list-ul</span></li><li><i class='fa fa-var-location-arrow'></i><span class='i-name'>fa fa-var-location-arrow</span></li><li><i class='fa fa-var-lock'></i><span class='i-name'>fa fa-var-lock</span></li><li><i class='fa fa-var-long-arrow-down'></i><span class='i-name'>fa fa-var-long-arrow-down</span></li><li><i class='fa fa-var-long-arrow-left'></i><span class='i-name'>fa fa-var-long-arrow-left</span></li><li><i class='fa fa-var-long-arrow-right'></i><span class='i-name'>fa fa-var-long-arrow-right</span></li><li><i class='fa fa-var-long-arrow-up'></i><span class='i-name'>fa fa-var-long-arrow-up</span></li><li><i class='fa fa-var-magic'></i><span class='i-name'>fa fa-var-magic</span></li><li><i class='fa fa-var-magnet'></i><span class='i-name'>fa fa-var-magnet</span></li><li><i class='fa fa-var-mail-forward'></i><span class='i-name'>fa fa-var-mail-forward</span></li><li><i class='fa fa-var-mail-reply'></i><span class='i-name'>fa fa-var-mail-reply</span></li><li><i class='fa fa-var-mail-reply-all'></i><span class='i-name'>fa fa-var-mail-reply-all</span></li><li><i class='fa fa-var-male'></i><span class='i-name'>fa fa-var-male</span></li><li><i class='fa fa-var-map'></i><span class='i-name'>fa fa-var-map</span></li><li><i class='fa fa-var-map-marker'></i><span class='i-name'>fa fa-var-map-marker</span></li><li><i class='fa fa-var-map-o'></i><span class='i-name'>fa fa-var-map-o</span></li><li><i class='fa fa-var-map-pin'></i><span class='i-name'>fa fa-var-map-pin</span></li><li><i class='fa fa-var-map-signs'></i><span class='i-name'>fa fa-var-map-signs</span></li><li><i class='fa fa-var-mars'></i><span class='i-name'>fa fa-var-mars</span></li><li><i class='fa fa-var-mars-double'></i><span class='i-name'>fa fa-var-mars-double</span></li><li><i class='fa fa-var-mars-stroke'></i><span class='i-name'>fa fa-var-mars-stroke</span></li><li><i class='fa fa-var-mars-stroke-h'></i><span class='i-name'>fa fa-var-mars-stroke-h</span></li><li><i class='fa fa-var-mars-stroke-v'></i><span class='i-name'>fa fa-var-mars-stroke-v</span></li><li><i class='fa fa-var-maxcdn'></i><span class='i-name'>fa fa-var-maxcdn</span></li><li><i class='fa fa-var-meanpath'></i><span class='i-name'>fa fa-var-meanpath</span></li><li><i class='fa fa-var-medium'></i><span class='i-name'>fa fa-var-medium</span></li><li><i class='fa fa-var-medkit'></i><span class='i-name'>fa fa-var-medkit</span></li><li><i class='fa fa-var-meh-o'></i><span class='i-name'>fa fa-var-meh-o</span></li><li><i class='fa fa-var-mercury'></i><span class='i-name'>fa fa-var-mercury</span></li><li><i class='fa fa-var-microphone'></i><span class='i-name'>fa fa-var-microphone</span></li><li><i class='fa fa-var-microphone-slash'></i><span class='i-name'>fa fa-var-microphone-slash</span></li><li><i class='fa fa-var-minus'></i><span class='i-name'>fa fa-var-minus</span></li><li><i class='fa fa-var-minus-circle'></i><span class='i-name'>fa fa-var-minus-circle</span></li><li><i class='fa fa-var-minus-square'></i><span class='i-name'>fa fa-var-minus-square</span></li><li><i class='fa fa-var-minus-square-o'></i><span class='i-name'>fa fa-var-minus-square-o</span></li><li><i class='fa fa-var-mixcloud'></i><span class='i-name'>fa fa-var-mixcloud</span></li><li><i class='fa fa-var-mobile'></i><span class='i-name'>fa fa-var-mobile</span></li><li><i class='fa fa-var-mobile-phone'></i><span class='i-name'>fa fa-var-mobile-phone</span></li><li><i class='fa fa-var-modx'></i><span class='i-name'>fa fa-var-modx</span></li><li><i class='fa fa-var-money'></i><span class='i-name'>fa fa-var-money</span></li><li><i class='fa fa-var-moon-o'></i><span class='i-name'>fa fa-var-moon-o</span></li><li><i class='fa fa-var-mortar-board'></i><span class='i-name'>fa fa-var-mortar-board</span></li><li><i class='fa fa-var-motorcycle'></i><span class='i-name'>fa fa-var-motorcycle</span></li><li><i class='fa fa-var-mouse-pointer'></i><span class='i-name'>fa fa-var-mouse-pointer</span></li><li><i class='fa fa-var-music'></i><span class='i-name'>fa fa-var-music</span></li><li><i class='fa fa-var-navicon'></i><span class='i-name'>fa fa-var-navicon</span></li><li><i class='fa fa-var-neuter'></i><span class='i-name'>fa fa-var-neuter</span></li><li><i class='fa fa-var-newspaper-o'></i><span class='i-name'>fa fa-var-newspaper-o</span></li><li><i class='fa fa-var-object-group'></i><span class='i-name'>fa fa-var-object-group</span></li><li><i class='fa fa-var-object-ungroup'></i><span class='i-name'>fa fa-var-object-ungroup</span></li><li><i class='fa fa-var-odnoklassniki'></i><span class='i-name'>fa fa-var-odnoklassniki</span></li><li><i class='fa fa-var-odnoklassniki-square'></i><span class='i-name'>fa fa-var-odnoklassniki-square</span></li><li><i class='fa fa-var-opencart'></i><span class='i-name'>fa fa-var-opencart</span></li><li><i class='fa fa-var-openid'></i><span class='i-name'>fa fa-var-openid</span></li><li><i class='fa fa-var-opera'></i><span class='i-name'>fa fa-var-opera</span></li><li><i class='fa fa-var-optin-monster'></i><span class='i-name'>fa fa-var-optin-monster</span></li><li><i class='fa fa-var-outdent'></i><span class='i-name'>fa fa-var-outdent</span></li><li><i class='fa fa-var-pagelines'></i><span class='i-name'>fa fa-var-pagelines</span></li><li><i class='fa fa-var-paint-brush'></i><span class='i-name'>fa fa-var-paint-brush</span></li><li><i class='fa fa-var-paper-plane'></i><span class='i-name'>fa fa-var-paper-plane</span></li><li><i class='fa fa-var-paper-plane-o'></i><span class='i-name'>fa fa-var-paper-plane-o</span></li><li><i class='fa fa-var-paperclip'></i><span class='i-name'>fa fa-var-paperclip</span></li><li><i class='fa fa-var-paragraph'></i><span class='i-name'>fa fa-var-paragraph</span></li><li><i class='fa fa-var-paste'></i><span class='i-name'>fa fa-var-paste</span></li><li><i class='fa fa-var-pause'></i><span class='i-name'>fa fa-var-pause</span></li><li><i class='fa fa-var-pause-circle'></i><span class='i-name'>fa fa-var-pause-circle</span></li><li><i class='fa fa-var-pause-circle-o'></i><span class='i-name'>fa fa-var-pause-circle-o</span></li><li><i class='fa fa-var-paw'></i><span class='i-name'>fa fa-var-paw</span></li><li><i class='fa fa-var-paypal'></i><span class='i-name'>fa fa-var-paypal</span></li><li><i class='fa fa-var-pencil'></i><span class='i-name'>fa fa-var-pencil</span></li><li><i class='fa fa-var-pencil-square'></i><span class='i-name'>fa fa-var-pencil-square</span></li><li><i class='fa fa-var-pencil-square-o'></i><span class='i-name'>fa fa-var-pencil-square-o</span></li><li><i class='fa fa-var-percent'></i><span class='i-name'>fa fa-var-percent</span></li><li><i class='fa fa-var-phone'></i><span class='i-name'>fa fa-var-phone</span></li><li><i class='fa fa-var-phone-square'></i><span class='i-name'>fa fa-var-phone-square</span></li><li><i class='fa fa-var-photo'></i><span class='i-name'>fa fa-var-photo</span></li><li><i class='fa fa-var-picture-o'></i><span class='i-name'>fa fa-var-picture-o</span></li><li><i class='fa fa-var-pie-chart'></i><span class='i-name'>fa fa-var-pie-chart</span></li><li><i class='fa fa-var-pied-piper'></i><span class='i-name'>fa fa-var-pied-piper</span></li><li><i class='fa fa-var-pied-piper-alt'></i><span class='i-name'>fa fa-var-pied-piper-alt</span></li><li><i class='fa fa-var-pinterest'></i><span class='i-name'>fa fa-var-pinterest</span></li><li><i class='fa fa-var-pinterest-p'></i><span class='i-name'>fa fa-var-pinterest-p</span></li><li><i class='fa fa-var-pinterest-square'></i><span class='i-name'>fa fa-var-pinterest-square</span></li><li><i class='fa fa-var-plane'></i><span class='i-name'>fa fa-var-plane</span></li><li><i class='fa fa-var-play'></i><span class='i-name'>fa fa-var-play</span></li><li><i class='fa fa-var-play-circle'></i><span class='i-name'>fa fa-var-play-circle</span></li><li><i class='fa fa-var-play-circle-o'></i><span class='i-name'>fa fa-var-play-circle-o</span></li><li><i class='fa fa-var-plug'></i><span class='i-name'>fa fa-var-plug</span></li><li><i class='fa fa-var-plus'></i><span class='i-name'>fa fa-var-plus</span></li><li><i class='fa fa-var-plus-circle'></i><span class='i-name'>fa fa-var-plus-circle</span></li><li><i class='fa fa-var-plus-square'></i><span class='i-name'>fa fa-var-plus-square</span></li><li><i class='fa fa-var-plus-square-o'></i><span class='i-name'>fa fa-var-plus-square-o</span></li><li><i class='fa fa-var-power-off'></i><span class='i-name'>fa fa-var-power-off</span></li><li><i class='fa fa-var-print'></i><span class='i-name'>fa fa-var-print</span></li><li><i class='fa fa-var-product-hunt'></i><span class='i-name'>fa fa-var-product-hunt</span></li><li><i class='fa fa-var-puzzle-piece'></i><span class='i-name'>fa fa-var-puzzle-piece</span></li><li><i class='fa fa-var-qq'></i><span class='i-name'>fa fa-var-qq</span></li><li><i class='fa fa-var-qrcode'></i><span class='i-name'>fa fa-var-qrcode</span></li><li><i class='fa fa-var-question'></i><span class='i-name'>fa fa-var-question</span></li><li><i class='fa fa-var-question-circle'></i><span class='i-name'>fa fa-var-question-circle</span></li><li><i class='fa fa-var-quote-left'></i><span class='i-name'>fa fa-var-quote-left</span></li><li><i class='fa fa-var-quote-right'></i><span class='i-name'>fa fa-var-quote-right</span></li><li><i class='fa fa-var-ra'></i><span class='i-name'>fa fa-var-ra</span></li><li><i class='fa fa-var-random'></i><span class='i-name'>fa fa-var-random</span></li><li><i class='fa fa-var-rebel'></i><span class='i-name'>fa fa-var-rebel</span></li><li><i class='fa fa-var-recycle'></i><span class='i-name'>fa fa-var-recycle</span></li><li><i class='fa fa-var-reddit'></i><span class='i-name'>fa fa-var-reddit</span></li><li><i class='fa fa-var-reddit-alien'></i><span class='i-name'>fa fa-var-reddit-alien</span></li><li><i class='fa fa-var-reddit-square'></i><span class='i-name'>fa fa-var-reddit-square</span></li><li><i class='fa fa-var-refresh'></i><span class='i-name'>fa fa-var-refresh</span></li><li><i class='fa fa-var-registered'></i><span class='i-name'>fa fa-var-registered</span></li><li><i class='fa fa-var-remove'></i><span class='i-name'>fa fa-var-remove</span></li><li><i class='fa fa-var-renren'></i><span class='i-name'>fa fa-var-renren</span></li><li><i class='fa fa-var-reorder'></i><span class='i-name'>fa fa-var-reorder</span></li><li><i class='fa fa-var-repeat'></i><span class='i-name'>fa fa-var-repeat</span></li><li><i class='fa fa-var-reply'></i><span class='i-name'>fa fa-var-reply</span></li><li><i class='fa fa-var-reply-all'></i><span class='i-name'>fa fa-var-reply-all</span></li><li><i class='fa fa-var-retweet'></i><span class='i-name'>fa fa-var-retweet</span></li><li><i class='fa fa-var-rmb'></i><span class='i-name'>fa fa-var-rmb</span></li><li><i class='fa fa-var-road'></i><span class='i-name'>fa fa-var-road</span></li><li><i class='fa fa-var-rocket'></i><span class='i-name'>fa fa-var-rocket</span></li><li><i class='fa fa-var-rotate-left'></i><span class='i-name'>fa fa-var-rotate-left</span></li><li><i class='fa fa-var-rotate-right'></i><span class='i-name'>fa fa-var-rotate-right</span></li><li><i class='fa fa-var-rouble'></i><span class='i-name'>fa fa-var-rouble</span></li><li><i class='fa fa-var-rss'></i><span class='i-name'>fa fa-var-rss</span></li><li><i class='fa fa-var-rss-square'></i><span class='i-name'>fa fa-var-rss-square</span></li><li><i class='fa fa-var-rub'></i><span class='i-name'>fa fa-var-rub</span></li><li><i class='fa fa-var-ruble'></i><span class='i-name'>fa fa-var-ruble</span></li><li><i class='fa fa-var-rupee'></i><span class='i-name'>fa fa-var-rupee</span></li><li><i class='fa fa-var-safari'></i><span class='i-name'>fa fa-var-safari</span></li><li><i class='fa fa-var-save'></i><span class='i-name'>fa fa-var-save</span></li><li><i class='fa fa-var-scissors'></i><span class='i-name'>fa fa-var-scissors</span></li><li><i class='fa fa-var-scribd'></i><span class='i-name'>fa fa-var-scribd</span></li><li><i class='fa fa-var-search'></i><span class='i-name'>fa fa-var-search</span></li><li><i class='fa fa-var-search-minus'></i><span class='i-name'>fa fa-var-search-minus</span></li><li><i class='fa fa-var-search-plus'></i><span class='i-name'>fa fa-var-search-plus</span></li><li><i class='fa fa-var-sellsy'></i><span class='i-name'>fa fa-var-sellsy</span></li><li><i class='fa fa-var-send'></i><span class='i-name'>fa fa-var-send</span></li><li><i class='fa fa-var-send-o'></i><span class='i-name'>fa fa-var-send-o</span></li><li><i class='fa fa-var-server'></i><span class='i-name'>fa fa-var-server</span></li><li><i class='fa fa-var-share'></i><span class='i-name'>fa fa-var-share</span></li><li><i class='fa fa-var-share-alt'></i><span class='i-name'>fa fa-var-share-alt</span></li><li><i class='fa fa-var-share-alt-square'></i><span class='i-name'>fa fa-var-share-alt-square</span></li><li><i class='fa fa-var-share-square'></i><span class='i-name'>fa fa-var-share-square</span></li><li><i class='fa fa-var-share-square-o'></i><span class='i-name'>fa fa-var-share-square-o</span></li><li><i class='fa fa-var-shekel'></i><span class='i-name'>fa fa-var-shekel</span></li><li><i class='fa fa-var-sheqel'></i><span class='i-name'>fa fa-var-sheqel</span></li><li><i class='fa fa-var-shield'></i><span class='i-name'>fa fa-var-shield</span></li><li><i class='fa fa-var-ship'></i><span class='i-name'>fa fa-var-ship</span></li><li><i class='fa fa-var-shirtsinbulk'></i><span class='i-name'>fa fa-var-shirtsinbulk</span></li><li><i class='fa fa-var-shopping-bag'></i><span class='i-name'>fa fa-var-shopping-bag</span></li><li><i class='fa fa-var-shopping-basket'></i><span class='i-name'>fa fa-var-shopping-basket</span></li><li><i class='fa fa-var-shopping-cart'></i><span class='i-name'>fa fa-var-shopping-cart</span></li><li><i class='fa fa-var-sign-in'></i><span class='i-name'>fa fa-var-sign-in</span></li><li><i class='fa fa-var-sign-out'></i><span class='i-name'>fa fa-var-sign-out</span></li><li><i class='fa fa-var-signal'></i><span class='i-name'>fa fa-var-signal</span></li><li><i class='fa fa-var-simplybuilt'></i><span class='i-name'>fa fa-var-simplybuilt</span></li><li><i class='fa fa-var-sitemap'></i><span class='i-name'>fa fa-var-sitemap</span></li><li><i class='fa fa-var-skyatlas'></i><span class='i-name'>fa fa-var-skyatlas</span></li><li><i class='fa fa-var-skype'></i><span class='i-name'>fa fa-var-skype</span></li><li><i class='fa fa-var-slack'></i><span class='i-name'>fa fa-var-slack</span></li><li><i class='fa fa-var-sliders'></i><span class='i-name'>fa fa-var-sliders</span></li><li><i class='fa fa-var-slideshare'></i><span class='i-name'>fa fa-var-slideshare</span></li><li><i class='fa fa-var-smile-o'></i><span class='i-name'>fa fa-var-smile-o</span></li><li><i class='fa fa-var-soccer-ball-o'></i><span class='i-name'>fa fa-var-soccer-ball-o</span></li><li><i class='fa fa-var-sort'></i><span class='i-name'>fa fa-var-sort</span></li><li><i class='fa fa-var-sort-alpha-asc'></i><span class='i-name'>fa fa-var-sort-alpha-asc</span></li><li><i class='fa fa-var-sort-alpha-desc'></i><span class='i-name'>fa fa-var-sort-alpha-desc</span></li><li><i class='fa fa-var-sort-amount-asc'></i><span class='i-name'>fa fa-var-sort-amount-asc</span></li><li><i class='fa fa-var-sort-amount-desc'></i><span class='i-name'>fa fa-var-sort-amount-desc</span></li><li><i class='fa fa-var-sort-asc'></i><span class='i-name'>fa fa-var-sort-asc</span></li><li><i class='fa fa-var-sort-desc'></i><span class='i-name'>fa fa-var-sort-desc</span></li><li><i class='fa fa-var-sort-down'></i><span class='i-name'>fa fa-var-sort-down</span></li><li><i class='fa fa-var-sort-numeric-asc'></i><span class='i-name'>fa fa-var-sort-numeric-asc</span></li><li><i class='fa fa-var-sort-numeric-desc'></i><span class='i-name'>fa fa-var-sort-numeric-desc</span></li><li><i class='fa fa-var-sort-up'></i><span class='i-name'>fa fa-var-sort-up</span></li><li><i class='fa fa-var-soundcloud'></i><span class='i-name'>fa fa-var-soundcloud</span></li><li><i class='fa fa-var-space-shuttle'></i><span class='i-name'>fa fa-var-space-shuttle</span></li><li><i class='fa fa-var-spinner'></i><span class='i-name'>fa fa-var-spinner</span></li><li><i class='fa fa-var-spoon'></i><span class='i-name'>fa fa-var-spoon</span></li><li><i class='fa fa-var-spotify'></i><span class='i-name'>fa fa-var-spotify</span></li><li><i class='fa fa-var-square'></i><span class='i-name'>fa fa-var-square</span></li><li><i class='fa fa-var-square-o'></i><span class='i-name'>fa fa-var-square-o</span></li><li><i class='fa fa-var-stack-exchange'></i><span class='i-name'>fa fa-var-stack-exchange</span></li><li><i class='fa fa-var-stack-overflow'></i><span class='i-name'>fa fa-var-stack-overflow</span></li><li><i class='fa fa-var-star'></i><span class='i-name'>fa fa-var-star</span></li><li><i class='fa fa-var-star-half'></i><span class='i-name'>fa fa-var-star-half</span></li><li><i class='fa fa-var-star-half-empty'></i><span class='i-name'>fa fa-var-star-half-empty</span></li><li><i class='fa fa-var-star-half-full'></i><span class='i-name'>fa fa-var-star-half-full</span></li><li><i class='fa fa-var-star-half-o'></i><span class='i-name'>fa fa-var-star-half-o</span></li><li><i class='fa fa-var-star-o'></i><span class='i-name'>fa fa-var-star-o</span></li><li><i class='fa fa-var-steam'></i><span class='i-name'>fa fa-var-steam</span></li><li><i class='fa fa-var-steam-square'></i><span class='i-name'>fa fa-var-steam-square</span></li><li><i class='fa fa-var-step-backward'></i><span class='i-name'>fa fa-var-step-backward</span></li><li><i class='fa fa-var-step-forward'></i><span class='i-name'>fa fa-var-step-forward</span></li><li><i class='fa fa-var-stethoscope'></i><span class='i-name'>fa fa-var-stethoscope</span></li><li><i class='fa fa-var-sticky-note'></i><span class='i-name'>fa fa-var-sticky-note</span></li><li><i class='fa fa-var-sticky-note-o'></i><span class='i-name'>fa fa-var-sticky-note-o</span></li><li><i class='fa fa-var-stop'></i><span class='i-name'>fa fa-var-stop</span></li><li><i class='fa fa-var-stop-circle'></i><span class='i-name'>fa fa-var-stop-circle</span></li><li><i class='fa fa-var-stop-circle-o'></i><span class='i-name'>fa fa-var-stop-circle-o</span></li><li><i class='fa fa-var-street-view'></i><span class='i-name'>fa fa-var-street-view</span></li><li><i class='fa fa-var-strikethrough'></i><span class='i-name'>fa fa-var-strikethrough</span></li><li><i class='fa fa-var-stumbleupon'></i><span class='i-name'>fa fa-var-stumbleupon</span></li><li><i class='fa fa-var-stumbleupon-circle'></i><span class='i-name'>fa fa-var-stumbleupon-circle</span></li><li><i class='fa fa-var-subscript'></i><span class='i-name'>fa fa-var-subscript</span></li><li><i class='fa fa-var-subway'></i><span class='i-name'>fa fa-var-subway</span></li><li><i class='fa fa-var-suitcase'></i><span class='i-name'>fa fa-var-suitcase</span></li><li><i class='fa fa-var-sun-o'></i><span class='i-name'>fa fa-var-sun-o</span></li><li><i class='fa fa-var-superscript'></i><span class='i-name'>fa fa-var-superscript</span></li><li><i class='fa fa-var-support'></i><span class='i-name'>fa fa-var-support</span></li><li><i class='fa fa-var-table'></i><span class='i-name'>fa fa-var-table</span></li><li><i class='fa fa-var-tablet'></i><span class='i-name'>fa fa-var-tablet</span></li><li><i class='fa fa-var-tachometer'></i><span class='i-name'>fa fa-var-tachometer</span></li><li><i class='fa fa-var-tag'></i><span class='i-name'>fa fa-var-tag</span></li><li><i class='fa fa-var-tags'></i><span class='i-name'>fa fa-var-tags</span></li><li><i class='fa fa-var-tasks'></i><span class='i-name'>fa fa-var-tasks</span></li><li><i class='fa fa-var-taxi'></i><span class='i-name'>fa fa-var-taxi</span></li><li><i class='fa fa-var-television'></i><span class='i-name'>fa fa-var-television</span></li><li><i class='fa fa-var-tencent-weibo'></i><span class='i-name'>fa fa-var-tencent-weibo</span></li><li><i class='fa fa-var-terminal'></i><span class='i-name'>fa fa-var-terminal</span></li><li><i class='fa fa-var-text-height'></i><span class='i-name'>fa fa-var-text-height</span></li><li><i class='fa fa-var-text-width'></i><span class='i-name'>fa fa-var-text-width</span></li><li><i class='fa fa-var-th'></i><span class='i-name'>fa fa-var-th</span></li><li><i class='fa fa-var-th-large'></i><span class='i-name'>fa fa-var-th-large</span></li><li><i class='fa fa-var-th-list'></i><span class='i-name'>fa fa-var-th-list</span></li><li><i class='fa fa-var-thumb-tack'></i><span class='i-name'>fa fa-var-thumb-tack</span></li><li><i class='fa fa-var-thumbs-down'></i><span class='i-name'>fa fa-var-thumbs-down</span></li><li><i class='fa fa-var-thumbs-o-down'></i><span class='i-name'>fa fa-var-thumbs-o-down</span></li><li><i class='fa fa-var-thumbs-o-up'></i><span class='i-name'>fa fa-var-thumbs-o-up</span></li><li><i class='fa fa-var-thumbs-up'></i><span class='i-name'>fa fa-var-thumbs-up</span></li><li><i class='fa fa-var-ticket'></i><span class='i-name'>fa fa-var-ticket</span></li><li><i class='fa fa-var-times'></i><span class='i-name'>fa fa-var-times</span></li><li><i class='fa fa-var-times-circle'></i><span class='i-name'>fa fa-var-times-circle</span></li><li><i class='fa fa-var-times-circle-o'></i><span class='i-name'>fa fa-var-times-circle-o</span></li><li><i class='fa fa-var-tint'></i><span class='i-name'>fa fa-var-tint</span></li><li><i class='fa fa-var-toggle-down'></i><span class='i-name'>fa fa-var-toggle-down</span></li><li><i class='fa fa-var-toggle-left'></i><span class='i-name'>fa fa-var-toggle-left</span></li><li><i class='fa fa-var-toggle-off'></i><span class='i-name'>fa fa-var-toggle-off</span></li><li><i class='fa fa-var-toggle-on'></i><span class='i-name'>fa fa-var-toggle-on</span></li><li><i class='fa fa-var-toggle-right'></i><span class='i-name'>fa fa-var-toggle-right</span></li><li><i class='fa fa-var-toggle-up'></i><span class='i-name'>fa fa-var-toggle-up</span></li><li><i class='fa fa-var-trademark'></i><span class='i-name'>fa fa-var-trademark</span></li><li><i class='fa fa-var-train'></i><span class='i-name'>fa fa-var-train</span></li><li><i class='fa fa-var-transgender'></i><span class='i-name'>fa fa-var-transgender</span></li><li><i class='fa fa-var-transgender-alt'></i><span class='i-name'>fa fa-var-transgender-alt</span></li><li><i class='fa fa-var-trash'></i><span class='i-name'>fa fa-var-trash</span></li><li><i class='fa fa-var-trash-o'></i><span class='i-name'>fa fa-var-trash-o</span></li><li><i class='fa fa-var-tree'></i><span class='i-name'>fa fa-var-tree</span></li><li><i class='fa fa-var-trello'></i><span class='i-name'>fa fa-var-trello</span></li><li><i class='fa fa-var-tripadvisor'></i><span class='i-name'>fa fa-var-tripadvisor</span></li><li><i class='fa fa-var-trophy'></i><span class='i-name'>fa fa-var-trophy</span></li><li><i class='fa fa-var-truck'></i><span class='i-name'>fa fa-var-truck</span></li><li><i class='fa fa-var-try'></i><span class='i-name'>fa fa-var-try</span></li><li><i class='fa fa-var-tty'></i><span class='i-name'>fa fa-var-tty</span></li><li><i class='fa fa-var-tumblr'></i><span class='i-name'>fa fa-var-tumblr</span></li><li><i class='fa fa-var-tumblr-square'></i><span class='i-name'>fa fa-var-tumblr-square</span></li><li><i class='fa fa-var-turkish-lira'></i><span class='i-name'>fa fa-var-turkish-lira</span></li><li><i class='fa fa-var-tv'></i><span class='i-name'>fa fa-var-tv</span></li><li><i class='fa fa-var-twitch'></i><span class='i-name'>fa fa-var-twitch</span></li><li><i class='fa fa-var-twitter'></i><span class='i-name'>fa fa-var-twitter</span></li><li><i class='fa fa-var-twitter-square'></i><span class='i-name'>fa fa-var-twitter-square</span></li><li><i class='fa fa-var-umbrella'></i><span class='i-name'>fa fa-var-umbrella</span></li><li><i class='fa fa-var-underline'></i><span class='i-name'>fa fa-var-underline</span></li><li><i class='fa fa-var-undo'></i><span class='i-name'>fa fa-var-undo</span></li><li><i class='fa fa-var-university'></i><span class='i-name'>fa fa-var-university</span></li><li><i class='fa fa-var-unlink'></i><span class='i-name'>fa fa-var-unlink</span></li><li><i class='fa fa-var-unlock'></i><span class='i-name'>fa fa-var-unlock</span></li><li><i class='fa fa-var-unlock-alt'></i><span class='i-name'>fa fa-var-unlock-alt</span></li><li><i class='fa fa-var-unsorted'></i><span class='i-name'>fa fa-var-unsorted</span></li><li><i class='fa fa-var-upload'></i><span class='i-name'>fa fa-var-upload</span></li><li><i class='fa fa-var-usb'></i><span class='i-name'>fa fa-var-usb</span></li><li><i class='fa fa-var-usd'></i><span class='i-name'>fa fa-var-usd</span></li><li><i class='fa fa-var-user'></i><span class='i-name'>fa fa-var-user</span></li><li><i class='fa fa-var-user-md'></i><span class='i-name'>fa fa-var-user-md</span></li><li><i class='fa fa-var-user-plus'></i><span class='i-name'>fa fa-var-user-plus</span></li><li><i class='fa fa-var-user-secret'></i><span class='i-name'>fa fa-var-user-secret</span></li><li><i class='fa fa-var-user-times'></i><span class='i-name'>fa fa-var-user-times</span></li><li><i class='fa fa-var-users'></i><span class='i-name'>fa fa-var-users</span></li><li><i class='fa fa-var-venus'></i><span class='i-name'>fa fa-var-venus</span></li><li><i class='fa fa-var-venus-double'></i><span class='i-name'>fa fa-var-venus-double</span></li><li><i class='fa fa-var-venus-mars'></i><span class='i-name'>fa fa-var-venus-mars</span></li></ul>";
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        echo '<input type="text" class="capture-input vibe-form-text vibe-input" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" />' . "\n";
                        echo $desc;
                        break;
                    case 'icon':
                        echo '<ul class="the-icons unstyled"><li><i class="fa fa-var-adn"></i><span class="i-name">fa fa-var-adn</span></li><li><i class="icon-elusive-icons-1"></i><span class="i-name">icon-elusive-icons-1</span></li><li><i class="icon-elusive-icons-2"></i><span class="i-name">icon-elusive-icons-2</span></li><li><i class="icon-elusive-icons-3"></i><span class="i-name">icon-elusive-icons-3</span></li><li><i class="icon-elusive-icons-4"></i><span class="i-name">icon-elusive-icons-4</span></li><li><i class="icon-elusive-icons-5"></i><span class="i-name">icon-elusive-icons-5</span></li><li><i class="icon-elusive-icons-6"></i><span class="i-name">icon-elusive-icons-6</span></li><li><i class="icon-elusive-icons-7"></i><span class="i-name">icon-elusive-icons-7</span></li><li><i class="icon-crown"></i><span class="i-name">icon-crown</span></li><li><i class="icon-burst"></i><span class="i-name">icon-burst</span></li><li><i class="icon-anchor"></i><span class="i-name">icon-anchor</span></li><li><i class="icon-dollar"></i><span class="i-name">icon-dollar</span></li><li><i class="icon-dollar-bill"></i><span class="i-name">icon-dollar-bill</span></li><li><i class="icon-foot"></i><span class="i-name">icon-foot</span></li><li><i class="icon-hearing-aid"></i><span class="i-name">icon-hearing-aid</span></li><li><i class="icon-guide-dog"></i><span class="i-name">icon-guide-dog</span></li><li><i class="icon-first-aid"></i><span class="i-name">icon-first-aid</span></li><li><i class="icon-paint-bucket"></i><span class="i-name">icon-paint-bucket</span></li><li><i class="icon-pencil"></i><span class="i-name">icon-pencil</span></li><li><i class="icon-paw"></i><span class="i-name">icon-paw</span></li><li><i class="icon-paperclip"></i><span class="i-name">icon-paperclip</span></li><li><i class="icon-pound"></i><span class="i-name">icon-pound</span></li><li><i class="icon-shopping-cart"></i><span class="i-name">icon-shopping-cart</span></li><li><i class="icon-sheriff-badge"></i><span class="i-name">icon-sheriff-badge</span></li><li><i class="icon-shield"></i><span class="i-name">icon-shield</span></li><li><i class="icon-trees"></i><span class="i-name">icon-trees</span></li><li><i class="icon-trophy"></i><span class="i-name">icon-trophy</span></li><li><i class="icon-fontawesome-webfont"></i><span class="i-name">icon-fontawesome-webfont</span></li><li><i class="icon-fontawesome-webfont-1"></i><span class="i-name">icon-fontawesome-webfont-1</span></li><li><i class="icon-address"></i><span class="i-name">icon-address</span></li><li><i class="icon-adjust"></i><span class="i-name">icon-adjust</span></li><li><i class="icon-air"></i><span class="i-name">icon-air</span></li><li><i class="icon-alert"></i><span class="i-name">icon-alert</span></li><li><i class="icon-archive"></i><span class="i-name">icon-archive</span></li><li><i class="icon-battery"></i><span class="i-name">icon-battery</span></li><li><i class="icon-behance"></i><span class="i-name">icon-behance</span></li><li><i class="icon-bell"></i><span class="i-name">icon-bell</span></li><li><i class="icon-block"></i><span class="i-name">icon-block</span></li><li><i class="icon-book"></i><span class="i-name">icon-book</span></li><li><i class="icon-camera"></i><span class="i-name">icon-camera</span></li><li><i class="icon-cancel"></i><span class="i-name">icon-cancel</span></li><li><i class="icon-cancel-circled"></i><span class="i-name">icon-cancel-circled</span></li><li><i class="icon-cancel-squared"></i><span class="i-name">icon-cancel-squared</span></li><li><i class="icon-cc"></i><span class="i-name">icon-cc</span></li><li><i class="icon-cc-share"></i><span class="i-name">icon-cc-share</span></li><li><i class="icon-cc-zero"></i><span class="i-name">icon-cc-zero</span></li><li><i class="icon-ccw"></i><span class="i-name">icon-ccw</span></li><li><i class="icon-cd"></i><span class="i-name">icon-cd</span></li><li><i class="icon-chart-area"></i><span class="i-name">icon-chart-area</span></li><li><i class="icon-screen"></i><span class="i-name">icon-screen</span></li><li><i class="icon-delicious"></i><span class="i-name">icon-delicious</span></li><li><i class="icon-instagram"></i><span class="i-name">icon-instagram</span></li><li><i class="icon-alarm"></i><span class="i-name">icon-alarm</span></li><li><i class="icon-envelope"></i><span class="i-name">icon-envelope</span></li><li><i class="icon-chat"></i><span class="i-name">icon-chat</span></li><li><i class="icon-inbox-alt"></i><span class="i-name">icon-inbox-alt</span></li><li><i class="icon-calculator"></i><span class="i-name">icon-calculator</span></li><li><i class="icon-camera-1"></i><span class="i-name">icon-camera-1</span></li><li><i class="icon-brightness-half"></i><span class="i-name">icon-brightness-half</span></li><li><i class="icon-list"></i><span class="i-name">icon-list</span></li><li><i class="icon-spinner"></i><span class="i-name">icon-spinner</span></li><li><i class="icon-windows"></i><span class="i-name">icon-windows</span></li><li><i class="icon-comments"></i><span class="i-name">icon-comments</span></li><li><i class="icon-rewind"></i><span class="i-name">icon-rewind</span></li><li><i class="icon-light-bulb"></i><span class="i-name">icon-light-bulb</span></li><li><i class="icon-iphone"></i><span class="i-name">icon-iphone</span></li><li><i class="icon-heart"></i><span class="i-name">icon-heart</span></li><li><i class="icon-calendar"></i><span class="i-name">icon-calendar</span></li><li><i class="icon-task"></i><span class="i-name">icon-task</span></li><li><i class="icon-store"></i><span class="i-name">icon-store</span></li><li><i class="icon-sound"></i><span class="i-name">icon-sound</span></li><li><i class="icon-fork-and-spoon"></i><span class="i-name">icon-fork-and-spoon</span></li><li><i class="icon-grid"></i><span class="i-name">icon-grid</span></li><li><i class="icon-portfolio"></i><span class="i-name">icon-portfolio</span></li><li><i class="icon-pin-alt"></i><span class="i-name">icon-pin-alt</span></li><li><i class="icon-question"></i><span class="i-name">icon-question</span></li><li><i class="icon-cmd"></i><span class="i-name">icon-cmd</span></li><li><i class="icon-newspaper-alt"></i><span class="i-name">icon-newspaper-alt</span></li><li><i class="icon-moon"></i><span class="i-name">icon-moon</span></li><li><i class="icon-home"></i><span class="i-name">icon-home</span></li><li><i class="icon-sound-alt"></i><span class="i-name">icon-sound-alt</span></li><li><i class="icon-sound-off"></i><span class="i-name">icon-sound-off</span></li><li><i class="icon-ipad"></i><span class="i-name">icon-ipad</span></li><li><i class="icon-stop"></i><span class="i-name">icon-stop</span></li><li><i class="icon-circle-full"></i><span class="i-name">icon-circle-full</span></li><li><i class="icon-forward"></i><span class="i-name">icon-forward</span></li><li><i class="icon-exclamation"></i><span class="i-name">icon-exclamation</span></li><li><i class="icon-settings"></i><span class="i-name">icon-settings</span></li><li><i class="icon-newspaper"></i><span class="i-name">icon-newspaper</span></li><li><i class="icon-grid-alt"></i><span class="i-name">icon-grid-alt</span></li><li><i class="icon-clock"></i><span class="i-name">icon-clock</span></li><li><i class="icon-pause"></i><span class="i-name">icon-pause</span></li><li><i class="icon-globe"></i><span class="i-name">icon-globe</span></li><li><i class="icon-clipboard"></i><span class="i-name">icon-clipboard</span></li><li><i class="icon-attachment"></i><span class="i-name">icon-attachment</span></li><li><i class="icon-forbid-1"></i><span class="i-name">icon-forbid-1</span></li><li><i class="icon-circle-half"></i><span class="i-name">icon-circle-half</span></li><li><i class="icon-inbox"></i><span class="i-name">icon-inbox</span></li><li><i class="icon-fork-and-knife"></i><span class="i-name">icon-fork-and-knife</span></li><li><i class="icon-brightness"></i><span class="i-name">icon-brightness</span></li><li><i class="icon-browser"></i><span class="i-name">icon-browser</span></li><li><i class="icon-hyperlink"></i><span class="i-name">icon-hyperlink</span></li><li><i class="icon-in-alt"></i><span class="i-name">icon-in-alt</span></li><li><i class="icon-menu"></i><span class="i-name">icon-menu</span></li><li><i class="icon-compose"></i><span class="i-name">icon-compose</span></li><li><i class="icon-anchor-1"></i><span class="i-name">icon-anchor-1</span></li><li><i class="icon-gallary"></i><span class="i-name">icon-gallary</span></li><li><i class="icon-cloud"></i><span class="i-name">icon-cloud</span></li><li><i class="icon-pin"></i><span class="i-name">icon-pin</span></li><li><i class="icon-play"></i><span class="i-name">icon-play</span></li><li><i class="icon-tag-stroke"></i><span class="i-name">icon-tag-stroke</span></li><li><i class="icon-tag-fill"></i><span class="i-name">icon-tag-fill</span></li><li><i class="icon-brush"></i><span class="i-name">icon-brush</span></li><li><i class="icon-bars"></i><span class="i-name">icon-bars</span></li><li><i class="icon-eject"></i><span class="i-name">icon-eject</span></li><li><i class="icon-book-1"></i><span class="i-name">icon-book-1</span></li><li><i class="icon-chart"></i><span class="i-name">icon-chart</span></li><li><i class="icon-key-fill"></i><span class="i-name">icon-key-fill</span></li><li><i class="icon-aperture-alt"></i><span class="i-name">icon-aperture-alt</span></li><li><i class="icon-book-alt"></i><span class="i-name">icon-book-alt</span></li><li><i class="icon-list-1"></i><span class="i-name">icon-list-1</span></li><li><i class="icon-map-pin-fill"></i><span class="i-name">icon-map-pin-fill</span></li><li><i class="icon-move-horizontal-alt1"></i><span class="i-name">icon-move-horizontal-alt1</span></li><li><i class="icon-headphones"></i><span class="i-name">icon-headphones</span></li><li><i class="icon-x"></i><span class="i-name">icon-x</span></li><li><i class="icon-check"></i><span class="i-name">icon-check</span></li><li><i class="icon-award-stroke"></i><span class="i-name">icon-award-stroke</span></li><li><i class="icon-wrench"></i><span class="i-name">icon-wrench</span></li><li><i class="icon-sun-fill"></i><span class="i-name">icon-sun-fill</span></li><li><i class="icon-move-horizontal-alt2"></i><span class="i-name">icon-move-horizontal-alt2</span></li><li><i class="icon-left-quote"></i><span class="i-name">icon-left-quote</span></li><li><i class="icon-clock-1"></i><span class="i-name">icon-clock-1</span></li><li><i class="icon-share"></i><span class="i-name">icon-share</span></li><li><i class="icon-map-pin-stroke"></i><span class="i-name">icon-map-pin-stroke</span></li><li><i class="icon-battery-full"></i><span class="i-name">icon-battery-full</span></li><li><i class="icon-paperclip-1"></i><span class="i-name">icon-paperclip-1</span></li><li><i class="icon-beaker-alt"></i><span class="i-name">icon-beaker-alt</span></li><li><i class="icon-bolt"></i><span class="i-name">icon-bolt</span></li><li><i class="icon-at"></i><span class="i-name">icon-at</span></li><li><i class="icon-pin-1"></i><span class="i-name">icon-pin-1</span></li><li><i class="icon-cloud-1"></i><span class="i-name">icon-cloud-1</span></li><li><i class="icon-layers-alt"></i><span class="i-name">icon-layers-alt</span></li><li><i class="icon-fullscreen-exit-alt"></i><span class="i-name">icon-fullscreen-exit-alt</span></li><li><i class="icon-left-quote-alt"></i><span class="i-name">icon-left-quote-alt</span></li><li><i class="icon-move-horizontal"></i><span class="i-name">icon-move-horizontal</span></li><li><i class="icon-volume-mute"></i><span class="i-name">icon-volume-mute</span></li><li><i class="icon-undo"></i><span class="i-name">icon-undo</span></li><li><i class="icon-umbrella"></i><span class="i-name">icon-umbrella</span></li><li><i class="icon-pen-alt2"></i><span class="i-name">icon-pen-alt2</span></li><li><i class="icon-heart-stroke"></i><span class="i-name">icon-heart-stroke</span></li><li><i class="icon-list-nested"></i><span class="i-name">icon-list-nested</span></li><li><i class="icon-move-vertical"></i><span class="i-name">icon-move-vertical</span></li><li><i class="icon-info"></i><span class="i-name">icon-info</span></li><li><i class="icon-pause-1"></i><span class="i-name">icon-pause-1</span></li><li><i class="icon-move-vertical-alt1"></i><span class="i-name">icon-move-vertical-alt1</span></li><li><i class="icon-spin"></i><span class="i-name">icon-spin</span></li><li><i class="icon-pen"></i><span class="i-name">icon-pen</span></li><li><i class="icon-plus-1"></i><span class="i-name">icon-plus-1</span></li><li><i class="icon-cog"></i><span class="i-name">icon-cog</span></li><li><i class="icon-reload"></i><span class="i-name">icon-reload</span></li><li><i class="icon-heart-fill"></i><span class="i-name">icon-heart-fill</span></li><li><i class="icon-equalizer"></i><span class="i-name">icon-equalizer</span></li><li><i class="icon-article"></i><span class="i-name">icon-article</span></li><li><i class="icon-cd-1"></i><span class="i-name">icon-cd-1</span></li><li><i class="icon-link"></i><span class="i-name">icon-link</span></li><li><i class="icon-pilcrow"></i><span class="i-name">icon-pilcrow</span></li><li><i class="icon-hash"></i><span class="i-name">icon-hash</span></li><li><i class="icon-check-alt"></i><span class="i-name">icon-check-alt</span></li><li><i class="icon-key-stroke"></i><span class="i-name">icon-key-stroke</span></li><li><i class="icon-folder-stroke"></i><span class="i-name">icon-folder-stroke</span></li><li><i class="icon-first"></i><span class="i-name">icon-first</span></li><li><i class="icon-eyedropper"></i><span class="i-name">icon-eyedropper</span></li><li><i class="icon-reload-alt"></i><span class="i-name">icon-reload-alt</span></li><li><i class="icon-aperture"></i><span class="i-name">icon-aperture</span></li><li><i class="icon-rain"></i><span class="i-name">icon-rain</span></li><li><i class="icon-beaker"></i><span class="i-name">icon-beaker</span></li><li><i class="icon-bars-alt"></i><span class="i-name">icon-bars-alt</span></li><li><i class="icon-image"></i><span class="i-name">icon-image</span></li><li><i class="icon-spin-alt"></i><span class="i-name">icon-spin-alt</span></li><li><i class="icon-pen-alt-stroke"></i><span class="i-name">icon-pen-alt-stroke</span></li><li><i class="icon-brush-alt"></i><span class="i-name">icon-brush-alt</span></li><li><i class="icon-document-alt-fill"></i><span class="i-name">icon-document-alt-fill</span></li><li><i class="icon-layers"></i><span class="i-name">icon-layers</span></li><li><i class="icon-compass"></i><span class="i-name">icon-compass</span></li><li><i class="icon-unlock-stroke"></i><span class="i-name">icon-unlock-stroke</span></li><li><i class="icon-box"></i><span class="i-name">icon-box</span></li><li><i class="icon-right-quote-alt"></i><span class="i-name">icon-right-quote-alt</span></li><li><i class="icon-last"></i><span class="i-name">icon-last</span></li><li><i class="icon-award-fill"></i><span class="i-name">icon-award-fill</span></li><li><i class="icon-pen-alt-fill"></i><span class="i-name">icon-pen-alt-fill</span></li><li><i class="icon-lock-fill"></i><span class="i-name">icon-lock-fill</span></li><li><i class="icon-calendar-alt-stroke"></i><span class="i-name">icon-calendar-alt-stroke</span></li><li><i class="icon-move-vertical-alt2"></i><span class="i-name">icon-move-vertical-alt2</span></li><li><i class="icon-steering-wheel"></i><span class="i-name">icon-steering-wheel</span></li><li><i class="icon-minus"></i><span class="i-name">icon-minus</span></li><li><i class="icon-map-pin-alt"></i><span class="i-name">icon-map-pin-alt</span></li><li><i class="icon-eye"></i><span class="i-name">icon-eye</span></li><li><i class="icon-calendar-alt-fill"></i><span class="i-name">icon-calendar-alt-fill</span></li><li><i class="icon-play-alt"></i><span class="i-name">icon-play-alt</span></li><li><i class="icon-fullscreen"></i><span class="i-name">icon-fullscreen</span></li><li><i class="icon-target"></i><span class="i-name">icon-target</span></li><li><i class="icon-dial"></i><span class="i-name">icon-dial</span></li><li><i class="icon-ampersand"></i><span class="i-name">icon-ampersand</span></li><li><i class="icon-question-mark"></i><span class="i-name">icon-question-mark</span></li><li><i class="icon-moon-stroke"></i><span class="i-name">icon-moon-stroke</span></li><li><i class="icon-movie"></i><span class="i-name">icon-movie</span></li><li><i class="icon-battery-charging"></i><span class="i-name">icon-battery-charging</span></li><li><i class="icon-document-stroke"></i><span class="i-name">icon-document-stroke</span></li><li><i class="icon-document-alt-stroke"></i><span class="i-name">icon-document-alt-stroke</span></li><li><i class="icon-lightbulb"></i><span class="i-name">icon-lightbulb</span></li><li><i class="icon-calendar-1"></i><span class="i-name">icon-calendar-1</span></li><li><i class="icon-unlock-fill"></i><span class="i-name">icon-unlock-fill</span></li><li><i class="icon-battery-empty"></i><span class="i-name">icon-battery-empty</span></li><li><i class="icon-sun-stroke"></i><span class="i-name">icon-sun-stroke</span></li><li><i class="icon-chart-alt"></i><span class="i-name">icon-chart-alt</span></li><li><i class="icon-battery-half"></i><span class="i-name">icon-battery-half</span></li><li><i class="icon-lock-stroke"></i><span class="i-name">icon-lock-stroke</span></li><li><i class="icon-book-alt2"></i><span class="i-name">icon-book-alt2</span></li><li><i class="icon-loop-alt1"></i><span class="i-name">icon-loop-alt1</span></li><li><i class="icon-fullscreen-exit"></i><span class="i-name">icon-fullscreen-exit</span></li><li><i class="icon-volume"></i><span class="i-name">icon-volume</span></li><li><i class="icon-mic"></i><span class="i-name">icon-mic</span></li><li><i class="icon-right-quote"></i><span class="i-name">icon-right-quote</span></li><li><i class="icon-play-1"></i><span class="i-name">icon-play-1</span></li><li><i class="icon-folder-fill"></i><span class="i-name">icon-folder-fill</span></li><li><i class="icon-moon-fill"></i><span class="i-name">icon-moon-fill</span></li><li><i class="icon-home-1"></i><span class="i-name">icon-home-1</span></li><li><i class="icon-camera-2"></i><span class="i-name">icon-camera-2</span></li><li><i class="icon-star"></i><span class="i-name">icon-star</span></li><li><i class="icon-read-more"></i><span class="i-name">icon-read-more</span></li><li><i class="icon-document-fill"></i><span class="i-name">icon-document-fill</span></li><li><i class="icon-excel-table-1"></i><span class="i-name">icon-excel-table-1</span></li><li><i class="icon-arrow-1-up"></i><span class="i-name">icon-arrow-1-up</span></li><li><i class="icon-female-symbol"></i><span class="i-name">icon-female-symbol</span></li><li><i class="icon-delivery-transport-2"></i><span class="i-name">icon-delivery-transport-2</span></li><li><i class="icon-content-41"></i><span class="i-name">icon-content-41</span></li><li><i class="icon-clip-paper-1"></i><span class="i-name">icon-clip-paper-1</span></li><li><i class="icon-check-5"></i><span class="i-name">icon-check-5</span></li><li><i class="icon-feed-rss-2"></i><span class="i-name">icon-feed-rss-2</span></li><li><i class="icon-server-1"></i><span class="i-name">icon-server-1</span></li><li><i class="icon-harddrive"></i><span class="i-name">icon-harddrive</span></li><li><i class="icon-car"></i><span class="i-name">icon-car</span></li><li><i class="icon-direction-move-1"></i><span class="i-name">icon-direction-move-1</span></li><li><i class="icon-certificate-file"></i><span class="i-name">icon-certificate-file</span></li><li><i class="icon-analytics-file-1"></i><span class="i-name">icon-analytics-file-1</span></li><li><i class="icon-male-symbol"></i><span class="i-name">icon-male-symbol</span></li><li><i class="icon-send-to-front"></i><span class="i-name">icon-send-to-front</span></li><li><i class="icon-movie-play-file-1"></i><span class="i-name">icon-movie-play-file-1</span></li><li><i class="icon-bookmark-tag"></i><span class="i-name">icon-bookmark-tag</span></li><li><i class="icon-filled-folder-1"></i><span class="i-name">icon-filled-folder-1</span></li><li><i class="icon-check-clipboard-1"></i><span class="i-name">icon-check-clipboard-1</span></li><li><i class="icon-clouds-cloudy"></i><span class="i-name">icon-clouds-cloudy</span></li><li><i class="icon-gears-setting"></i><span class="i-name">icon-gears-setting</span></li><li><i class="icon-html"></i><span class="i-name">icon-html</span></li><li><i class="icon-palm-tree"></i><span class="i-name">icon-palm-tree</span></li><li><i class="icon-wallet-money"></i><span class="i-name">icon-wallet-money</span></li><li><i class="icon-hospital"></i><span class="i-name">icon-hospital</span></li><li><i class="icon-previous-1"></i><span class="i-name">icon-previous-1</span></li><li><i class="icon-mailbox-1"></i><span class="i-name">icon-mailbox-1</span></li><li><i class="icon-arrow-1-right"></i><span class="i-name">icon-arrow-1-right</span></li><li><i class="icon-dropbox"></i><span class="i-name">icon-dropbox</span></li><li><i class="icon-rocket"></i><span class="i-name">icon-rocket</span></li><li><i class="icon-credit-card"></i><span class="i-name">icon-credit-card</span></li><li><i class="icon-campfire"></i><span class="i-name">icon-campfire</span></li><li><i class="icon-yang-ying"></i><span class="i-name">icon-yang-ying</span></li><li><i class="icon-omg-smiley"></i><span class="i-name">icon-omg-smiley</span></li><li><i class="icon-angry-smiley"></i><span class="i-name">icon-angry-smiley</span></li><li><i class="icon-television-tv"></i><span class="i-name">icon-television-tv</span></li><li><i class="icon-camera-surveillance-1"></i><span class="i-name">icon-camera-surveillance-1</span></li><li><i class="icon-apple"></i><span class="i-name">icon-apple</span></li><li><i class="icon-content-14"></i><span class="i-name">icon-content-14</span></li><li><i class="icon-hour-glass"></i><span class="i-name">icon-hour-glass</span></li><li><i class="icon-content-7"></i><span class="i-name">icon-content-7</span></li><li><i class="icon-arrow-right-1"></i><span class="i-name">icon-arrow-right-1</span></li><li><i class="icon-image-photo-file-1"></i><span class="i-name">icon-image-photo-file-1</span></li><li><i class="icon-bus"></i><span class="i-name">icon-bus</span></li><li><i class="icon-blink-smiley"></i><span class="i-name">icon-blink-smiley</span></li><li><i class="icon-bubbles-talk-1"></i><span class="i-name">icon-bubbles-talk-1</span></li><li><i class="icon-brush-1"></i><span class="i-name">icon-brush-1</span></li><li><i class="icon-send-to-back"></i><span class="i-name">icon-send-to-back</span></li><li><i class="icon-camera-video-3"></i><span class="i-name">icon-camera-video-3</span></li><li><i class="icon-battery-low"></i><span class="i-name">icon-battery-low</span></li><li><i class="icon-movie-play-1"></i><span class="i-name">icon-movie-play-1</span></li><li><i class="icon-home-1-1"></i><span class="i-name">icon-home-1-1</span></li><li><i class="icon-cd-cover-music"></i><span class="i-name">icon-cd-cover-music</span></li><li><i class="icon-linkedin-alt"></i><span class="i-name">icon-linkedin-alt</span></li><li><i class="icon-video-1"></i><span class="i-name">icon-video-1</span></li><li><i class="icon-bookmark-star-favorite"></i><span class="i-name">icon-bookmark-star-favorite</span></li><li><i class="icon-play-1-1"></i><span class="i-name">icon-play-1-1</span></li><li><i class="icon-pause-1-1"></i><span class="i-name">icon-pause-1-1</span></li><li><i class="icon-paint-brush-2"></i><span class="i-name">icon-paint-brush-2</span></li><li><i class="icon-train"></i><span class="i-name">icon-train</span></li><li><i class="icon-happy-smiley"></i><span class="i-name">icon-happy-smiley</span></li><li><i class="icon-missile-rocket"></i><span class="i-name">icon-missile-rocket</span></li><li><i class="icon-cloud-2"></i><span class="i-name">icon-cloud-2</span></li><li><i class="icon-bookmark-file-1"></i><span class="i-name">icon-bookmark-file-1</span></li><li><i class="icon-scooter"></i><span class="i-name">icon-scooter</span></li><li><i class="icon-magnet"></i><span class="i-name">icon-magnet</span></li><li><i class="icon-letter-mail-1"></i><span class="i-name">icon-letter-mail-1</span></li><li><i class="icon-color-palette"></i><span class="i-name">icon-color-palette</span></li><li><i class="icon-content-43"></i><span class="i-name">icon-content-43</span></li><li><i class="icon-bubble-talk-1"></i><span class="i-name">icon-bubble-talk-1</span></li><li><i class="icon-content-34"></i><span class="i-name">icon-content-34</span></li><li><i class="icon-carton-milk"></i><span class="i-name">icon-carton-milk</span></li><li><i class="icon-male-user-4"></i><span class="i-name">icon-male-user-4</span></li><li><i class="icon-ink-pen"></i><span class="i-name">icon-ink-pen</span></li><li><i class="icon-camera-1-1"></i><span class="i-name">icon-camera-1-1</span></li><li><i class="icon-snow-weather"></i><span class="i-name">icon-snow-weather</span></li><li><i class="icon-refresh-reload-1"></i><span class="i-name">icon-refresh-reload-1</span></li><li><i class="icon-at-email"></i><span class="i-name">icon-at-email</span></li><li><i class="icon-umbrella-1"></i><span class="i-name">icon-umbrella-1</span></li><li><i class="icon-lock-secure-1"></i><span class="i-name">icon-lock-secure-1</span></li><li><i class="icon-hand-stop"></i><span class="i-name">icon-hand-stop</span></li><li><i class="icon-battery-half-1"></i><span class="i-name">icon-battery-half-1</span></li><li><i class="icon-text-document"></i><span class="i-name">icon-text-document</span></li><li><i class="icon-layers-1"></i><span class="i-name">icon-layers-1</span></li><li><i class="icon-paypal"></i><span class="i-name">icon-paypal</span></li><li><i class="icon-helicopter"></i><span class="i-name">icon-helicopter</span></li><li><i class="icon-content-42"></i><span class="i-name">icon-content-42</span></li><li><i class="icon-clothes-hanger"></i><span class="i-name">icon-clothes-hanger</span></li><li><i class="icon-plus-zoom"></i><span class="i-name">icon-plus-zoom</span></li><li><i class="icon-unlock"></i><span class="i-name">icon-unlock</span></li><li><i class="icon-microscope"></i><span class="i-name">icon-microscope</span></li><li><i class="icon-click-hand-1"></i><span class="i-name">icon-click-hand-1</span></li><li><i class="icon-briefcase"></i><span class="i-name">icon-briefcase</span></li><li><i class="icon-3-css"></i><span class="i-name">icon-3-css</span></li><li><i class="icon-google-plus-1"></i><span class="i-name">icon-google-plus-1</span></li><li><i class="icon-close-off-2"></i><span class="i-name">icon-close-off-2</span></li><li><i class="icon-music-file-1"></i><span class="i-name">icon-music-file-1</span></li><li><i class="icon-tree"></i><span class="i-name">icon-tree</span></li><li><i class="icon-forward-1"></i><span class="i-name">icon-forward-1</span></li><li><i class="icon-script"></i><span class="i-name">icon-script</span></li><li><i class="icon-edit-pen-1"></i><span class="i-name">icon-edit-pen-1</span></li><li><i class="icon-content-1"></i><span class="i-name">icon-content-1</span></li><li><i class="icon-cash-register"></i><span class="i-name">icon-cash-register</span></li><li><i class="icon-call-old-telephone"></i><span class="i-name">icon-call-old-telephone</span></li><li><i class="icon-hail-weather"></i><span class="i-name">icon-hail-weather</span></li><li><i class="icon-gift"></i><span class="i-name">icon-gift</span></li><li><i class="icon-square-vector-2"></i><span class="i-name">icon-square-vector-2</span></li><li><i class="icon-van"></i><span class="i-name">icon-van</span></li><li><i class="icon-male-user-3"></i><span class="i-name">icon-male-user-3</span></li><li><i class="icon-content-8"></i><span class="i-name">icon-content-8</span></li><li><i class="icon-battery-charging-1"></i><span class="i-name">icon-battery-charging-1</span></li><li><i class="icon-rewind-1"></i><span class="i-name">icon-rewind-1</span></li><li><i class="icon-check-1"></i><span class="i-name">icon-check-1</span></li><li><i class="icon-airplane"></i><span class="i-name">icon-airplane</span></li><li><i class="icon-hat-magician"></i><span class="i-name">icon-hat-magician</span></li><li><i class="icon-boat"></i><span class="i-name">icon-boat</span></li><li><i class="icon-crown-king-1"></i><span class="i-name">icon-crown-king-1</span></li><li><i class="icon-bike"></i><span class="i-name">icon-bike</span></li><li><i class="icon-sad-smiley"></i><span class="i-name">icon-sad-smiley</span></li><li><i class="icon-burning-fire"></i><span class="i-name">icon-burning-fire</span></li><li><i class="icon-thermometer"></i><span class="i-name">icon-thermometer</span></li><li><i class="icon-map-pin-5"></i><span class="i-name">icon-map-pin-5</span></li><li><i class="icon-happy-smiley-very"></i><span class="i-name">icon-happy-smiley-very</span></li><li><i class="icon-eye-view-1"></i><span class="i-name">icon-eye-view-1</span></li><li><i class="icon-cannabis-hemp"></i><span class="i-name">icon-cannabis-hemp</span></li><li><i class="icon-interface-window-1"></i><span class="i-name">icon-interface-window-1</span></li><li><i class="icon-document-file-1"></i><span class="i-name">icon-document-file-1</span></li><li><i class="icon-arrow-1-left"></i><span class="i-name">icon-arrow-1-left</span></li><li><i class="icon-nurse-user"></i><span class="i-name">icon-nurse-user</span></li><li><i class="icon-content-44"></i><span class="i-name">icon-content-44</span></li><li><i class="icon-flag-mark"></i><span class="i-name">icon-flag-mark</span></li><li><i class="icon-square-vector-1"></i><span class="i-name">icon-square-vector-1</span></li><li><i class="icon-monitor-screen-1"></i><span class="i-name">icon-monitor-screen-1</span></li><li><i class="icon-next-1"></i><span class="i-name">icon-next-1</span></li><li><i class="icon-doctor"></i><span class="i-name">icon-doctor</span></li><li><i class="icon-favorite-map-pin"></i><span class="i-name">icon-favorite-map-pin</span></li><li><i class="icon-rain-weather"></i><span class="i-name">icon-rain-weather</span></li><li><i class="icon-polaroid"></i><span class="i-name">icon-polaroid</span></li><li><i class="icon-analytics-chart-graph"></i><span class="i-name">icon-analytics-chart-graph</span></li><li><i class="icon-medal-outline-star"></i><span class="i-name">icon-medal-outline-star</span></li><li><i class="icon-lightbulb-shine"></i><span class="i-name">icon-lightbulb-shine</span></li><li><i class="icon-arrow-down-1"></i><span class="i-name">icon-arrow-down-1</span></li><li><i class="icon-favorite-heart-outline"></i><span class="i-name">icon-favorite-heart-outline</span></li><li><i class="icon-advertising-megaphone-2"></i><span class="i-name">icon-advertising-megaphone-2</span></li><li><i class="icon-interface-windows"></i><span class="i-name">icon-interface-windows</span></li><li><i class="icon-ipod"></i><span class="i-name">icon-ipod</span></li><li><i class="icon-radar-2"></i><span class="i-name">icon-radar-2</span></li><li><i class="icon-minus-zoom"></i><span class="i-name">icon-minus-zoom</span></li><li><i class="icon-crhistmas-spruce-tree"></i><span class="i-name">icon-crhistmas-spruce-tree</span></li><li><i class="icon-arrow-cursor"></i><span class="i-name">icon-arrow-cursor</span></li><li><i class="icon-medal-rank-star"></i><span class="i-name">icon-medal-rank-star</span></li><li><i class="icon-database-5"></i><span class="i-name">icon-database-5</span></li><li><i class="icon-battery-full-1"></i><span class="i-name">icon-battery-full-1</span></li><li><i class="icon-chart-graph-file-1"></i><span class="i-name">icon-chart-graph-file-1</span></li><li><i class="icon-case-medic"></i><span class="i-name">icon-case-medic</span></li><li><i class="icon-disc-floppy-font"></i><span class="i-name">icon-disc-floppy-font</span></li><li><i class="icon-sun-weather"></i><span class="i-name">icon-sun-weather</span></li><li><i class="icon-parking-sign"></i><span class="i-name">icon-parking-sign</span></li><li><i class="icon-code-html-file-1"></i><span class="i-name">icon-code-html-file-1</span></li><li><i class="icon-date"></i><span class="i-name">icon-date</span></li><li><i class="icon-hand-hold"></i><span class="i-name">icon-hand-hold</span></li><li><i class="icon-cup-2"></i><span class="i-name">icon-cup-2</span></li><li><i class="icon-lightning-weather"></i><span class="i-name">icon-lightning-weather</span></li><li><i class="icon-cloud-sun"></i><span class="i-name">icon-cloud-sun</span></li><li><i class="icon-compressed-zip-file"></i><span class="i-name">icon-compressed-zip-file</span></li><li><i class="icon-road"></i><span class="i-name">icon-road</span></li><li><i class="icon-arrow-left-1"></i><span class="i-name">icon-arrow-left-1</span></li><li><i class="icon-building-24"></i><span class="i-name">icon-building-24</span></li><li><i class="icon-tennis-24"></i><span class="i-name">icon-tennis-24</span></li><li><i class="icon-skiing-24"></i><span class="i-name">icon-skiing-24</span></li><li><i class="icon-bus-24"></i><span class="i-name">icon-bus-24</span></li><li><i class="icon-park2-24"></i><span class="i-name">icon-park2-24</span></li><li><i class="icon-circle-24"></i><span class="i-name">icon-circle-24</span></li><li><i class="icon-golf-24"></i><span class="i-name">icon-golf-24</span></li><li><i class="icon-star-24"></i><span class="i-name">icon-star-24</span></li><li><i class="icon-water-24"></i><span class="i-name">icon-water-24</span></li><li><i class="icon-disability-24"></i><span class="i-name">icon-disability-24</span></li><li><i class="icon-art-gallery-24"></i><span class="i-name">icon-art-gallery-24</span></li><li><i class="icon-religious-jewish-24"></i><span class="i-name">icon-religious-jewish-24</span></li><li><i class="icon-marker-24"></i><span class="i-name">icon-marker-24</span></li><li><i class="icon-campsite-24"></i><span class="i-name">icon-campsite-24</span></li><li><i class="icon-prison-24"></i><span class="i-name">icon-prison-24</span></li><li><i class="icon-baseball-24"></i><span class="i-name">icon-baseball-24</span></li><li><i class="icon-pharmacy-24"></i><span class="i-name">icon-pharmacy-24</span></li><li><i class="icon-zoo-24"></i><span class="i-name">icon-zoo-24</span></li><li><i class="icon-triangle-stroked-24"></i><span class="i-name">icon-triangle-stroked-24</span></li><li><i class="icon-star-stroked-24"></i><span class="i-name">icon-star-stroked-24</span></li><li><i class="icon-slaughterhouse-24"></i><span class="i-name">icon-slaughterhouse-24</span></li><li><i class="icon-parking-24"></i><span class="i-name">icon-parking-24</span></li><li><i class="icon-heliport-24"></i><span class="i-name">icon-heliport-24</span></li><li><i class="icon-restaurant-24"></i><span class="i-name">icon-restaurant-24</span></li><li><i class="icon-shop-24"></i><span class="i-name">icon-shop-24</span></li><li><i class="icon-religious-christian-24"></i><span class="i-name">icon-religious-christian-24</span></li><li><i class="icon-museum-24"></i><span class="i-name">icon-museum-24</span></li><li><i class="icon-cross"></i><span class="i-name">icon-cross</span></li><li><i class="icon-toilets-24"></i><span class="i-name">icon-toilets-24</span></li><li><i class="icon-rail-underground-24"></i><span class="i-name">icon-rail-underground-24</span></li><li><i class="icon-basketball-24"></i><span class="i-name">icon-basketball-24</span></li><li><i class="icon-beer-24"></i><span class="i-name">icon-beer-24</span></li><li><i class="icon-airfield-24"></i><span class="i-name">icon-airfield-24</span></li><li><i class="icon-wetland-24"></i><span class="i-name">icon-wetland-24</span></li><li><i class="icon-soccer-24"></i><span class="i-name">icon-soccer-24</span></li><li><i class="icon-dam"></i><span class="i-name">icon-dam</span></li><li><i class="icon-bank-24"></i><span class="i-name">icon-bank-24</span></li><li><i class="icon-fuel-24"></i><span class="i-name">icon-fuel-24</span></li><li><i class="icon-school-24"></i><span class="i-name">icon-school-24</span></li><li><i class="icon-commercial-24"></i><span class="i-name">icon-commercial-24</span></li><li><i class="icon-religious-muslim-24"></i><span class="i-name">icon-religious-muslim-24</span></li><li><i class="icon-america-football-24"></i><span class="i-name">icon-america-football-24</span></li><li><i class="icon-swimming-24"></i><span class="i-name">icon-swimming-24</span></li><li><i class="icon-square-24"></i><span class="i-name">icon-square-24</span></li><li><i class="icon-circle-stroked-24"></i><span class="i-name">icon-circle-stroked-24</span></li><li><i class="icon-rail-above-24"></i><span class="i-name">icon-rail-above-24</span></li><li><i class="icon-monument-24"></i><span class="i-name">icon-monument-24</span></li><li><i class="icon-cinema-24"></i><span class="i-name">icon-cinema-24</span></li><li><i class="icon-ferry-24"></i><span class="i-name">icon-ferry-24</span></li><li><i class="icon-fast-food-24"></i><span class="i-name">icon-fast-food-24</span></li><li><i class="icon-cemetery-24"></i><span class="i-name">icon-cemetery-24</span></li><li><i class="icon-park-24"></i><span class="i-name">icon-park-24</span></li><li><i class="icon-telephone-24"></i><span class="i-name">icon-telephone-24</span></li><li><i class="icon-rail-24"></i><span class="i-name">icon-rail-24</span></li><li><i class="icon-college-24"></i><span class="i-name">icon-college-24</span></li><li><i class="icon-warehouse-24"></i><span class="i-name">icon-warehouse-24</span></li><li><i class="icon-hospital-24"></i><span class="i-name">icon-hospital-24</span></li><li><i class="icon-cricket-24"></i><span class="i-name">icon-cricket-24</span></li><li><i class="icon-parking-garage-24"></i><span class="i-name">icon-parking-garage-24</span></li><li><i class="icon-harbor-24"></i><span class="i-name">icon-harbor-24</span></li><li><i class="icon-cafe-24"></i><span class="i-name">icon-cafe-24</span></li><li><i class="icon-police-24"></i><span class="i-name">icon-police-24</span></li><li><i class="icon-industrial-24"></i><span class="i-name">icon-industrial-24</span></li><li><i class="icon-garden-24"></i><span class="i-name">icon-garden-24</span></li><li><i class="icon-triangle-24"></i><span class="i-name">icon-triangle-24</span></li><li><i class="icon-bar-24"></i><span class="i-name">icon-bar-24</span></li><li><i class="icon-place-of-worship-24"></i><span class="i-name">icon-place-of-worship-24</span></li><li><i class="icon-oil-well-24"></i><span class="i-name">icon-oil-well-24</span></li><li><i class="icon-library-24"></i><span class="i-name">icon-library-24</span></li><li><i class="icon-alcohol-shop-24"></i><span class="i-name">icon-alcohol-shop-24</span></li><li><i class="icon-bicycle-24"></i><span class="i-name">icon-bicycle-24</span></li><li><i class="icon-town-hall-24"></i><span class="i-name">icon-town-hall-24</span></li><li><i class="icon-music-24"></i><span class="i-name">icon-music-24</span></li><li><i class="icon-square-stroked-24"></i><span class="i-name">icon-square-stroked-24</span></li><li><i class="icon-pitch-24"></i><span class="i-name">icon-pitch-24</span></li><li><i class="icon-danger-24"></i><span class="i-name">icon-danger-24</span></li><li><i class="icon-fire-station-24"></i><span class="i-name">icon-fire-station-24</span></li><li><i class="icon-theatre-24"></i><span class="i-name">icon-theatre-24</span></li><li><i class="icon-marker-stroked-24"></i><span class="i-name">icon-marker-stroked-24</span></li><li><i class="icon-lodging-24"></i><span class="i-name">icon-lodging-24</span></li><li><i class="icon-embassy-24"></i><span class="i-name">icon-embassy-24</span></li><li><i class="icon-airport-24"></i><span class="i-name">icon-airport-24</span></li><li><i class="icon-logging-24"></i><span class="i-name">icon-logging-24</span></li><li><i class="icon-aim"></i><span class="i-name">icon-aim</span></li><li><i class="icon-aim-alt"></i><span class="i-name">icon-aim-alt</span></li><li><i class="icon-amazon"></i><span class="i-name">icon-amazon</span></li><li><i class="icon-app-store"></i><span class="i-name">icon-app-store</span></li><li><i class="icon-apple-1"></i><span class="i-name">icon-apple-1</span></li><li><i class="icon-arto"></i><span class="i-name">icon-arto</span></li><li><i class="icon-aws"></i><span class="i-name">icon-aws</span></li><li><i class="icon-baidu"></i><span class="i-name">icon-baidu</span></li><li><i class="icon-basecamp"></i><span class="i-name">icon-basecamp</span></li><li><i class="icon-bebo"></i><span class="i-name">icon-bebo</span></li><li><i class="icon-behance-1"></i><span class="i-name">icon-behance-1</span></li><li><i class="icon-bing"></i><span class="i-name">icon-bing</span></li><li><i class="icon-blip"></i><span class="i-name">icon-blip</span></li><li><i class="icon-blogger"></i><span class="i-name">icon-blogger</span></li><li><i class="icon-bnter"></i><span class="i-name">icon-bnter</span></li><li><i class="icon-brightkite"></i><span class="i-name">icon-brightkite</span></li><li><i class="icon-cinch"></i><span class="i-name">icon-cinch</span></li><li><i class="icon-cloudapp"></i><span class="i-name">icon-cloudapp</span></li><li><i class="icon-coroflot"></i><span class="i-name">icon-coroflot</span></li><li><i class="icon-creative-commons"></i><span class="i-name">icon-creative-commons</span></li><li><i class="icon-dailybooth"></i><span class="i-name">icon-dailybooth</span></li><li><i class="icon-delicious-1"></i><span class="i-name">icon-delicious-1</span></li><li><i class="icon-designbump"></i><span class="i-name">icon-designbump</span></li><li><i class="icon-designfloat"></i><span class="i-name">icon-designfloat</span></li><li><i class="icon-designmoo"></i><span class="i-name">icon-designmoo</span></li><li><i class="icon-deviantart"></i><span class="i-name">icon-deviantart</span></li><li><i class="icon-digg"></i><span class="i-name">icon-digg</span></li><li><i class="icon-digg-alt"></i><span class="i-name">icon-digg-alt</span></li><li><i class="icon-diigo"></i><span class="i-name">icon-diigo</span></li><li><i class="icon-dribbble-2"></i><span class="i-name">icon-dribbble-2</span></li><li><i class="icon-dropbox-1"></i><span class="i-name">icon-dropbox-1</span></li><li><i class="icon-drupal"></i><span class="i-name">icon-drupal</span></li><li><i class="icon-dzone"></i><span class="i-name">icon-dzone</span></li><li><i class="icon-ebay"></i><span class="i-name">icon-ebay</span></li><li><i class="icon-ember"></i><span class="i-name">icon-ember</span></li><li><i class="icon-etsy"></i><span class="i-name">icon-etsy</span></li><li><i class="icon-evernote"></i><span class="i-name">icon-evernote</span></li><li><i class="icon-facebook-1"></i><span class="i-name">icon-facebook-1</span></li><li><i class="icon-facebook-places"></i><span class="i-name">icon-facebook-places</span></li><li><i class="icon-facto"></i><span class="i-name">icon-facto</span></li><li><i class="icon-feedburner"></i><span class="i-name">icon-feedburner</span></li><li><i class="icon-flickr"></i><span class="i-name">icon-flickr</span></li><li><i class="icon-folkd"></i><span class="i-name">icon-folkd</span></li><li><i class="icon-formspring"></i><span class="i-name">icon-formspring</span></li><li><i class="icon-forrst"></i><span class="i-name">icon-forrst</span></li><li><i class="icon-foursquare"></i><span class="i-name">icon-foursquare</span></li><li><i class="icon-friendfeed"></i><span class="i-name">icon-friendfeed</span></li><li><i class="icon-friendster"></i><span class="i-name">icon-friendster</span></li><li><i class="icon-gdgt"></i><span class="i-name">icon-gdgt</span></li><li><i class="icon-github"></i><span class="i-name">icon-github</span></li><li><i class="icon-github-alt"></i><span class="i-name">icon-github-alt</span></li><li><i class="icon-goodreads"></i><span class="i-name">icon-goodreads</span></li><li><i class="icon-google"></i><span class="i-name">icon-google</span></li><li><i class="icon-google-buzz"></i><span class="i-name">icon-google-buzz</span></li><li><i class="icon-google-talk"></i><span class="i-name">icon-google-talk</span></li><li><i class="icon-gowalla"></i><span class="i-name">icon-gowalla</span></li><li><i class="icon-gowalla-alt"></i><span class="i-name">icon-gowalla-alt</span></li><li><i class="icon-grooveshark"></i><span class="i-name">icon-grooveshark</span></li><li><i class="icon-hacker-news"></i><span class="i-name">icon-hacker-news</span></li><li><i class="icon-hi5"></i><span class="i-name">icon-hi5</span></li><li><i class="icon-hype-machine"></i><span class="i-name">icon-hype-machine</span></li><li><i class="icon-hyves"></i><span class="i-name">icon-hyves</span></li><li><i class="icon-icq"></i><span class="i-name">icon-icq</span></li><li><i class="icon-identi"></i><span class="i-name">icon-identi</span></li><li><i class="icon-instapaper"></i><span class="i-name">icon-instapaper</span></li><li><i class="icon-itunes"></i><span class="i-name">icon-itunes</span></li><li><i class="icon-kik"></i><span class="i-name">icon-kik</span></li><li><i class="icon-krop"></i><span class="i-name">icon-krop</span></li><li><i class="icon-last-1"></i><span class="i-name">icon-last-1</span></li><li><i class="icon-linkedin"></i><span class="i-name">icon-linkedin</span></li><li><i class="icon-linkedin-alt-1"></i><span class="i-name">icon-linkedin-alt-1</span></li><li><i class="icon-livejournal"></i><span class="i-name">icon-livejournal</span></li><li><i class="icon-lovedsgn"></i><span class="i-name">icon-lovedsgn</span></li><li><i class="icon-meetup"></i><span class="i-name">icon-meetup</span></li><li><i class="icon-metacafe"></i><span class="i-name">icon-metacafe</span></li><li><i class="icon-ming"></i><span class="i-name">icon-ming</span></li><li><i class="icon-mister-wong"></i><span class="i-name">icon-mister-wong</span></li><li><i class="icon-mixx"></i><span class="i-name">icon-mixx</span></li><li><i class="icon-mixx-alt"></i><span class="i-name">icon-mixx-alt</span></li><li><i class="icon-mobileme"></i><span class="i-name">icon-mobileme</span></li><li><i class="icon-msn-messenger"></i><span class="i-name">icon-msn-messenger</span></li><li><i class="icon-myspace"></i><span class="i-name">icon-myspace</span></li><li><i class="icon-myspace-alt"></i><span class="i-name">icon-myspace-alt</span></li><li><i class="icon-newsvine"></i><span class="i-name">icon-newsvine</span></li><li><i class="icon-official"></i><span class="i-name">icon-official</span></li><li><i class="icon-openid"></i><span class="i-name">icon-openid</span></li><li><i class="icon-orkut"></i><span class="i-name">icon-orkut</span></li><li><i class="icon-pandora"></i><span class="i-name">icon-pandora</span></li><li><i class="icon-path"></i><span class="i-name">icon-path</span></li><li><i class="icon-paypal-1"></i><span class="i-name">icon-paypal-1</span></li><li><i class="icon-photobucket"></i><span class="i-name">icon-photobucket</span></li><li><i class="icon-picasa"></i><span class="i-name">icon-picasa</span></li><li><i class="icon-picassa"></i><span class="i-name">icon-picassa</span></li><li><i class="icon-pinboard"></i><span class="i-name">icon-pinboard</span></li><li><i class="icon-ping"></i><span class="i-name">icon-ping</span></li><li><i class="icon-pingchat"></i><span class="i-name">icon-pingchat</span></li><li><i class="icon-playstation"></i><span class="i-name">icon-playstation</span></li><li><i class="icon-plixi"></i><span class="i-name">icon-plixi</span></li><li><i class="icon-plurk"></i><span class="i-name">icon-plurk</span></li><li><i class="icon-podcast"></i><span class="i-name">icon-podcast</span></li><li><i class="icon-posterous"></i><span class="i-name">icon-posterous</span></li><li><i class="icon-qik"></i><span class="i-name">icon-qik</span></li><li><i class="icon-quik"></i><span class="i-name">icon-quik</span></li><li><i class="icon-quora"></i><span class="i-name">icon-quora</span></li><li><i class="icon-rdio"></i><span class="i-name">icon-rdio</span></li><li><i class="icon-readernaut"></i><span class="i-name">icon-readernaut</span></li><li><i class="icon-reddit"></i><span class="i-name">icon-reddit</span></li><li><i class="icon-retweet"></i><span class="i-name">icon-retweet</span></li><li><i class="icon-robo"></i><span class="i-name">icon-robo</span></li><li><i class="icon-rss-1"></i><span class="i-name">icon-rss-1</span></li><li><i class="icon-scribd"></i><span class="i-name">icon-scribd</span></li><li><i class="icon-sharethis"></i><span class="i-name">icon-sharethis</span></li><li><i class="icon-simplenote"></i><span class="i-name">icon-simplenote</span></li><li><i class="icon-skype-1"></i><span class="i-name">icon-skype-1</span></li><li><i class="icon-slashdot"></i><span class="i-name">icon-slashdot</span></li><li><i class="icon-slideshare"></i><span class="i-name">icon-slideshare</span></li><li><i class="icon-smugmug"></i><span class="i-name">icon-smugmug</span></li><li><i class="icon-soundcloud"></i><span class="i-name">icon-soundcloud</span></li><li><i class="icon-spotify"></i><span class="i-name">icon-spotify</span></li><li><i class="icon-squarespace"></i><span class="i-name">icon-squarespace</span></li><li><i class="icon-squidoo"></i><span class="i-name">icon-squidoo</span></li><li><i class="icon-steam"></i><span class="i-name">icon-steam</span></li><li><i class="icon-stumbleupon"></i><span class="i-name">icon-stumbleupon</span></li><li><i class="icon-technorati"></i><span class="i-name">icon-technorati</span></li><li><i class="icon-threewords"></i><span class="i-name">icon-threewords</span></li><li><i class="icon-tribe"></i><span class="i-name">icon-tribe</span></li><li><i class="icon-tripit"></i><span class="i-name">icon-tripit</span></li><li><i class="icon-tumblr"></i><span class="i-name">icon-tumblr</span></li><li><i class="icon-twitter-1"></i><span class="i-name">icon-twitter-1</span></li><li><i class="icon-twitter-alt-1"></i><span class="i-name">icon-twitter-alt-1</span></li><li><i class="icon-vcard"></i><span class="i-name">icon-vcard</span></li><li><i class="icon-viddler"></i><span class="i-name">icon-viddler</span></li><li><i class="icon-vimeo"></i><span class="i-name">icon-vimeo</span></li><li><i class="icon-virb"></i><span class="i-name">icon-virb</span></li><li><i class="icon-w3"></i><span class="i-name">icon-w3</span></li><li><i class="icon-whatsapp"></i><span class="i-name">icon-whatsapp</span></li><li><i class="icon-wikipedia"></i><span class="i-name">icon-wikipedia</span></li><li><i class="icon-windows-1"></i><span class="i-name">icon-windows-1</span></li><li><i class="icon-wists"></i><span class="i-name">icon-wists</span></li><li><i class="icon-wordpress"></i><span class="i-name">icon-wordpress</span></li><li><i class="icon-wordpress-alt"></i><span class="i-name">icon-wordpress-alt</span></li><li><i class="icon-xing"></i><span class="i-name">icon-xing</span></li><li><i class="icon-yahoo"></i><span class="i-name">icon-yahoo</span></li><li><i class="icon-yahoo-buzz"></i><span class="i-name">icon-yahoo-buzz</span></li><li><i class="icon-yahoo-messenger"></i><span class="i-name">icon-yahoo-messenger</span></li><li><i class="icon-yelp"></i><span class="i-name">icon-yelp</span></li><li><i class="icon-zerply"></i><span class="i-name">icon-zerply</span></li><li><i class="icon-zootool"></i><span class="i-name">icon-zootool</span></li><li><i class="icon-zynga"></i><span class="i-name">icon-zynga</span></li><li><i class="icon-align-center"></i><span class="i-name">icon-align-center</span></li><li><i class="icon-align-justify"></i><span class="i-name">icon-align-justify</span></li><li><i class="icon-align-left"></i><span class="i-name">icon-align-left</span></li><li><i class="icon-align-right"></i><span class="i-name">icon-align-right</span></li><li><i class="icon-archive-1"></i><span class="i-name">icon-archive-1</span></li><li><i class="icon-atom"></i><span class="i-name">icon-atom</span></li><li><i class="icon-bag"></i><span class="i-name">icon-bag</span></li><li><i class="icon-bank-notes"></i><span class="i-name">icon-bank-notes</span></li><li><i class="icon-barbell"></i><span class="i-name">icon-barbell</span></li><li><i class="icon-bars-1"></i><span class="i-name">icon-bars-1</span></li><li><i class="icon-battery-0"></i><span class="i-name">icon-battery-0</span></li><li><i class="icon-battery-1"></i><span class="i-name">icon-battery-1</span></li><li><i class="icon-battery-2"></i><span class="i-name">icon-battery-2</span></li><li><i class="icon-battery-3"></i><span class="i-name">icon-battery-3</span></li><li><i class="icon-battery-4"></i><span class="i-name">icon-battery-4</span></li><li><i class="icon-battery-power"></i><span class="i-name">icon-battery-power</span></li><li><i class="icon-beer"></i><span class="i-name">icon-beer</span></li><li><i class="icon-bolt-1"></i><span class="i-name">icon-bolt-1</span></li><li><i class="icon-bones"></i><span class="i-name">icon-bones</span></li><li><i class="icon-book-close"></i><span class="i-name">icon-book-close</span></li><li><i class="icon-book-open"></i><span class="i-name">icon-book-open</span></li><li><i class="icon-bookmark"></i><span class="i-name">icon-bookmark</span></li><li><i class="icon-box-1"></i><span class="i-name">icon-box-1</span></li><li><i class="icon-browser-1"></i><span class="i-name">icon-browser-1</span></li><li><i class="icon-bubble"></i><span class="i-name">icon-bubble</span></li><li><i class="icon-bubble-1"></i><span class="i-name">icon-bubble-1</span></li><li><i class="icon-bubble-2"></i><span class="i-name">icon-bubble-2</span></li><li><i class="icon-bubble-3"></i><span class="i-name">icon-bubble-3</span></li><li><i class="icon-bucket"></i><span class="i-name">icon-bucket</span></li><li><i class="icon-calculator-1"></i><span class="i-name">icon-calculator-1</span></li><li><i class="icon-calendar-2"></i><span class="i-name">icon-calendar-2</span></li><li><i class="icon-camera-3"></i><span class="i-name">icon-camera-3</span></li><li><i class="icon-cardiac-pulse"></i><span class="i-name">icon-cardiac-pulse</span></li><li><i class="icon-cd-2"></i><span class="i-name">icon-cd-2</span></li><li><i class="icon-character"></i><span class="i-name">icon-character</span></li><li><i class="icon-clipboard-1"></i><span class="i-name">icon-clipboard-1</span></li><li><i class="icon-clock-2"></i><span class="i-name">icon-clock-2</span></li><li><i class="icon-cloud-3"></i><span class="i-name">icon-cloud-3</span></li><li><i class="icon-coffee"></i><span class="i-name">icon-coffee</span></li><li><i class="icon-comment"></i><span class="i-name">icon-comment</span></li><li><i class="icon-connection-0"></i><span class="i-name">icon-connection-0</span></li><li><i class="icon-connection-1"></i><span class="i-name">icon-connection-1</span></li><li><i class="icon-connection-2"></i><span class="i-name">icon-connection-2</span></li><li><i class="icon-connection-3"></i><span class="i-name">icon-connection-3</span></li><li><i class="icon-connection-4"></i><span class="i-name">icon-connection-4</span></li><li><i class="icon-credit-cards"></i><span class="i-name">icon-credit-cards</span></li><li><i class="icon-crop"></i><span class="i-name">icon-crop</span></li><li><i class="icon-cube"></i><span class="i-name">icon-cube</span></li><li><i class="icon-diamond"></i><span class="i-name">icon-diamond</span></li><li><i class="icon-email"></i><span class="i-name">icon-email</span></li><li><i class="icon-email-plane"></i><span class="i-name">icon-email-plane</span></li><li><i class="icon-enter"></i><span class="i-name">icon-enter</span></li><li><i class="icon-eyedropper-1"></i><span class="i-name">icon-eyedropper-1</span></li><li><i class="icon-file"></i><span class="i-name">icon-file</span></li><li><i class="icon-file-add"></i><span class="i-name">icon-file-add</span></li><li><i class="icon-file-broken"></i><span class="i-name">icon-file-broken</span></li><li><i class="icon-file-settings"></i><span class="i-name">icon-file-settings</span></li><li><i class="icon-files"></i><span class="i-name">icon-files</span></li><li><i class="icon-flag"></i><span class="i-name">icon-flag</span></li><li><i class="icon-folder"></i><span class="i-name">icon-folder</span></li><li><i class="icon-folder-add"></i><span class="i-name">icon-folder-add</span></li><li><i class="icon-folder-check"></i><span class="i-name">icon-folder-check</span></li><li><i class="icon-folder-settings"></i><span class="i-name">icon-folder-settings</span></li><li><i class="icon-forbidden"></i><span class="i-name">icon-forbidden</span></li><li><i class="icon-frames"></i><span class="i-name">icon-frames</span></li><li><i class="icon-glass"></i><span class="i-name">icon-glass</span></li><li><i class="icon-graph"></i><span class="i-name">icon-graph</span></li><li><i class="icon-grid-1"></i><span class="i-name">icon-grid-1</span></li><li><i class="icon-heart-1"></i><span class="i-name">icon-heart-1</span></li><li><i class="icon-home-2"></i><span class="i-name">icon-home-2</span></li><li><i class="icon-invoice"></i><span class="i-name">icon-invoice</span></li><li><i class="icon-ipad-1"></i><span class="i-name">icon-ipad-1</span></li><li><i class="icon-ipad-2"></i><span class="i-name">icon-ipad-2</span></li><li><i class="icon-lab"></i><span class="i-name">icon-lab</span></li><li><i class="icon-laptop"></i><span class="i-name">icon-laptop</span></li><li><i class="icon-list-2"></i><span class="i-name">icon-list-2</span></li><li><i class="icon-lock"></i><span class="i-name">icon-lock</span></li><li><i class="icon-locked"></i><span class="i-name">icon-locked</span></li><li><i class="icon-map"></i><span class="i-name">icon-map</span></li><li><i class="icon-measure"></i><span class="i-name">icon-measure</span></li><li><i class="icon-meter"></i><span class="i-name">icon-meter</span></li><li><i class="icon-micro"></i><span class="i-name">icon-micro</span></li><li><i class="icon-micro-mute"></i><span class="i-name">icon-micro-mute</span></li><li><i class="icon-microwave"></i><span class="i-name">icon-microwave</span></li><li><i class="icon-modem"></i><span class="i-name">icon-modem</span></li><li><i class="icon-mute"></i><span class="i-name">icon-mute</span></li><li><i class="icon-newspaper-1"></i><span class="i-name">icon-newspaper-1</span></li><li><i class="icon-paperclip-2"></i><span class="i-name">icon-paperclip-2</span></li><li><i class="icon-pencil-1"></i><span class="i-name">icon-pencil-1</span></li><li><i class="icon-phone"></i><span class="i-name">icon-phone</span></li><li><i class="icon-phone-2"></i><span class="i-name">icon-phone-2</span></li><li><i class="icon-phone-3"></i><span class="i-name">icon-phone-3</span></li><li><i class="icon-picture"></i><span class="i-name">icon-picture</span></li><li><i class="icon-pie-chart"></i><span class="i-name">icon-pie-chart</span></li><li><i class="icon-pill"></i><span class="i-name">icon-pill</span></li><li><i class="icon-pin-2"></i><span class="i-name">icon-pin-2</span></li><li><i class="icon-power"></i><span class="i-name">icon-power</span></li><li><i class="icon-printer-1"></i><span class="i-name">icon-printer-1</span></li><li><i class="icon-printer-2"></i><span class="i-name">icon-printer-2</span></li><li><i class="icon-refresh"></i><span class="i-name">icon-refresh</span></li><li><i class="icon-reload-1"></i><span class="i-name">icon-reload-1</span></li><li><i class="icon-screen-1"></i><span class="i-name">icon-screen-1</span></li><li><i class="icon-select"></i><span class="i-name">icon-select</span></li><li><i class="icon-set"></i><span class="i-name">icon-set</span></li><li><i class="icon-settings-1"></i><span class="i-name">icon-settings-1</span></li><li><i class="icon-shorts"></i><span class="i-name">icon-shorts</span></li><li><i class="icon-speaker"></i><span class="i-name">icon-speaker</span></li><li><i class="icon-star-1"></i><span class="i-name">icon-star-1</span></li><li><i class="icon-stopwatch"></i><span class="i-name">icon-stopwatch</span></li><li><i class="icon-sun"></i><span class="i-name">icon-sun</span></li><li><i class="icon-syringe"></i><span class="i-name">icon-syringe</span></li><li><i class="icon-tag"></i><span class="i-name">icon-tag</span></li><li><i class="icon-train-1"></i><span class="i-name">icon-train-1</span></li><li><i class="icon-trash-1"></i><span class="i-name">icon-trash-1</span></li><li><i class="icon-unlocked"></i><span class="i-name">icon-unlocked</span></li><li><i class="icon-volume-1"></i><span class="i-name">icon-volume-1</span></li><li><i class="icon-volume-down"></i><span class="i-name">icon-volume-down</span></li><li><i class="icon-volume-up"></i><span class="i-name">icon-volume-up</span></li><li><i class="icon-wifi-1"></i><span class="i-name">icon-wifi-1</span></li><li><i class="icon-wifi-2"></i><span class="i-name">icon-wifi-2</span></li><li><i class="icon-wifi-3"></i><span class="i-name">icon-wifi-3</span></li><li><i class="icon-window-delete"></i><span class="i-name">icon-window-delete</span></li><li><i class="icon-windows-2"></i><span class="i-name">icon-windows-2</span></li><li><i class="icon-zoom-in-1"></i><span class="i-name">icon-zoom-in-1</span></li><li><i class="icon-magnifying-glass-1"></i><span class="i-name">icon-magnifying-glass-1</span></li><li><i class="icon-search-2"></i><span class="i-name">icon-search-2</span></li><li><i class="icon-fontawesome-webfont-2"></i><span class="i-name">icon-fontawesome-webfont-2</span></li><li><i class="icon-envelope-1"></i><span class="i-name">icon-envelope-1</span></li><li><i class="icon-download-3"></i><span class="i-name">icon-download-3</span></li><li><i class="icon-upload-3"></i><span class="i-name">icon-upload-3</span></li><li><i class="icon-stumbleupon-1"></i><span class="i-name">icon-stumbleupon-1</span></li><li><i class="icon-user"></i><span class="i-name">icon-user</span></li><li><i class="icon-users"></i><span class="i-name">icon-users</span></li><li><i class="icon-fontawesome-webfont-3"></i><span class="i-name">icon-fontawesome-webfont-3</span></li><li><i class="icon-fontawesome-webfont-4"></i><span class="i-name">icon-fontawesome-webfont-4</span></li><li><i class="icon-fontawesome-webfont-5"></i><span class="i-name">icon-fontawesome-webfont-5</span></li><li><i class="icon-fontawesome-webfont-6"></i><span class="i-name">icon-fontawesome-webfont-6</span></li><li><i class="icon-fontawesome-webfont-7"></i><span class="i-name">icon-fontawesome-webfont-7</span></li><li><i class="icon-fontawesome-webfont-8"></i><span class="i-name">icon-fontawesome-webfont-8</span></li><li><i class="icon-fontawesome-webfont-9"></i><span class="i-name">icon-fontawesome-webfont-9</span></li><li><i class="icon-fontawesome-webfont-10"></i><span class="i-name">icon-fontawesome-webfont-10</span></li><li><i class="icon-fontawesome-webfont-11"></i><span class="i-name">icon-fontawesome-webfont-11</span></li><li><i class="icon-fontawesome-webfont-12"></i><span class="i-name">icon-fontawesome-webfont-12</span></li><li><i class="icon-fontawesome-webfont-13"></i><span class="i-name">icon-fontawesome-webfont-13</span></li><li><i class="icon-fontawesome-webfont-14"></i><span class="i-name">icon-fontawesome-webfont-14</span></li><li><i class="icon-fontawesome-webfont-15"></i><span class="i-name">icon-fontawesome-webfont-15</span></li><li><i class="icon-fontawesome-webfont-16"></i><span class="i-name">icon-fontawesome-webfont-16</span></li><li><i class="icon-bookmark-1"></i><span class="i-name">icon-bookmark-1</span></li><li><i class="icon-book-open-1"></i><span class="i-name">icon-book-open-1</span></li><li><i class="icon-flash"></i><span class="i-name">icon-flash</span></li><li><i class="icon-feather-1"></i><span class="i-name">icon-feather-1</span></li><li><i class="icon-flag-1"></i><span class="i-name">icon-flag-1</span></li><li><i class="icon-google-circles"></i><span class="i-name">icon-google-circles</span></li><li><i class="icon-heart-2"></i><span class="i-name">icon-heart-2</span></li><li><i class="icon-heart-empty"></i><span class="i-name">icon-heart-empty</span></li><li><i class="icon-right-open-big"></i><span class="i-name">icon-right-open-big</span></li><li><i class="icon-left-open-big"></i><span class="i-name">icon-left-open-big</span></li><li><i class="icon-up-open-big"></i><span class="i-name">icon-up-open-big</span></li><li><i class="icon-down-open-big"></i><span class="i-name">icon-down-open-big</span></li><li><i class="icon-symbol-woman"></i><span class="i-name">icon-symbol-woman</span></li><li><i class="icon-measure-1"></i><span class="i-name">icon-measure-1</span></li><li><i class="icon-symbol-mixed"></i><span class="i-name">icon-symbol-mixed</span></li><li><i class="icon-letter"></i><span class="i-name">icon-letter</span></li><li><i class="icon-fontawesome-webfont-17"></i><span class="i-name">icon-fontawesome-webfont-17</span></li><li><i class="icon-fontawesome-webfont-18"></i><span class="i-name">icon-fontawesome-webfont-18</span></li><li><i class="icon-fontawesome-webfont-19"></i><span class="i-name">icon-fontawesome-webfont-19</span></li><li><i class="icon-arrow-1-down"></i><span class="i-name">icon-arrow-1-down</span></li><li><i class="icon-arrow-up-1"></i><span class="i-name">icon-arrow-up-1</span></li><li><i class="icon-fork"></i><span class="i-name">icon-fork</span></li><li><i class="icon-curved-arrow"></i><span class="i-name">icon-curved-arrow</span></li><li><i class="icon-forward-2"></i><span class="i-name">icon-forward-2</span></li><li><i class="icon-reload-2"></i><span class="i-name">icon-reload-2</span></li><li><i class="icon-arrows-out"></i><span class="i-name">icon-arrows-out</span></li><li><i class="icon-arrows-expand"></i><span class="i-name">icon-arrows-expand</span></li><li><i class="icon-arrows-compress"></i><span class="i-name">icon-arrows-compress</span></li><li><i class="icon-arrows-in"></i><span class="i-name">icon-arrows-in</span></li><li><i class="icon-zoom-out"></i><span class="i-name">icon-zoom-out</span></li><li><i class="icon-coverflow"></i><span class="i-name">icon-coverflow</span></li><li><i class="icon-coverflow-line"></i><span class="i-name">icon-coverflow-line</span></li></ul>';
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        echo '<input type="text" class="capture-input vibe-form-text vibe-input" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" />' . "\n";
                        echo $desc;
                        break;
                        // color
                    // color
                    case 'color':
                        echo '<input type="text" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" size="10" class="color" />
									<br />' . $desc;
                        break;
                    case 'checkbox':
                        if (!isset($std)) {
                            $std = 0;
                        }
                        if (!isset($meta)) {
                            $meta = $std;
                        }
                        echo '<div class="checkbox_button"></div>
                                                              <input type="checkbox" name="' . $id . '" id="' . $id . '" ' . checked(esc_attr($meta), 1, 0) . ' class="checkbox_val" value="1" />
								<label for="' . $id . '">' . $desc . '</label>';
                        break;
                    case 'yesno':
                        echo '<div class="select_button yesno"></div>';
                        echo '<select name="' . $id . '" id="' . $id . '" class="select_val">';
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        foreach ($options as $key => $option) {
                            echo '<option ' . selected(esc_attr($meta), $option['value'], false) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
                        }
                        echo '</select><br />' . $desc;
                        break;
                    case 'showhide':
                        echo '<div class="select_button"></div>';
                        echo '<select name="' . $id . '" id="' . $id . '" class="select_val">';
                        if ($meta == '' || !isset($meta) || !$meta) {
                            $meta = $std;
                        }
                        foreach ($options as $option) {
                            echo '<option' . selected(esc_attr($meta), $option['value'], false) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
                        }
                        echo '</select><br />' . $desc;
                        break;
                        // select
                    // select
                    case 'select':
                        echo '<select name="' . $id . '" id="' . $id . '" class="select">';
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        foreach ($options as $option) {
                            echo '<option' . selected(esc_attr($meta), $option['value'], false) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
                        }
                        echo '</select><br />' . $desc;
                        break;
                        // select
                    // select
                    case 'selectcpt':
                        echo '<select name="' . $id . '" id="' . $id . '" data-placeholder="' . sprintf(__('Select a %s', 'vibe-customtypes'), $post_type) . '" data-cpt="' . $post_type . '" class="selectcpt">';
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        if (!empty($meta)) {
                            echo '<option value="' . $meta . '" selected="selected">' . get_the_title($meta) . '</option>';
                        }
                        echo '</select><br />' . $desc;
                        break;
                    case 'selectmulticpt':
                        echo '<select name="' . $id . '[]" id="' . $id . '" class="selectcpt" data-cpt="' . $post_type . '" data-placeholder="' . sprintf(__('Select multiple %s', 'vibe-customtypes'), $post_type) . '" multiple>';
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        if (is_array($meta)) {
                            foreach ($meta as $id) {
                                echo '<option value="' . $id . '" selected="selected">' . get_the_title($id) . '</option>';
                            }
                        }
                        echo '</select><br />' . $desc;
                        break;
                        // Multiselect
                    // Multiselect
                    case 'multiselect':
                        echo '<select name="' . $id . '[]" id="' . $id . '" multiple class="chzn-select chosen">';
                        if ($meta == '' || !isset($meta)) {
                            $meta = array();
                        }
                        if (isset($options) && is_array($options)) {
                            foreach ($options as $option) {
                                echo '<option value="' . $option['value'] . '" ' . (in_array($option['value'], $meta) ? 'SELECTED' : '') . '>' . $option['label'] . '</option>';
                            }
                        }
                        echo '</select><br />' . $desc;
                        break;
                        // radio
                    // radio
                    case 'radio':
                        foreach ($options as $option) {
                            echo '<input type="radio" name="' . $id . '" id="' . $id . '-' . $option['value'] . '" value="' . $option['value'] . '" ' . checked(esc_attr($meta), $option['value'], false) . ' />
										<label for="' . $id . '-' . $option['value'] . '">' . $option['label'] . '</label><br />';
                        }
                        echo '' . $desc;
                        break;
                    case 'radio_img':
                        if ($meta == '' || !isset($meta)) {
                            $meta = $std;
                        }
                        foreach ($options as $option) {
                            echo '<div class="radio-image-wrapper">
                                                                        <label for="' . $option['value'] . '">
                                                                            <img src="' . $option['image'] . '">
                                                                            <div class="select ' . (esc_attr($meta) == $option['value'] ? "selected" : "") . '"></div>
                                                                        </label>
                                                                        <input type="radio" class="radio_img" name="' . $id . '" id="' . $id . '-' . $option['value'] . '" value="' . $option['value'] . '" ' . checked(esc_attr($meta), $option['value'], false) . ' />
                                                                     </div>';
                        }
                        echo '' . $desc;
                        break;
                        // checkbox_group
                    // checkbox_group
                    case 'checkbox_group':
                        foreach ($options as $option) {
                            echo '<input type="checkbox" value="' . $option['value'] . '" name="' . $id . '[]" id="' . $id . '-' . $option['value'] . '"', is_array($meta) && in_array($option['value'], $meta) ? ' checked="checked"' : '', ' /> 
										<label for="' . $id . '-' . $option['value'] . '">' . $option['label'] . '</label><br />';
                        }
                        echo '' . $desc;
                        break;
                    case 'date':
                        echo '<input type="text" class="datepicker" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" size="30" />
									<br />' . $desc;
                        break;
                    case 'time':
                        echo '<input type="text" class="timepicker" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" size="30" />
									<br />' . $desc;
                        break;
                    case 'gmap':
                        if (is_admin()) {
                            wp_enqueue_script('meta_box-gmap', 'http://maps.google.com/maps/api/js?sensor=false');
                        }
                        $city = $state = 'New York';
                        $country = 'United States';
                        $pincode = '22005';
                        $staddress = '';
                        if (isset($meta)) {
                            if (isset($meta['latitude'])) {
                                $lat = esc_attr($meta['latitude']);
                            }
                            if (isset($meta['latitude'])) {
                                $long = esc_attr($meta['longitude']);
                            }
                            if (isset($meta['staddress'])) {
                                $staddress = esc_attr($meta['staddress']);
                            }
                            if (isset($meta['city'])) {
                                $city = esc_attr($meta['city']);
                            }
                            if (isset($meta['state'])) {
                                $state = esc_attr($meta['state']);
                            }
                            if (isset($meta['pincode'])) {
                                $pincode = esc_attr($meta['pincode']);
                            }
                            if (isset($meta['country'])) {
                                $country = esc_attr($meta['country']);
                            }
                        }
                        echo '<div id="mapCanvas"></div>
                                                                    <div id="infoPanel">
                                                                    <h4>Current position:</h4>
                                                                    <div class="markerStatus"></div>
                                                                                <label  style="display:block;width:200px;float:left;">' . __('Latitude', 'vibe-customtypes') . '</label><input type="text" class="text" id="latitude" name="' . $field['id'] . '[latitude] value="' . $lat . '" size="20"  />
                                                                                <label  style="display:block;width:200px;float:left;">' . __('Longitude', 'vibe-customtypes') . '</label><input type="text" class="text" id="longitude" name="' . $field['id'] . '[longitude]" value="' . $long . '" size="20"  />     
                                                                                <br /><b  style="width:200px;float:left;">' . __('Closest Matching Address', 'vibe-customtypes') . '</b>
                                                                                <div id="address"></div>    
                                                                                <br />
                                                                                <label style="width:200px;float:left;">' . __('Street Address', 'vibe-customtypes') . '</label><input type="text" class="text" id="staddress" name="' . $field['id'] . '[staddress]" value="' . $staddress . '" size="20"  />     <br />
                                                                                <label style="width:200px;float:left;">' . __('City', 'vibe-customtypes') . '</label><input type="text" class="text" id="city" name="' . $field['id'] . '[city]" value="' . $city . '" size="20"  />     <br />
                                                                                <label style="width:200px;float:left;">' . __('State', 'vibe-customtypes') . '</label><input type="text" class="text" id="state" name="' . $field['id'] . '[state]" value="' . $state . '" size="20"  />     <br />
                                                                                <label style="width:200px;float:left;">' . __('Zip/Pin Code', 'vibe-customtypes') . '</label><input type="text" class="text" id="pincode" name="' . $field['id'] . '[pincode]" value="' . $pincode . '" size="20"  />     <br />
                                                                                <label style="width:200px;float:left;">' . __('Country', 'vibe-customtypes') . '</label><input type="text" class="text" id="country" name="' . $field['id'] . '[country]" value="' . $country . '" size="20"  />         <br />
                                                                              </div>
									<br />' . $desc;
                        break;
                    case 'groups':
                        if (class_exists('BP_Groups_Group')) {
                            echo '<select name="' . $id . '" id="' . $id . '" class="selectgroup">';
                            if (!empty($meta)) {
                                $group = groups_get_group(array('group_id' => $meta));
                                echo '<option value="' . $meta . '" selected="SELECTED">' . $group->name . '</option>';
                            }
                            echo '</select>';
                        } else {
                            _e('Buddypress Groups is not Active', 'vibe-customtypes');
                        }
                        echo '<br />' . $desc;
                        break;
                    case 'selectmultigroups':
                        if (class_exists('BP_Groups_Group')) {
                            echo '<select name="' . $id . '[]" id="' . $id . '" class="select chzn-select" data-placeholder="' . __('Select groups', 'vibe-customtypes') . '" multiple>';
                            if ($meta == '' || !isset($meta)) {
                                $meta = $std;
                            }
                            $vgroups = BP_Groups_Group::get(array('type' => 'alphabetical', 'per_page' => 999, 'show_hidden' => true));
                            foreach ($vgroups['groups'] as $vgroup) {
                                if (is_array($meta)) {
                                    echo '<option  ' . (in_array($vgroup->id, $meta) ? 'SELECTED' : '') . ' value="' . $vgroup->id . '">' . $vgroup->name . '</option>';
                                } else {
                                    echo '<option value="' . $vgroup->id . '" ' . selected($vgroup->id, $meta) . '>' . $vgroup->name . '</option>';
                                }
                            }
                            echo '</select>';
                        } else {
                            _e('Buddypress Groups is not Active', 'vibe-customtypes');
                        }
                        echo '<br />' . $desc;
                        break;
                    case 'curriculum':
                        echo '<a class="meta_box_add_section button-primary button-large" href="#">' . __('Add Section', 'vibe-customtypes') . '</a>
									<a class="meta_box_add_posttype1 button-primary button-large" href="#">Add ' . $post_type1 . '</a>
									<a class="meta_box_add_posttype2 button button-primary button-large" href="#">Add ' . $post_type2 . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        $i = 0;
                        if ($meta) {
                            foreach ($meta as $row) {
                                echo '<li><span class="sort handle dashicons dashicons-sort"></span>
												 <input type="text" name="' . $field['id'] . '[' . $i . ']" id="' . $field['id'] . '" class="' . (is_numeric($row) ? 'small postid' : '') . '" value="' . esc_attr($row) . '" size="30" READONLY /> <span>' . (is_numeric($row) ? get_the_title($row) : '') . '</span>
												<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                                $i++;
                            }
                        }
                        echo '<li class="section hide"><span class="sort handle dashicons dashicons-sort"></span>
										<input type="text" rel-name="' . $field['id'] . '[]" id="' . $field['id'] . '" value="" size="30" />
										<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '<li class="posttype1 hide">
									<select rel-name="' . $field['id'] . '[]" class="" data-cpt="' . $post_type1 . '" data-placeholder="' . sprintf(__('Select a %s', 'vibe-customtypes'), $post_type1) . '">
									</select>';
                        echo '<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '<li class="posttype2 hide">
									<select rel-name="' . $field['id'] . '[]" class="" data-cpt="' . $post_type2 . '" data-placeholder="' . sprintf(__('Select a %s', 'vibe-customtypes'), $post_type2) . '">
									</select>
									<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '</ul>
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                    case 'tax_select':
                        echo '<select name="' . $id . '" id="' . $id . '">
									<option value="">' . __('Select ', 'vibe-customtypes') . '</option>';
                        // Select One
                        $terms = get_terms($id, 'get=all');
                        $selected = wp_get_object_terms($post->ID, $id);
                        foreach ($terms as $term) {
                            echo '<option value="' . $term->slug . '"' . selected($selected[0]->slug, $term->slug, false) . '>' . $term->name . '</option>';
                        }
                        $taxonomy = get_taxonomy($id);
                        echo '</select> &nbsp;<span class="description"><a href="' . home_url() . '/wp-admin/edit-tags.php?taxonomy=' . $id . '&post_type=' . $post_type . '">Manage ' . $taxonomy->label . '</a></span>
								<br />' . $desc;
                        break;
                    case 'dynamic_taxonomy':
                        echo '<select name="' . $id . '[]" id="' . $id . '" multiple class="chzn-select chosen">
									<option value="">' . __('Select Taxonomy', 'vibe-customtypes') . '</option>';
                        // Select One
                        $terms = get_terms($taxonomy, array('fields' => 'id=>name'));
                        if ($meta == '' || !isset($meta)) {
                            $meta = array();
                        }
                        if (isset($terms) && is_array($terms)) {
                            foreach ($terms as $key => $term) {
                                echo '<option value="' . $key . '" ' . (in_array($key, $meta) ? 'SELECTED' : '') . '>' . $term . '</option>';
                            }
                        }
                        echo '</select><br />' . $desc;
                        break;
                        // slider
                    // slider
                    case 'slider':
                        $value = $meta != '' ? intval($meta) : '0';
                        echo '<div id="' . $id . '-slider"></div>
									<input type="text" name="' . $id . '" id="' . $id . '" value="' . $value . '" size="5" />
									<br />' . $desc;
                        break;
                        // image
                    // image
                    case 'image':
                        $image = VIBE_PLUGIN_URL . '/vibe-customtypes/metaboxes/images/image.png';
                        echo '<span class="meta_box_default_image" style="display:none">' . $image . '</span>';
                        if ($meta) {
                            $image = wp_get_attachment_image_src(intval($meta), 'full');
                            $image = $image[0];
                        } else {
                            $meta = '';
                        }
                        echo '<input name="' . $id . '" type="hidden" class="meta_box_upload_image" value="' . intval($meta) . '" />
										<img src="' . $image . '" class="meta_box_preview_image" alt="" /><br />
											<input class="meta_box_upload_image_button button" type="button" rel="' . $post->ID . '" value="Choose Image" />
											<small>&nbsp;<a href="#" class="meta_box_clear_image_button">Remove Image</a></small>
											<br clear="all" />' . $desc;
                        break;
                        // repeatable
                    // repeatable
                    case 'questions_repeatable':
                        echo '<a class="meta_box_repeatable_add button button-primary button-large" href="#">' . __('Add Question', 'vibe-customtypes') . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        $i = 0;
                        if ($meta) {
                            foreach ($meta as $row) {
                                $user_info = get_userdata($row);
                                echo '<li><span class="sort handle dashicons dashicons-sort"></span>
												<input type="text" name="' . $field['id'] . '[]" id="' . $field['id'] . $i . '" value="' . esc_attr($row) . '" size="30" /><span>' . $user_info->user_login . '</span>
												<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                                $i++;
                            }
                        }
                        echo '<li class="hide"><span class="sort handle dashicons dashicons-sort"></span>
										<input type="text" rel-name="' . $field['id'] . '[question][]" id="' . $field['id'] . $i . '" value="" placeholder="' . __('Type Question', 'vibe-customtypes') . '" size="30" />
										<input type="text" rel-name="' . $field['id'] . '[option][]" id="' . $field['id'] . $i . '" value="" placeholder="' . __('Type Question', 'vibe-customtypes') . '" size="30" />
										<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '</ul>
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                    case 'user_repeatable':
                        echo '<a class="meta_box_repeatable_add button button-primary button-large" href="#">' . __('Add More', 'vibe-customtypes') . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        $i = 0;
                        if ($meta) {
                            foreach ($meta as $row) {
                                $user_info = get_userdata($row);
                                echo '<li><span class="sort handle dashicons dashicons-sort"></span>
												<input type="text" name="' . $field['id'] . '[]" id="' . $field['id'] . $i . '" value="' . esc_attr($row) . '" size="30" /><span>' . $user_info->user_login . '</span>
												<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                                $i++;
                            }
                        }
                        echo '<li class="hide"><span class="sort handle dashicons dashicons-sort"></span>
											<input type="text" rel-name="' . $field['id'] . '[]" id="' . $field['id'] . $i . '" value="" size="30" />
											<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '</ul>
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                    case 'repeatable':
                        echo '<a class="meta_box_repeatable_add button button-primary button-large" href="#">' . __('Add More', 'vibe-customtypes') . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        if ($meta) {
                            foreach ($meta as $row) {
                                echo '<li><span class="sort handle dashicons dashicons-sort"></span>
												<input type="text" name="' . $field['id'] . '[]" id="' . $field['id'] . '" value="' . esc_attr($row) . '" size="30" />
												<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                            }
                        }
                        echo '<li class="hide"><span class="sort handle dashicons dashicons-sort"></span>
											<input type="text" rel-name="' . $field['id'] . '[]" id="' . $field['id'] . '" value="" size="30" />
											<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '</ul>
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                    case 'repeatable_count':
                        echo '<a class="meta_box_repeatable_add button button-primary button-large" href="#">' . __('Add More', 'vibe-customtypes') . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        $i = 1;
                        echo '<li class="hide"><span class="sort handle dashicons dashicons-sort"></span><span class="count">' . $i . '</span>
											<input type="text" rel-name="' . $field['id'] . '[]" id="' . $field['id'] . '" value="" size="30" />
											<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        if ($meta) {
                            foreach ($meta as $row) {
                                echo '<li><span class="sort handle dashicons dashicons-sort"></span><span class="count">' . $i . '</span>
												<input type="text" name="' . $field['id'] . '[]" id="' . $field['id'] . '" value="' . esc_attr($row) . '" size="30" />
												<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                                $i++;
                            }
                        }
                        echo '</ul>
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                        // repeatable
                    // repeatable
                    case 'repeatable_select':
                        echo '<a class="meta_box_repeatable_add button button-primary button-large" href="#">' . __('Add More', 'vibe-customtypes') . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        $i = 0;
                        if ($meta) {
                            foreach ($meta as $row) {
                                echo '<li><span class="sort handle dashicons dashicons-sort"></span>
											  <select name="' . $field['id'] . '[' . $i . ']" id="' . $field['id'] . '">';
                                foreach ($options as $option) {
                                    echo '<option value="' . $option['value'] . '" ' . selected($option['value'], esc_attr($row)) . '>' . $option['label'] . '</option>';
                                }
                                echo '</select>
												<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a>
												</li>';
                                $i++;
                            }
                        }
                        echo '<li  class="hide"><span class="sort handle dashicons dashicons-sort"></span>
											<select name="' . $field['id'] . '[' . $i . ']" id="' . $field['id'] . '">';
                        foreach ($options as $option) {
                            echo '<option value="' . $option['value'] . '">' . $option['label'] . '</option>';
                        }
                        echo '</select>
											<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '</ul>
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                    case 'repeatable_selectcpt':
                        echo '<a class="meta_box_repeatable_add button button-primary button-large" href="#">' . __('Add More', 'vibe-customtypes') . '</a>
									<ul id="' . $field['id'] . '-repeatable" class="meta_box_repeatable">';
                        $total_marks = 0;
                        if ($meta) {
                            if (!empty($meta['ques']) && !empty($meta['marks'])) {
                                $quess = $meta['ques'];
                                $marks = $meta['marks'];
                                foreach ($quess as $i => $ques) {
                                    if (!isset($marks[$i]) || !$marks[$i]) {
                                        $marks[$i] = 0;
                                    }
                                    $total_marks = $total_marks + intval(esc_attr($marks[$i]));
                                    echo '<li><span class="sort handle dashicons dashicons-sort"></span>
												<input type="hidden" name="' . $field['id'] . '[ques][]" value="' . $ques . '" />
												<strong>' . get_the_title($ques) . '</strong>
											  	<input type="number" name="' . $field['id'] . '[marks][]" placeholder="' . __('Marks for a Correct answer', 'vibe-customtypes') . '" value="' . esc_attr($marks[$i]) . '"/>
											  	<a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a>
												</li>';
                                }
                            }
                        }
                        echo '<li class="hide">
									<select rel-name="' . $field['id'] . '[ques][]" data-cpt="' . $post_type . '" data-placeholder="' . __('Select', 'vibe-customtypes') . '">';
                        echo '</select>
								 <input type="number" rel-name="' . $field['id'] . '[marks][]" placeholder="' . __('Marks for a Correct answer', 'vibe-customtypes') . '" value="0" /> 
								 <a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-no"></span></a></li>';
                        echo '</ul>

							    <strong>' . __('Total marks for the Quiz :', 'vibe-customtypes') . ' <span id="total_quiz_marks"> ' . $total_marks . '</span></strong><br />
								<span class="description">' . $field['desc'] . '</span>';
                        break;
                    case 'payments':
                        echo '<ul id="instructor_payments"><li><strong>' . __('Instructor', 'vibe-customtypes') . '</strong><span>' . __('Email', 'vibe-customtypes') . '</span><span>' . __('Commission', 'vibe-customtypes') . '</span></li>';
                        if (is_array($meta)) {
                            foreach ($meta as $key => $row) {
                                if (isset($row['set']) && $row['set']) {
                                    echo '<li><strong>' . get_the_author_meta('display_name', $key) . '</strong><span>' . $row['email'] . '</span><span>' . $row['commission'] . '</span></li>';
                                }
                            }
                        }
                        echo '</ul>';
                        break;
                    case 'gallery':
                        global $post;
                        ?>
                        <div id="vibe_gallery_container">
                        <ul class="vibe_gallery">
						<?php 
                        if (!$meta || $meta == 'Array') {
                            $meta = '';
                        }
                        if ($meta) {
                            $attachments = array_filter(explode(',', $meta));
                            if (is_array($attachments) && $attachments) {
                                foreach ($attachments as $attachment_id) {
                                    echo '<li class="slider_image" data-attachment_id="' . $attachment_id . '">
									' . wp_get_attachment_image($attachment_id, 'full') . '
									<ul class="actions">
										<li><a href="#" class="delete" title="' . __('Delete image', 'vibe-customtypes') . '">' . __('Delete', 'vibe-customtypes') . '</a></li>
									</ul>
								</li>';
                                }
                            }
                        }
                        ?>
				</ul>
	            <?php 
                        echo '<input type="hidden" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" />';
                        ?>
		

	</div>
	<p class="add_gallery hide-if-no-js">
		<a href="#" class="button-primary"><?php 
                        _e('Add Gallery images', 'vibe-customtypes');
                        ?>
</a>
	</p>
	<script type="text/javascript">
		jQuery(document).ready(function($){

			// Uploading files
			var media_frame;
			var $image_gallery_ids = $('#<?php 
                        echo $id;
                        ?>
');
			var $media = $('#vibe_gallery_container ul.vibe_gallery');

			jQuery('.add_gallery').on( 'click', 'a', function( event ) {

				var $el = $(this);
				var attachment_ids = $image_gallery_ids.val();

				event.preventDefault();

				// If the media frame already exists, reopen it.
				if ( media_frame ) {
					media_frame.open();
					return;
				}

				// Create the media frame.
				media_frame = wp.media.frames.downloadable_file = wp.media({
					// Set the title of the modal.
					title: '<?php 
                        _e('Add Images to Gallery', 'vibe-customtypes');
                        ?>
',
					button: {
						text: '<?php 
                        _e('Add to Gallery', 'vibe-customtypes');
                        ?>
',
					},
					multiple: true
				});

				// When an image is selected, run a callback.
				media_frame.on( 'select', function() {

					var selection = media_frame.state().get('selection');

					selection.map( function( attachment ) {

						attachment = attachment.toJSON();

						if ( attachment.id ) {
							attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;

							$media.append('\
								<li class="slider_image" data-attachment_id="' + attachment.id + '">\
									<img src="' + attachment.url + '" />\
									<ul class="actions">\
										<li><a href="#" class="delete" title="<?php 
                        _e('Delete', 'vibe-customtypes');
                        ?>
"><?php 
                        _e('Delete', 'vibe-customtypes');
                        ?>
</a></li>\
									</ul>\
								</li>');
						}

					} );

					$image_gallery_ids.val( attachment_ids );
				});

				// Finally, open the modal.
				media_frame.open();
			});

			// Image ordering
			$media.sortable({
				items: 'li.slider_image',
				cursor: 'move',
				scrollSensitivity:40,
				forcePlaceholderSize: true,
				forceHelperSize: false,
				helper: 'clone',
				opacity: 0.65,
				placeholder: 'wc-metabox-sortable-placeholder',
				start:function(event,ui){
					ui.item.css('background-color','#f6f6f6');
				},
				stop:function(event,ui){
					ui.item.removeAttr('style');
				},
				update: function(event, ui) {
					var attachment_ids = '';

					$('#vibe_media_container ul li.image').css('cursor','default').each(function() {
						var attachment_id = jQuery(this).attr( 'data-attachment_id' );
						attachment_ids = attachment_ids + attachment_id + ',';
					});

					$image_gallery_ids.val( attachment_ids );
				}
			});

			// Remove images
			$('#vibe_gallery_container').on( 'click', 'a.delete', function() {

				$(this).closest('li.slider_image').remove();

				var attachment_ids = '';

				$('#vibe_gallery_container ul li.slider_image').css('cursor','default').each(function() {
					var attachment_id = jQuery(this).attr( 'data-attachment_id' );
					attachment_ids = attachment_ids + attachment_id + ',';
				});

				$image_gallery_ids.val( attachment_ids );

				return false;
			} );

		});
	</script>
	<?php 
                        break;
                    case 'audio':
                        global $post;
                        ?>
                                                <div id="vibe_audio_container">
                        <ul class="vibe_audio">
			<?php 
                        if (!$meta || $meta == 'Array') {
                            $meta = '';
                        }
                        if ($meta) {
                            $attachments = array_filter(explode(',', $meta));
                            if (is_array($attachments) && $attachments) {
                                foreach ($attachments as $attachment_id) {
                                    echo '<li class="audio_file" data-attachment_id="' . $attachment_id . '">
							' . wp_get_attachment_image($attachment_id, 'full') . '
							<ul class="actions">
								<li><a href="#" class="delete" title="' . __('Delete audio file', 'vibe-customtypes') . '">' . __('Delete', 'vibe-customtypes') . '</a></li>
							</ul>
						</li>';
                                }
                            }
                        }
                        ?>
		</ul>
            <?php 
                        echo '<input type="hidden" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" />';
                        ?>
		

	</div>
	<p class="add_audio hide-if-no-js">
		<a href="#" class="button-primary"><?php 
                        _e('Add Audio Files', 'vibe-customtypes');
                        ?>
</a>
	</p>
	<script type="text/javascript">
		jQuery(document).ready(function($){

			// Uploading files
			var media_frame;
			var $image_gallery_ids = $('#<?php 
                        echo $id;
                        ?>
');
			var $media = $('#vibe_audio_container ul.vibe_audio');

			jQuery('.add_audio').on( 'click', 'a', function( event ) {

				var $el = $(this);
				var attachment_ids = $image_gallery_ids.val();

				event.preventDefault();

				// If the media frame already exists, reopen it.
				if ( media_frame ) {
					media_frame.open();
					return;
				}

				// Create the media frame.
				media_frame = wp.media.frames.downloadable_file = wp.media({
					// Set the title of the modal.
					title: '<?php 
                        _e('Add Audio', 'vibe-customtypes');
                        ?>
',
					button: {
						text: '<?php 
                        _e('Add Audio', 'vibe-customtypes');
                        ?>
',
					},
					multiple: true
				});

				// When an image is selected, run a callback.
				media_frame.on( 'select', function() {

					var selection = media_frame.state().get('selection');

					selection.map( function( attachment ) {

						attachment = attachment.toJSON();

						if ( attachment.id ) {
							attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;

							$media.append('\
								<li class="audio_file" data-attachment_id="' + attachment.id + '">\
									<img src="' + attachment.url + '" />\
									<ul class="actions">\
										<li><a href="#" class="delete" title="<?php 
                        _e('Delete', 'vibe-customtypes');
                        ?>
"><?php 
                        _e('Delete', 'vibe-customtypes');
                        ?>
</a></li>\
									</ul>\
								</li>');
						}

					} );

					$image_gallery_ids.val( attachment_ids );
				});

				// Finally, open the modal.
				media_frame.open();
			});

			// Image ordering
			$media.sortable({
				items: 'li.audio_file',
				cursor: 'move',
				scrollSensitivity:40,
				forcePlaceholderSize: true,
				forceHelperSize: false,
				helper: 'clone',
				opacity: 0.65,
				placeholder: 'wc-metabox-sortable-placeholder',
				start:function(event,ui){
					ui.item.css('background-color','#f6f6f6');
				},
				stop:function(event,ui){
					ui.item.removeAttr('style');
				},
				update: function(event, ui) {
					var attachment_ids = '';

					$('#vibe_audio_container ul li.audio_file').css('cursor','default').each(function() {
						var attachment_id = jQuery(this).attr( 'data-attachment_id' );
						attachment_ids = attachment_ids + attachment_id + ',';
					});

					$image_gallery_ids.val( attachment_ids );
				}
			});

			// Remove images
			$('#vibe_audio_container').on( 'click', 'a.delete', function() {

				$(this).closest('li.audio_file').remove();

				var attachment_ids = '';

				$('#vibe_audio_container ul li.audio_file').css('cursor','default').each(function() {
					var attachment_id = jQuery(this).attr( 'data-attachment_id' );
					attachment_ids = attachment_ids + attachment_id + ',';
				});

				$image_gallery_ids.val( attachment_ids );

				return false;
			} );

		});
	</script>
	<?php 
                        break;
                    case 'video':
                        global $post;
                        ?>
                                                <div id="vibe_media_container">
                        <ul class="vibe_media">
			<?php 
                        if (!$meta || $meta == 'Array') {
                            $meta = '';
                        }
                        if ($meta) {
                            $attachments = array_filter(explode(',', $meta));
                            if (is_array($attachments) && $attachments) {
                                foreach ($attachments as $attachment_id) {
                                    echo '<li class="slider_image" data-attachment_id="' . $attachment_id . '">
							' . wp_get_attachment_image($attachment_id, 'full') . '
							<ul class="actions">
								<li><a href="#" class="delete" title="' . __('Delete video file', 'vibe-customtypes') . '">' . __('Delete', 'vibe-customtypes') . '</a></li>
							</ul>
						</li>';
                                }
                            }
                        }
                        ?>
		</ul>
            <?php 
                        echo '<input type="hidden" name="' . $id . '" id="' . $id . '" value="' . esc_attr($meta) . '" />';
                        ?>
		

	</div>
	<p class="add_video hide-if-no-js">
		<a href="#" class="button-primary"><?php 
                        _e('Add Video Files', 'vibe-customtypes');
                        ?>
</a>
	</p>
	<script type="text/javascript">
		jQuery(document).ready(function($){

			// Uploading files
			var media_frame;
			var $image_gallery_ids = $('#<?php 
                        echo $id;
                        ?>
');
			var $media = $('#vibe_media_container ul.vibe_media');

			jQuery('.add_video').on( 'click', 'a', function( event ) {

				var $el = $(this);
				var attachment_ids = $image_gallery_ids.val();

				event.preventDefault();

				// If the media frame already exists, reopen it.
				if ( media_frame ) {
					media_frame.open();
					return;
				}

				// Create the media frame.
				media_frame = wp.media.frames.downloadable_file = wp.media({
					// Set the title of the modal.
					title: '<?php 
                        _e('Add Video Files', 'vibe-customtypes');
                        ?>
',
					button: {
						text: '<?php 
                        _e('Add Video', 'vibe-customtypes');
                        ?>
',
					},
					multiple: true
				});

				// When an image is selected, run a callback.
				media_frame.on( 'select', function() {

					var selection = media_frame.state().get('selection');

					selection.map( function( attachment ) {

						attachment = attachment.toJSON();

						if ( attachment.id ) {
							attachment_ids = attachment_ids ? attachment_ids + "," + attachment.id : attachment.id;

							$media.append('\
								<li class="slider_image" data-attachment_id="' + attachment.id + '">\
									<img src="' + attachment.url + '" />\
									<ul class="actions">\
										<li><a href="#" class="delete" title="<?php 
                        _e('Delete', 'vibe-customtypes');
                        ?>
"><?php 
                        _e('Delete', 'vibe-customtypes');
                        ?>
</a></li>\
									</ul>\
								</li>');
						}

					} );

					$image_gallery_ids.val( attachment_ids );
				});

				// Finally, open the modal.
				media_frame.open();
			});

			// Image ordering
			$media.sortable({
				items: 'li.slider_image',
				cursor: 'move',
				scrollSensitivity:40,
				forcePlaceholderSize: true,
				forceHelperSize: false,
				helper: 'clone',
				opacity: 0.65,
				placeholder: 'wc-metabox-sortable-placeholder',
				start:function(event,ui){
					ui.item.css('background-color','#f6f6f6');
				},
				stop:function(event,ui){
					ui.item.removeAttr('style');
				},
				update: function(event, ui) {
					var attachment_ids = '';

					$('#vibe_media_container ul li.image').css('cursor','default').each(function() {
						var attachment_id = jQuery(this).attr( 'data-attachment_id' );
						attachment_ids = attachment_ids + attachment_id + ',';
					});

					$image_gallery_ids.val( attachment_ids );
				}
			});

			// Remove images
			$('#vibe_media_container').on( 'click', 'a.delete', function() {

				$(this).closest('li.slider_image').remove();

				var attachment_ids = '';

				$('#vibe_media_container ul li.slider_image').css('cursor','default').each(function() {
					var attachment_id = jQuery(this).attr( 'data-attachment_id' );
					attachment_ids = attachment_ids + attachment_id + ',';
				});

				$image_gallery_ids.val( attachment_ids );

				return false;
			} );

		});
	</script>
	<?php 
                        break;
                    case 'note':
                        echo $desc;
                        break;
                    default:
                        $type = apply_filters('custom_meta_box_type', $type, $meta, $id, $desc, $post_type);
                        break;
                }
                //end switch
                echo '</td></tr>';
            }
        }
        // end foreach
        echo '</table>';
        // end table
        wp_nonce_field('vibe_security', 'vibe_security');
    }
예제 #2
0
 function update_object($group_id, $fields)
 {
     $group = new BP_Groups_Group($group_id);
     foreach ($fields as $field_name => $value) {
         if (isset($group->field_name)) {
             $group->field_name = $value;
         }
     }
     $group->save();
     return $group;
 }
/**
 * Export groups in CSV format
 * @param string|array $format short name of format OR list of columns
 * Column lists are based on properties of the Groups object, not columns in the database
 */
function bp_group_organizer_export_csv($format)
{
    if (is_array($format)) {
        $format = implode(',', $format);
    }
    // If Group Hierarchy is not installed, path is equivalent to slug
    if ($format == 'path' && !bpgo_is_hierarchy_available()) {
        $format == 'slug';
    }
    if (!strpos($format, ',')) {
        // Short name was specified
        switch ($format) {
            case 'slug':
                $fields = array('id', 'creator_id', 'name', 'slug', 'description', 'status', 'enable_forum', 'date_created');
                if (bpgo_is_hierarchy_available()) {
                    $fields[] = 'parent_id';
                }
                break;
            case 'path':
                $fields = array('creator_id', 'name', 'path', 'description', 'status', 'enable_forum', 'date_created');
                break;
            default:
                $fields = apply_filters('bp_group_organizer_get_csv_fields_format_' . $format, array());
                break;
        }
    } else {
        $fields = explode(',', $format);
    }
    if (!count($fields)) {
        return false;
    }
    if (bpgo_is_hierarchy_available()) {
        $groups_list = array('groups' => BP_Groups_Hierarchy::get_tree());
        $groups_list['total'] = count($groups_list['groups']);
    } else {
        $groups_list = BP_Groups_Group::get('alphabetical');
    }
    header('Content-Type: application/force-download');
    header('Content-Disposition: attachment; filename="' . 'bp-group-export.csv' . '";');
    // Print header row
    echo implode(',', $fields) . "\n";
    foreach ($groups_list['groups'] as $group) {
        foreach ($fields as $key => $field) {
            if ($field == 'path') {
                echo BP_Groups_Hierarchy::get_path($group->id);
            } else {
                if (in_array($field, array('name', 'description'))) {
                    echo '"' . stripslashes($group->{$field}) . '"';
                } else {
                    echo $group->{$field};
                }
            }
            if ($key < count($fields) - 1) {
                echo ',';
            }
        }
        echo "\n";
    }
    die;
}
function bp_group_management_delete_group($group_id)
{
    global $bp;
    $group = new BP_Groups_Group($group_id);
    if (!$group->delete()) {
        return false;
    }
    /* Delete all group activity from activity streams */
    if (function_exists('bp_activity_delete_by_item_id')) {
        bp_activity_delete_by_item_id(array('item_id' => $group_id, 'component' => $bp->groups->id));
    }
    // Remove all outstanding invites for this group
    groups_delete_all_group_invites($group_id);
    // Remove all notifications for any user belonging to this group
    bp_core_delete_all_notifications_by_type($group_id, $bp->groups->slug);
    do_action('groups_delete_group', $group_id);
    return true;
}
function themefix_buddypress_groups_settings_extension($args)
{
    $groups = BP_Groups_Group::get(array('type' => 'alphabetical', 'per_page' => 100));
    $the_groups = array();
    foreach ($groups['groups'] as $key => $group) {
        $the_groups[$group->id] = $group->name;
    }
    $extra = array('buddypress-group' => array('label' => __('Display a BuddyPress Group activity instead of post(s)', 'thememixfc'), 'description' => '', 'type' => 'checkbox'), 'buddypress-group-group' => array('label' => __('BuddyPress Group', 'thememixfc'), 'description' => '', 'type' => 'select', 'options' => $the_groups, 'requires' => array('buddypress-group', '', true)));
    $args['col1'][0] = array_slice($args['col1'][0], 0, 1, true) + $extra + array_slice($args['col1'][0], 1, count($args['col1'][0]) - 1, true);
    return $args;
}
function themefix_buddypress_groups_settings_extension($args)
{
    if (!class_exists('BP_Groups_Group')) {
        return $args;
    }
    $groups = BP_Groups_Group::get(array('type' => 'alphabetical', 'per_page' => 100));
    $the_groups = array();
    foreach ($groups['groups'] as $key => $group) {
        $the_groups[$group->id] = $group->name;
    }
    $extra = array('buddypress-group' => array('label' => __('Display a BuddyPress Group activity instead of post(s)', 'thememix-pro-genesis'), 'description' => '', 'type' => 'checkbox'), 'buddypress-group-group' => array('label' => __('BuddyPress Group', 'thememix-pro-genesis'), 'description' => '', 'type' => 'select', 'options' => $the_groups, 'requires' => array('buddypress-group', '', true)), 'buddypress-group-count' => array('label' => __('Number of activities to show', 'thememix-pro-genesis'), 'description' => '', 'type' => 'select', 'options' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 9), 'requires' => array('buddypress-group', '', true)));
    $args['col1'][0] = array_slice($args['col1'][0], 0, 1, true) + $extra + array_slice($args['col1'][0], 1, count($args['col1'][0]) - 1, true);
    return $args;
}
 function get_groups()
 {
     $user_id = get_current_user_id();
     if (!isset($_POST['security']) || !wp_verify_nonce($_POST['security'], 'security') || !current_user_can('edit_posts')) {
         _e('Security check Failed. Contact Administrator.', 'wplms-front-end');
         die;
     }
     $q = $_POST['q'];
     if (class_exists('BP_Groups_Group')) {
         $vgroups = BP_Groups_Group::get(array('type' => 'alphabetical', 'per_page' => 999, 's' => $q['term']));
         $return = array();
         foreach ($vgroups['groups'] as $vgroup) {
             $return[] = array('id' => $vgroup->id, 'text' => $vgroup->name);
         }
     }
     print_r(json_encode($return));
     die;
 }
예제 #8
0
 function bp_group_reviews_extension()
 {
     global $bp;
     $this->group_id = BP_Groups_Group::group_exists($bp->current_item);
     $this->name = __('Reviews', 'bpgr');
     $this->slug = $bp->group_reviews->slug;
     $this->nav_item_position = 22;
     $this->enable_create_step = false;
     $this->enable_nav_item = BP_Group_Reviews::current_group_is_available();
     $this->enable_edit_item = false;
     if (isset($_POST['review_submit'])) {
         check_admin_referer('review_submit');
         $has_posted = '';
         if (empty($_POST['review_content']) || !(int) $_POST['rating']) {
             // Something has gone wrong. Save the user's submitted data to reinsert into the post box after redirect
             $cookie_data = array('review_content' => $_POST['review_content'], 'rating' => $_POST['rating']);
             $cookie = json_encode($cookie_data);
             setcookie('bpgr-data', $cookie, time() + 60 * 60 * 24, COOKIEPATH);
             bp_core_add_message(__("Please make sure you fill in the review, and don't forget to provide a rating!", 'bpgr'), 'error');
         } else {
             /* Auto join this user if they are not yet a member of this group */
             if (!is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member($bp->loggedin_user->id, $bp->groups->current_group->id)) {
                 groups_join_group($bp->groups->current_group->id, $bp->loggedin_user->id);
             }
             if ($rating_id = $this->post_review(array('content' => $_POST['review_content'], 'rating' => (int) $_POST['rating']))) {
                 bp_core_add_message("Your review was posted successfully!");
                 $has_posted = groups_get_groupmeta($bp->groups->current_group->id, 'posted_review');
                 if (!in_array((int) $bp->loggedin_user->id, (array) $has_posted)) {
                     $has_posted[] = (int) $bp->loggedin_user->id;
                 }
                 groups_update_groupmeta($bp->groups->current_group->id, 'posted_review', $has_posted);
                 if ((int) $_POST['rating'] < 0) {
                     $_POST['rating'] = 1;
                 }
                 if ((int) $_POST['rating'] > 5) {
                     $_POST['rating'] = 5;
                 }
             } else {
                 bp_core_add_message("There was a problem posting your review, please try again.", 'error');
             }
         }
         bp_core_redirect(apply_filters('bpgr_after_post_redirect', trailingslashit(bp_get_group_permalink($bp->groups->current_group) . $this->slug, $has_posted)));
     }
 }
function gtags_get_groups_by_tag($limit = null, $page = null, $user_id = false, $search_terms = false, $group_tag = null)
{
    global $wpdb, $bp;
    $hidden_sql = $search_sql = $tag_sql = $pag_sql = '';
    if ($limit && $page) {
        $pag_sql = $wpdb->prepare(" LIMIT %d, %d", intval(($page - 1) * $limit), intval($limit));
    }
    if (!is_user_logged_in()) {
        $hidden_sql = "AND g.status != 'hidden'";
    }
    if ($search_terms) {
        $search_terms = like_escape($wpdb->escape($search_terms));
        $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
    }
    if ($group_tag) {
        $group_tag = like_escape($wpdb->escape($group_tag));
        $group_tag = stripslashes($group_tag);
        $tag_sql = " AND ( gm3.meta_value LIKE '%%{$group_tag}%%' )";
    }
    $paged_groups = $wpdb->get_results("SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity, gm3.meta_value as gtags_group_tags FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name} g WHERE g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND gm3.meta_key = 'gtags_group_tags'  {$hidden_sql} {$search_sql} {$tag_sql} ORDER BY CONVERT(gm1.meta_value, SIGNED) DESC {$pag_sql}");
    // this is commented out because it doesn't really work due to the over-inclusive issue.
    //$total_groups = $wpdb->get_var( "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_groupmeta} gm3, {$bp->groups->table_name} g WHERE g.id = gm1.group_id AND g.id = gm2.group_id AND g.id = gm3.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND gm3.meta_key = 'gtags_group_tags' {$hidden_sql} {$search_sql} {$tag_sql}" );
    // loop through results and return only exact matches in comma separated list.
    $paged_groups2 = array();
    foreach ((array) $paged_groups as $group) {
        $items = explode(",", $group->gtags_group_tags);
        $match = false;
        foreach ($items as $item) {
            if (trim(strtolower($item)) == strtolower($group_tag)) {
                $match = true;
            }
        }
        if ($match == true) {
            $paged_groups2[] = $group;
        }
    }
    $total_groups = count($paged_groups2);
    // in place of the commented out code above
    foreach ((array) $paged_groups2 as $group) {
        $group_ids[] = $group->id;
    }
    $group_ids = $wpdb->escape(join(',', (array) $group_ids));
    $paged_groups2 = BP_Groups_Group::get_group_extras(&$paged_groups2, $group_ids, 'popular');
    return array('groups' => $paged_groups2, 'total' => $total_groups);
}
예제 #10
0
 /**
  * Set up component global data.
  *
  * The BP_GROUPS_SLUG constant is deprecated, and only used here for
  * backwards compatibility.
  *
  * @since 1.5.0
  *
  * @see BP_Component::setup_globals() for a description of arguments.
  *
  * @param array $args See BP_Component::setup_globals() for a description.
  */
 public function setup_globals($args = array())
 {
     $bp = buddypress();
     // Define a slug, if necessary.
     if (!defined('BP_GROUPS_SLUG')) {
         define('BP_GROUPS_SLUG', $this->id);
     }
     // Global tables for groups component.
     $global_tables = array('table_name' => $bp->table_prefix . 'bp_groups', 'table_name_members' => $bp->table_prefix . 'bp_groups_members', 'table_name_groupmeta' => $bp->table_prefix . 'bp_groups_groupmeta');
     // Metadata tables for groups component.
     $meta_tables = array('group' => $bp->table_prefix . 'bp_groups_groupmeta');
     // All globals for groups component.
     // Note that global_tables is included in this array.
     $args = array('slug' => BP_GROUPS_SLUG, 'root_slug' => isset($bp->pages->groups->slug) ? $bp->pages->groups->slug : BP_GROUPS_SLUG, 'has_directory' => true, 'directory_title' => _x('Groups', 'component directory title', 'buddypress'), 'notification_callback' => 'groups_format_notifications', 'search_string' => _x('Search Groups...', 'Component directory search', 'buddypress'), 'global_tables' => $global_tables, 'meta_tables' => $meta_tables);
     parent::setup_globals($args);
     /* Single Group Globals **********************************************/
     // Are we viewing a single group?
     if (bp_is_groups_component() && ($group_id = BP_Groups_Group::group_exists(bp_current_action()))) {
         $bp->is_single_item = true;
         /**
          * Filters the current PHP Class being used.
          *
          * @since 1.5.0
          *
          * @param string $value Name of the class being used.
          */
         $current_group_class = apply_filters('bp_groups_current_group_class', 'BP_Groups_Group');
         if ($current_group_class == 'BP_Groups_Group') {
             $this->current_group = groups_get_group(array('group_id' => $group_id, 'populate_extras' => true));
         } else {
             /**
              * Filters the current group object being instantiated from previous filter.
              *
              * @since 1.5.0
              *
              * @param object $value Newly instantiated object for the group.
              */
             $this->current_group = apply_filters('bp_groups_current_group_object', new $current_group_class($group_id));
         }
         // When in a single group, the first action is bumped down one because of the
         // group name, so we need to adjust this and set the group name to current_item.
         $bp->current_item = bp_current_action();
         $bp->current_action = bp_action_variable(0);
         array_shift($bp->action_variables);
         // Using "item" not "group" for generic support in other components.
         if (bp_current_user_can('bp_moderate')) {
             bp_update_is_item_admin(true, 'groups');
         } else {
             bp_update_is_item_admin(groups_is_user_admin(bp_loggedin_user_id(), $this->current_group->id), 'groups');
         }
         // If the user is not an admin, check if they are a moderator.
         if (!bp_is_item_admin()) {
             bp_update_is_item_mod(groups_is_user_mod(bp_loggedin_user_id(), $this->current_group->id), 'groups');
         }
         // Is the logged in user a member of the group?
         if (is_user_logged_in() && groups_is_user_member(bp_loggedin_user_id(), $this->current_group->id)) {
             $this->current_group->is_user_member = true;
         } else {
             $this->current_group->is_user_member = false;
         }
         // Should this group be visible to the logged in user?
         if ('public' == $this->current_group->status || $this->current_group->is_user_member) {
             $this->current_group->is_visible = true;
         } else {
             $this->current_group->is_visible = false;
         }
         // If this is a private or hidden group, does the user have access?
         if ('private' == $this->current_group->status || 'hidden' == $this->current_group->status) {
             if ($this->current_group->is_user_member && is_user_logged_in() || bp_current_user_can('bp_moderate')) {
                 $this->current_group->user_has_access = true;
             } else {
                 $this->current_group->user_has_access = false;
             }
         } else {
             $this->current_group->user_has_access = true;
         }
         // Check once if the current group has a custom front template.
         $this->current_group->front_template = bp_groups_get_front_template($this->current_group);
         // Set current_group to 0 to prevent debug errors.
     } else {
         $this->current_group = 0;
     }
     /**
      * Filters the list of illegal groups names/slugs.
      *
      * @since 1.0.0
      *
      * @param array $value Array of illegal group names/slugs.
      */
     $this->forbidden_names = apply_filters('groups_forbidden_names', array('my-groups', 'create', 'invites', 'send-invites', 'forum', 'delete', 'add', 'admin', 'request-membership', 'members', 'settings', 'avatar', $this->slug, $this->root_slug));
     // If the user was attempting to access a group, but no group by that name was found, 404.
     if (bp_is_groups_component() && empty($this->current_group) && bp_current_action() && !in_array(bp_current_action(), $this->forbidden_names)) {
         bp_do_404();
         return;
     }
     /**
      * Filters the preconfigured groups creation steps.
      *
      * @since 1.1.0
      *
      * @param array $value Array of preconfigured group creation steps.
      */
     $this->group_creation_steps = apply_filters('groups_create_group_steps', array('group-details' => array('name' => _x('Details', 'Group screen nav', 'buddypress'), 'position' => 0), 'group-settings' => array('name' => _x('Settings', 'Group screen nav', 'buddypress'), 'position' => 10)));
     // If avatar uploads are not disabled, add avatar option.
     $disabled_avatar_uploads = (int) bp_disable_group_avatar_uploads();
     if (!$disabled_avatar_uploads && $bp->avatar->show_avatars) {
         $this->group_creation_steps['group-avatar'] = array('name' => _x('Photo', 'Group screen nav', 'buddypress'), 'position' => 20);
     }
     if (bp_group_use_cover_image_header()) {
         $this->group_creation_steps['group-cover-image'] = array('name' => _x('Cover Image', 'Group screen nav', 'buddypress'), 'position' => 25);
     }
     // If friends component is active, add invitations.
     if (bp_is_active('friends')) {
         $this->group_creation_steps['group-invites'] = array('name' => _x('Invites', 'Group screen nav', 'buddypress'), 'position' => 30);
     }
     /**
      * Filters the list of valid groups statuses.
      *
      * @since 1.1.0
      *
      * @param array $value Array of valid group statuses.
      */
     $this->valid_status = apply_filters('groups_valid_status', array('public', 'private', 'hidden'));
     // Auto join group when non group member performs group activity.
     $this->auto_join = defined('BP_DISABLE_AUTO_GROUP_JOIN') && BP_DISABLE_AUTO_GROUP_JOIN ? false : true;
 }
예제 #11
0
/**
 * Catch requests for a random group page (example.com/groups/?random-group) and redirect.
 */
function groups_action_redirect_to_random_group()
{
    if (bp_is_groups_component() && isset($_GET['random-group'])) {
        $group = BP_Groups_Group::get_random(1, 1);
        bp_core_redirect(trailingslashit(bp_get_groups_directory_permalink() . $group['groups'][0]->slug));
    }
}
예제 #12
0
 function get_random($limit = null, $page = null, $user_id = 0, $search_terms = false, $populate_extras = true, $exclude = false)
 {
     global $wpdb, $bp;
     $pag_sql = $hidden_sql = $search_sql = $exclude_sql = '';
     if (!empty($limit) && !empty($page)) {
         $pag_sql = $wpdb->prepare(" LIMIT %d, %d", intval(($page - 1) * $limit), intval($limit));
     }
     if (!is_user_logged_in() || !bp_current_user_can('bp_moderate') && $user_id != bp_loggedin_user_id()) {
         $hidden_sql = "AND g.status != 'hidden'";
     }
     if (!empty($search_terms)) {
         $search_terms = like_escape($wpdb->escape($search_terms));
         $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
     }
     if (!empty($exclude)) {
         $exclude = $wpdb->escape($exclude);
         $exclude_sql = " AND g.id NOT IN ({$exclude})";
     }
     if (!empty($user_id)) {
         $user_id = $wpdb->escape($user_id);
         $paged_groups = $wpdb->get_results("SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE g.id = m.group_id AND g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' {$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql} ORDER BY rand() {$pag_sql}");
         $total_groups = $wpdb->get_var("SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m LEFT JOIN {$bp->groups->table_name_groupmeta} gm ON m.group_id = gm.group_id INNER JOIN {$bp->groups->table_name} g ON m.group_id = g.id WHERE gm.meta_key = 'last_activity'{$hidden_sql} {$search_sql} AND m.user_id = {$user_id} AND m.is_confirmed = 1 AND m.is_banned = 0 {$exclude_sql}");
     } else {
         $paged_groups = $wpdb->get_results("SELECT g.*, gm1.meta_value as total_member_count, gm2.meta_value as last_activity FROM {$bp->groups->table_name_groupmeta} gm1, {$bp->groups->table_name_groupmeta} gm2, {$bp->groups->table_name} g WHERE g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' {$hidden_sql} {$search_sql} {$exclude_sql} ORDER BY rand() {$pag_sql}");
         $total_groups = $wpdb->get_var("SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm INNER JOIN {$bp->groups->table_name} g ON gm.group_id = g.id WHERE gm.meta_key = 'last_activity'{$hidden_sql} {$search_sql} {$exclude_sql}");
     }
     if (!empty($populate_extras)) {
         foreach ((array) $paged_groups as $group) {
             $group_ids[] = $group->id;
         }
         $group_ids = $wpdb->escape(join(',', (array) $group_ids));
         $paged_groups = BP_Groups_Group::get_group_extras($paged_groups, $group_ids, 'newest');
     }
     return array('groups' => $paged_groups, 'total' => $total_groups);
 }
 function __construct($args = array())
 {
     // Backward compatibility with old method of passing arguments
     if (!is_array($args) || func_num_args() > 1) {
         _deprecated_argument(__METHOD__, '1.7', sprintf(__('Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress'), __METHOD__, __FILE__));
         $old_args_keys = array(0 => 'user_id', 1 => 'type', 2 => 'page', 3 => 'per_page', 4 => 'max', 5 => 'slug', 6 => 'search_terms', 7 => 'populate_extras', 8 => 'include', 9 => 'exclude', 10 => 'show_hidden', 11 => 'page_arg');
         $func_args = func_get_args();
         $args = bp_core_parse_args_array($old_args_keys, $func_args);
     }
     $defaults = array('type' => 'active', 'page' => 1, 'per_page' => 20, 'max' => false, 'show_hidden' => false, 'page_arg' => 'grpage', 'user_id' => 0, 'slug' => false, 'include' => false, 'exclude' => false, 'search_terms' => '', 'meta_query' => false, 'populate_extras' => true, 'update_meta_cache' => true);
     $r = wp_parse_args($args, $defaults);
     extract($r);
     $this->pag_page = isset($_REQUEST[$page_arg]) ? intval($_REQUEST[$page_arg]) : $page;
     $this->pag_num = isset($_REQUEST['num']) ? intval($_REQUEST['num']) : $per_page;
     if (bp_current_user_can('bp_moderate') || is_user_logged_in() && $user_id == bp_loggedin_user_id()) {
         $show_hidden = true;
     }
     if ('invites' == $type) {
         $this->groups = groups_get_invites_for_user($user_id, $this->pag_num, $this->pag_page, $exclude);
     } else {
         if ('single-group' == $type) {
             $this->single_group = true;
             if (groups_get_current_group()) {
                 $group = groups_get_current_group();
             } else {
                 $group = groups_get_group(array('group_id' => BP_Groups_Group::get_id_from_slug($r['slug']), 'populate_extras' => $r['populate_extras']));
             }
             // backwards compatibility - the 'group_id' variable is not part of the
             // BP_Groups_Group object, but we add it here for devs doing checks against it
             //
             // @see https://buddypress.trac.wordpress.org/changeset/3540
             //
             // this is subject to removal in a future release; devs should check against
             // $group->id instead
             $group->group_id = $group->id;
             $this->groups = array($group);
         } else {
             $this->groups = groups_get_groups(array('type' => $type, 'order' => $order, 'orderby' => $orderby, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'search_terms' => $search_terms, 'meta_query' => $meta_query, 'include' => $include, 'exclude' => $exclude, 'populate_extras' => $populate_extras, 'update_meta_cache' => $update_meta_cache, 'show_hidden' => $show_hidden));
         }
     }
     if ('invites' == $type) {
         $this->total_group_count = (int) $this->groups['total'];
         $this->group_count = (int) $this->groups['total'];
         $this->groups = $this->groups['groups'];
     } else {
         if ('single-group' == $type) {
             if (empty($group->id)) {
                 $this->total_group_count = 0;
                 $this->group_count = 0;
             } else {
                 $this->total_group_count = 1;
                 $this->group_count = 1;
             }
         } else {
             if (empty($max) || $max >= (int) $this->groups['total']) {
                 $this->total_group_count = (int) $this->groups['total'];
             } else {
                 $this->total_group_count = (int) $max;
             }
             $this->groups = $this->groups['groups'];
             if (!empty($max)) {
                 if ($max >= count($this->groups)) {
                     $this->group_count = count($this->groups);
                 } else {
                     $this->group_count = (int) $max;
                 }
             } else {
                 $this->group_count = count($this->groups);
             }
         }
     }
     // Build pagination links
     if ((int) $this->total_group_count && (int) $this->pag_num) {
         $this->pag_links = paginate_links(array('base' => add_query_arg(array($page_arg => '%#%', 'num' => $this->pag_num, 's' => $search_terms, 'sortby' => $this->sort_by, 'order' => $this->order)), 'format' => '', 'total' => ceil((int) $this->total_group_count / (int) $this->pag_num), 'current' => $this->pag_page, 'prev_text' => _x('&larr;', 'Group pagination previous text', 'buddypress'), 'next_text' => _x('&rarr;', 'Group pagination next text', 'buddypress'), 'mid_size' => 1));
     }
 }
예제 #14
0
/**
 * Render the content for deposits/item/new.
 */
function humcore_deposit_form()
{
    if (!empty($_POST)) {
        $deposit_id = humcore_deposit_file();
        if ($deposit_id) {
            $review_url = sprintf('/deposits/item/%1$s/review/', $deposit_id);
            wp_redirect($review_url);
            exit;
        }
    }
    if (!humcore_check_externals()) {
        echo '<h3>New <em>CORE</em> Deposit</h3>';
        echo "<p>We're so sorry, but one of the components of <em>CORE</em> is currently down and it can't accept deposits just now. We're working on it (and we're delighted that you want to share your work) so please come back and try again later.</p>";
        $wp_referer = wp_get_referer();
        printf('<a href="%1$s" class="button white" style="line-height: 1.2em;">Go Back</a>', !empty($wp_referer) && !strpos($wp_referer, 'item/new') ? $wp_referer : '/deposits/');
        return;
    }
    $current_group_id = '';
    preg_match('~.*?/groups/(.*[^/]?)/deposits/~i', wp_get_referer(), $slug_match);
    if (!empty($slug_match)) {
        $current_group_id = BP_Groups_Group::get_id_from_slug($slug_match[1]);
    }
    $user_id = bp_loggedin_user_id();
    $user_firstname = get_the_author_meta('first_name', $user_id);
    $user_lastname = get_the_author_meta('last_name', $user_id);
    ?>

<script type="text/javascript">
	var MyAjax = {
		ajaxurl : '<?php 
    echo esc_url(admin_url('admin-ajax.php'));
    ?>
',
		flash_swf_url : '<?php 
    echo esc_url(includes_url('/js/plupload/Moxie.swf'));
    ?>
',
		silverlight_xap_url : '<?php 
    echo esc_url(includes_url('/js/plupload/Moxie.xap'));
    ?>
',
		_ajax_nonce : '<?php 
    echo esc_attr(wp_create_nonce('file-upload'));
    ?>
',
	};
</script>

<h3>New CORE Deposit</h3>
<div id="filelist">Your browser doesn't have Flash, Silverlight or HTML5 support.</div>
<div id="progressbar">
	<div id="indicator"></div>
</div>
<div id="console">Select the file you wish to upload and deposit. *</div>

<div id="container">
	<button id="pickfile">Select File</button> 
<!--    <button id="uploadfile">Upload</button> -->
	<?php 
    $wp_referer = wp_get_referer();
    printf('<a href="%1$s" class="button white" style="line-height: 1.2em;">Cancel</a>', !empty($wp_referer) && !strpos($wp_referer, 'item/new') ? $wp_referer : '/deposits/');
    ?>
</div>

<script type='text/javascript' src='/js/retrieveDOI.js'></script>

<form id="deposit-form" class="standard-form" method="post" action="" enctype="multipart/form-data">

	<input type="hidden" name="action" id="action" value="deposit_file" />
	<?php 
    wp_nonce_field('new_core_deposit', 'new_core_deposit_nonce');
    ?>

        <input type="hidden" name="selected_temp_name" id="selected_temp_name" value="<?php 
    if (!empty($_POST['selected_temp_name'])) {
        echo sanitize_text_field($_POST['selected_temp_name']);
    }
    ?>
" />
        <input type="hidden" name="selected_file_name" id="selected_file_name" value="<?php 
    if (!empty($_POST['selected_file_name'])) {
        echo sanitize_text_field($_POST['selected_file_name']);
    }
    ?>
" />
        <input type="hidden" name="selected_file_type" id="selected_file_type" value="<?php 
    if (!empty($_POST['selected_file_type'])) {
        echo sanitize_text_field($_POST['selected_file_type']);
    }
    ?>
" />
        <input type="hidden" name="selected_file_size" id="selected_file_size" value="<?php 
    if (!empty($_POST['selected_file_type'])) {
        echo sanitize_text_field($_POST['selected_file_size']);
    }
    ?>
" />

	<div id="deposit-metadata-entries">

	<div id="deposit-title-entry">
		<label for="deposit-title">Title</label>
		<input type="text" id="deposit-title-unchanged" name="deposit-title-unchanged" size="75" class="long" value="<?php 
    if (!empty($_POST['deposit-title-unchanged'])) {
        echo wp_kses(stripslashes($_POST['deposit-title-unchanged']), array('b' => array(), 'em' => array(), 'strong' => array()));
    }
    ?>
" />
		<span class="description">*</span>
	</div>
	<p>
	<div id="deposit-genre-entry">
		<label for="deposit-genre">Item Type</label>
		<select name="deposit-genre" id="deposit-genre" class="js-basic-single-required" data-placeholder="Select an item type">
			<option class="level-0" value=""></option>
<?php 
    $genre_list = humcore_deposits_genre_list();
    $posted_genre = '';
    if (!empty($_POST['deposit-genre'])) {
        $posted_genre = sanitize_text_field($_POST['deposit-genre']);
    }
    foreach ($genre_list as $genre_key => $genre_value) {
        printf('			<option class="level-0" %1$s value="%2$s">%3$s</option>' . "\n", $genre_key == $posted_genre ? 'selected="selected"' : '', $genre_key, $genre_value);
    }
    ?>
		</select>
		<span class="description">*</span>
	</div>
	</p>
	<div id="deposit-conference-title-entry">
		<label for="deposit-conference-title-entry-list">Conference Title</label>
		<input type="text" name="deposit-conference-title" size="75" class="text" value="<?php 
    if (!empty($_POST['deposit-conference-title'])) {
        echo sanitize_text_field($_POST['deposit-conference-title']);
    }
    ?>
" />
	</div>

	<div id="deposit-organization-entry">
		<label for="deposit-organization-entry-list">Conference Host Organization</label>
		<input type="text" name="deposit-organization" size="60" class="text" value="<?php 
    if (!empty($_POST['deposit-organization'])) {
        echo sanitize_text_field($_POST['deposit-organization']);
    }
    ?>
" />
	</div>

	<div id="deposit-institution-entry">
		<label for="deposit-institution-entry-list">Name of Institution</label>
		<input type="text" name="deposit-institution" size="60" class="text" value="<?php 
    if (!empty($_POST['deposit-institution'])) {
        echo sanitize_text_field($_POST['deposit-institution']);
    }
    ?>
" />
	</div>
	<p>
	<div id="deposit-abstract-entry">
		<label for="deposit-abstract">Description or Abstract</label>
		<textarea class="abstract_area" rows="12" autocomplete="off" cols="80" name="deposit-abstract-unchanged" id="deposit-abstract-unchanged"><?php 
    if (!empty($_POST['deposit-abstract-unchanged'])) {
        echo wp_kses(stripslashes($_POST['deposit-abstract-unchanged']), array('b' => array(), 'em' => array(), 'strong' => array()));
    }
    ?>
</textarea>
		<span class="description">*</span>
	<div class="character-count"></div>
	</div>
	</p>
	<p>
	<div id="deposit-on-behalf-flag-entry">
<?php 
    $committee_list = humcore_deposits_user_committee_list(bp_loggedin_user_id());
    $committee_list = '';
    //disable for now
    if (empty($committee_list)) {
        ?>
        <input type="hidden" name="deposit-on-behalf-flag" id="deposit-on-behalf-flag" value="" />
<?php 
    } else {
        ?>
		<label for="deposit-on-behalf-flag-list">Depositor</label>
		<span class="description">Is this deposit being made on behalf of a committee?</span>
			<input type="radio" name="deposit-on-behalf-flag" value="yes" <?php 
        if (!empty($_POST['deposit-on-behalf-flag'])) {
            checked(sanitize_text_field($_POST['deposit-on-behalf-flag']), 'yes');
        }
        ?>
>Yes &nbsp;
			<input type="radio" name="deposit-on-behalf-flag" value="no" <?php 
        if (!empty($_POST['deposit-on-behalf-flag'])) {
            checked(sanitize_text_field($_POST['deposit-on-behalf-flag']), 'no');
        } else {
            echo 'checked="checked"';
        }
        ?>
>No &nbsp;
<?php 
    }
    ?>
	</div>
	</p>
	<p>
	<div id="deposit-other-authors-entry">
		<label for="deposit-other-authors-entry-list">Authors</label>
		<span class="description">Add any authors in addition to yourself.</span>
		<ul id="deposit-other-authors-entry-list">
		<li>
		<table id="deposit-other-authors-entry-table"><tbody>
		<tr><td class="noBorderTop" style="width:205px;">
		First Name
		</td><td class="noBorderTop" style="width:205px;">
		Last Name
		</td><td class="noBorderTop">
		</td><td class="noBorderTop">
		</td></tr>
		<tr><td class="borderTop" style="width:205px;">
		<?php 
    echo esc_html($user_firstname);
    ?>
		</td><td class="borderTop" style="width:205px;">
		<?php 
    echo esc_html($user_lastname);
    ?>
		</td><td class="borderTop">
		<input type="button" id="deposit-insert-other-author-button" class="button add_author" value="Add Another">
		</td></tr>

<?php 
    if (!empty($_POST['deposit-other-authors-first-name']) && !empty($_POST['deposit-other-authors-last-name'])) {
        $other_authors = array_map(function ($first_name, $last_name) {
            return array('first_name' => sanitize_text_field($first_name), 'last_name' => sanitize_text_field($last_name));
        }, $_POST['deposit-other-authors-first-name'], $_POST['deposit-other-authors-last-name']);
        foreach ($other_authors as $author_array) {
            if (!empty($author_array['first_name']) && !empty($author_array['last_name'])) {
                ?>
		<tr><td class="borderTop" style="width:205px;">
		<input type="text" name="deposit-other-authors-first-name[]" class="text" value="<?php 
                echo $author_array['first_name'];
                ?>
" />
		</td><td class="borderTop" style="width:205px;">
		<input type="text" name="deposit-other-authors-last-name[]" class="text deposit-other-authors-last-name" value="<?php 
                echo $author_array['last_name'];
                ?>
" />
		</td><td class="borderTop">
		</td></tr>
<?php 
            }
        }
    }
    ?>
		</tbody></table>
		</li>
		</ul>
	</div>
	</p>
	<p>
	<div id="deposit-committee-entry">
<?php 
    if (empty($committee_list)) {
        ?>
	<input type="hidden" name="deposit-committee" id="deposit-committee" value="" />
<?php 
    } else {
        ?>

		<label for="deposit-committee">Committee</label>
		<select name="deposit-committee" id="deposit-committee" class="js-basic-single-optional" data-placeholder="Select committee">
			<option class="level-0" selected value=""></option>
<?php 
        $posted_committee = '';
        if (!empty($_POST['deposit-committee'])) {
            $posted_committee = sanitize_text_field($_POST['deposit-committee']);
        }
        foreach ($committee_list as $committee_key => $committee_value) {
            printf('			<option class="level-1" %1$s value="%2$s">%3$s</option>' . "\n", $committee_key == $posted_committee ? 'selected="selected"' : '', $committee_key, $committee_value);
        }
        ?>
		</select>
<?php 
    }
    ?>
	</div>
	</p>
	<p>
	<div id="deposit-subject-entry">
		<label for="deposit-subject">Subjects</label>
		<span class="description">Assign up to five subject fields to your item.<br />Please let us know if you would like to <a href="mailto:commons@mla.org?subject=CORE" target="_blank">suggest additional subject
 fields</a>.</span><br />
		<select name="deposit-subject[]" id="deposit-subject[]" class="js-basic-multiple" multiple="multiple" data-placeholder="Select subjects">
<?php 
    $subject_list = humcore_deposits_subject_list();
    $posted_subject_list = array();
    if (!empty($_POST['deposit-subject'])) {
        $posted_subject_list = array_map('sanitize_text_field', $_POST['deposit-subject']);
    }
    foreach ($subject_list as $subject_key => $subject_value) {
        printf('			<option class="level-1" %1$s value="%2$s">%3$s</option>' . "\n", in_array($subject_key, $posted_subject_list) ? 'selected="selected"' : '', $subject_key, $subject_value);
    }
    ?>
		</select>
	</div>
	</p>
	<p>
	<div id="deposit-group-entry">
		<label for="deposit-group">Forums</label>
		<span class="description">Share this item with up to five <em>MLA Commons</em> forums.</span><br />
		<select name="deposit-group[]" id="deposit-group[]" class="js-basic-multiple" multiple="multiple" data-placeholder="Select forums">
<?php 
    $group_list = humcore_deposits_group_list();
    $posted_group_list = array();
    if (!empty($_POST['deposit-group'])) {
        $posted_group_list = array_map('sanitize_text_field', $_POST['deposit-group']);
    }
    foreach ($group_list as $group_key => $group_value) {
        printf('			<option class="level-1" %1$s value="%2$s">%3$s</option>' . "\n", $current_group_id == $group_key || in_array($group_key, $posted_group_list) ? 'selected="selected"' : '', $group_key, $group_value);
    }
    ?>
		</select>
	</div>
	</p>
	<p>
	<div id="deposit-keyword-entry">
		<label for="deposit-keyword">Tags</label>
		<span class="description">Enter up to five tags to further categorize this item.</span><br />
		<select name="deposit-keyword[]" id="deposit-keyword[]" class="js-basic-multiple-tags" multiple="multiple" data-placeholder="Enter tags">
<?php 
    $keyword_list = humcore_deposits_keyword_list();
    $posted_keyword_list = array();
    if (!empty($_POST['deposit-keyword'])) {
        $posted_keyword_list = array_map('sanitize_text_field', $_POST['deposit-keyword']);
    }
    foreach ($keyword_list as $keyword_key => $keyword_value) {
        printf('			<option class="level-1" %1$s value="%2$s">%3$s</option>' . "\n", in_array($keyword_key, $posted_keyword_list) ? 'selected="selected"' : '', $keyword_key, $keyword_value);
    }
    ?>
		</select>
	</div>
	</p>
	<p>
	<div id="deposit-resource-type-entry">
		<label for="deposit-resource-type">File Type</label>
		<select name="deposit-resource-type" id="deposit-resource-type" class="js-basic-single-optional" data-placeholder="Select a file type" data-allowClear="true">
			<option class="level-0" selected value=""></option>
<?php 
    $resource_type_list = humcore_deposits_resource_type_list();
    $posted_resource_type = '';
    if (!empty($_POST['deposit-resource-type'])) {
        $posted_resource_type = sanitize_text_field($_POST['deposit-resource-type']);
    }
    foreach ($resource_type_list as $resource_key => $resource_value) {
        printf('			<option class="level-0" %1$s value="%2$s">%3$s</option>' . "\n", $resource_key == $posted_resource_type ? 'selected="selected"' : '', $resource_key, $resource_value);
    }
    ?>
		</select>
	</div>
	</p>
	<p>
	<div id="deposit-notes-entry">
		<label for="deposit-notes">Notes or Background</label>
		<span class="description">Any additional information about your item?</span><br />
		<textarea name="deposit-notes-unchanged" class="the-notes" id="deposit-notes-unchanged"><?php 
    if (!empty($_POST['deposit-notes-unchanged'])) {
        echo wp_kses(stripslashes($_POST['deposit-notes-unchanged']), array('b' => array(), 'em' => array(), 'strong' => array()));
    }
    ?>
</textarea>
	<div class="character-count"></div>
	</div>
	</p>
	<p>
	<div id="deposit-license-type-entry">
		<label for="deposit-license-type">Creative Commons License</label>
		<span class="description">By default, and in accordance with section 2 of the <em>MLA Commons</em> terms of service, no one may reuse this content in any way. Should you wish to allow others to distribute, display, modify, or otherwise reuse your content, please attribute it with the appropriate Creative Commons license from the drop-down menu below. See <a onclick="target='_blank'" href="http://creativecommons.org/licenses/">this page</a> for more information about the different types of Creative Commons licenses.</span><br /><br />
		<select name="deposit-license-type" id="deposit-license-type" class="js-basic-single-required">
<?php 
    $license_type_list = humcore_deposits_license_type_list();
    $posted_license_type = '';
    if (!empty($_POST['deposit-license-type'])) {
        $posted_license_type = sanitize_text_field($_POST['deposit-license-type']);
    }
    foreach ($license_type_list as $license_key => $license_value) {
        printf('			<option class="level-1" %1$s value="%2$s">%3$s</option>' . "\n", $license_key == $posted_license_type ? 'selected="selected"' : '', $license_key, $license_value);
    }
    ?>
		</select>
		<span class="description">*</span>
	</div>
	</p>
	<p>
	<div id="deposit-publication-type-entry">
		<label for="deposit-publication-type">Published?</label>
		<span class="description">Check journal or publisher open access policies at <a onclick="target='_blank'" href="http://www.sherpa.ac.uk/romeo/">SHERPA/RoMEO</a> for previously published work.</span><br /><br />
			<input type="radio" name="deposit-publication-type" value="book" <?php 
    if (!empty($_POST['deposit-publication-type'])) {
        checked(sanitize_text_field($_POST['deposit-publication-type']), 'book');
    }
    ?>
>Book &nbsp;
			<input type="radio" name="deposit-publication-type" value="journal-article" <?php 
    if (!empty($_POST['deposit-publication-type'])) {
        checked(sanitize_text_field($_POST['deposit-publication-type']), 'journal-article');
    }
    ?>
>Journal &nbsp;
			<input type="radio" name="deposit-publication-type" value="conference-proceeding" <?php 
    if (!empty($_POST['deposit-publication-type'])) {
        checked(sanitize_text_field($_POST['deposit-publication-type']), 'conference-proceeding');
    }
    ?>
>Conference proceeding &nbsp;
			<input type="radio" name="deposit-publication-type" value="none" <?php 
    if (!empty($_POST['deposit-publication-type'])) {
        checked(sanitize_text_field($_POST['deposit-publication-type']), 'none');
    } else {
        echo 'checked="checked"';
    }
    ?>
>Not published &nbsp;
	</div>
	</p>
	<div id="deposit-book-entries">

		<div id="deposit-book-doi-entry">
			<label for="deposit-book-doi">Publisher DOI</label>
			<input type="text" id="deposit-book-doi" name="deposit-book-doi" class="long" value="<?php 
    if (!empty($_POST['deposit-book-doi'])) {
        echo sanitize_text_field($_POST['deposit-book-doi']);
    }
    ?>
" />
		</div>

		<div id="deposit-book-publisher-entry">
			<label for="deposit-book-publisher">Publisher</label>
			<input type="text" id="deposit-book-publisher" name="deposit-book-publisher" size="40" class="long" value="<?php 
    if (!empty($_POST['deposit-book-publisher'])) {
        echo sanitize_text_field($_POST['deposit-book-publisher']);
    }
    ?>
" />
		</div>

		<div id="deposit-book-publish-date-entry">
			<label for="deposit-book-publish-date">Pub Date</label>
			<input type="text" id="deposit-book-publish-date" name="deposit-book-publish-date" class="text" value="<?php 
    if (!empty($_POST['deposit-book-publish-date'])) {
        echo sanitize_text_field($_POST['deposit-book-publish-date']);
    }
    ?>
" />
		</div>

		<div id="deposit-book-title-entry">
			<label for="deposit-book-title">Book Title</label>
			<input type="text" id="deposit-book-title" name="deposit-book-title" size="60" class="long" value="<?php 
    if (!empty($_POST['deposit-book-title'])) {
        echo sanitize_text_field($_POST['deposit-book-title']);
    }
    ?>
" />
		</div>

		<div id="deposit-book-author-entry">
			<label for="deposit-book-author">Book Author or Editor</label>
			<input type="text" id="deposit-book-author" name="deposit-book-author" class="long" value="<?php 
    if (!empty($_POST['deposit-book-author'])) {
        echo sanitize_text_field($_POST['deposit-book-author']);
    }
    ?>
" />
		</div>

		<div id="deposit-book-chapter-entry">
			<label for="deposit-book-chapter">Chapter</label>
			<input type="text" id="deposit-book-chapter" name="deposit-book-chapter" class="text" value="<?php 
    if (!empty($_POST['deposit-book-chapter'])) {
        echo sanitize_text_field($_POST['deposit-book-chapter']);
    }
    ?>
" />
		</div>

		<div id="deposit-book-pages-entry">
			<label for="deposit-book-start-page"><span>Start Page</span>
			<input type="text" id="deposit-book-start-page" name="deposit-book-start-page" size="5" class="text" value="<?php 
    if (!empty($_POST['deposit-book-start-page'])) {
        echo sanitize_text_field($_POST['deposit-book-start-page']);
    }
    ?>
" />
			</label>
			<label for="deposit-book-end-page"><span>End Page</span>
			<input type="text" id="deposit-book-end-page" name="deposit-book-end-page" size="5" class="text" value="<?php 
    if (!empty($_POST['deposit-book-end-page'])) {
        echo sanitize_text_field($_POST['deposit-book-end-page']);
    }
    ?>
" />
			</label>
			<br style='clear:both'>
		</div>

		<div id="deposit-book-isbn-entry">
			<label for="deposit-book-isbn">ISBN</label>
			<input type="text" id="deposit-book-isbn" name="deposit-book-isbn" class="text" value="<?php 
    if (!empty($_POST['deposit-book-isbn'])) {
        echo sanitize_text_field($_POST['deposit-book-isbn']);
    }
    ?>
" />
		</div>

	</div>

	<div id="deposit-journal-entries">

		<div id="deposit-journal-doi-entry">
			<label for="deposit-journal-doi">Publisher DOI</label>
			<input type="text" id="deposit-journal-doi" name="deposit-journal-doi" class="long" value="<?php 
    if (!empty($_POST['deposit-journal-doi'])) {
        echo sanitize_text_field($_POST['deposit-journal-doi']);
    }
    ?>
" />
		</div>

		<div id="deposit-journal-publisher-entry">
			<label for="deposit-journal-publisher">Publisher</label>
			<input type="text" id="deposit-journal-publisher" name="deposit-journal-publisher" size="40" class="long" value="<?php 
    if (!empty($_POST['deposit-journal-publisher'])) {
        echo sanitize_text_field($_POST['deposit-journal-publisher']);
    }
    ?>
" />
		</div>

		<div id="deposit-journal-publish-date-entry">
			<label for="deposit-journal-publish-date">Pub Date</label>
			<input type="text" id="deposit-journal-publish-date" name="deposit-journal-publish-date" class="text" value="<?php 
    if (!empty($_POST['deposit-journal-publish-date'])) {
        echo sanitize_text_field($_POST['deposit-journal-publish-date']);
    }
    ?>
" />
		</div>

		<div id="deposit-journal-title-entry">
			<label for="deposit-journal-title">Journal Title</label>
			<input type="text" id="deposit-journal-title" name="deposit-journal-title" size="75" class="long" value="<?php 
    if (!empty($_POST['deposit-journal-title'])) {
        echo sanitize_text_field($_POST['deposit-journal-title']);
    }
    ?>
" />
		</div>

		<div id="deposit-journal-volume-entry">
			<label for="deposit-journal-volume"><span>Volume</span>
			<input type="text" id="deposit-journal-volume" name="deposit-journal-volume" class="text" value="<?php 
    if (!empty($_POST['deposit-journal-volume'])) {
        echo sanitize_text_field($_POST['deposit-journal-volume']);
    }
    ?>
" />
			</label>
			<label for="deposit-journal-issue"><span>Issue</span>
			<input type="text" id="deposit-journal-issue" name="deposit-journal-issue" class="text" value="<?php 
    if (!empty($_POST['deposit-journal-volume'])) {
        echo sanitize_text_field($_POST['deposit-journal-volume']);
    }
    ?>
" />
			</label>
			<br style='clear:both'>
		</div>

		<div id="deposit-journal-pages-entry">
			<label for="deposit-journal-start-page"><span>Start Page</span>
			<input type="text" id="deposit-journal-start-page" name="deposit-journal-start-page" size="5" class="text" value="<?php 
    if (!empty($_POST['deposit-journal-start-page'])) {
        echo sanitize_text_field($_POST['deposit-journal-start-page']);
    }
    ?>
" />
			</label>
			<label for="deposit-journal-end-page"><span>End Page</span>
			<input type="text" id="deposit-journal-end-page" name="deposit-journal-end-page" size="5" class="text" value="<?php 
    if (!empty($_POST['deposit-journal-start-page'])) {
        echo sanitize_text_field($_POST['deposit-journal-start-page']);
    }
    ?>
" />
			</label>
			<br style='clear:both'>
		</div>

		<div id="deposit-journal-issn-entry">
			<label for="deposit-journal-issn">ISSN</label>
			<input type="text" id="deposit-journal-issn" name="deposit-journal-issn" class="text" value="<?php 
    if (!empty($_POST['deposit-journal-issn'])) {
        echo sanitize_text_field($_POST['deposit-journal-issn']);
    }
    ?>
" />
		</div>

	</div>

	<div id="deposit-conference-proceedings">

		<div id="deposit-proceeding-doi-entry">
			<label for="deposit-proceeding-doi">Publisher DOI</label>
			<input type="text" id="deposit-proceeding-doi" name="deposit-proceeding-doi" class="long" value="<?php 
    if (!empty($_POST['deposit-proceeding-doi'])) {
        echo sanitize_text_field($_POST['deposit-proceeding-doi']);
    }
    ?>
" />
		</div>

		<div id="deposit-proceeding-publisher-entry">
			<label for="deposit-proceeding-publisher">Publisher</label>
			<input type="text" id="deposit-proceeding-publisher" name="deposit-proceeding-publisher" size="40" class="long" value="<?php 
    if (!empty($_POST['deposit-proceeding-publisher'])) {
        echo sanitize_text_field($_POST['deposit-proceeding-publisher']);
    }
    ?>
" />
		</div>

		<div id="deposit-proceeding-publish-date-entry">
			<label for="deposit-proceeding-publish-date">Pub Date</label>
			<input type="text" id="deposit-proceeding-publish-date" name="deposit-proceeding-publish-date" class="text" value="<?php 
    if (!empty($_POST['deposit-proceeding-publish-date'])) {
        echo sanitize_text_field($_POST['deposit-proceeding-publish-date']);
    }
    ?>
" />
		</div>

		<div id="deposit-proceeding-title-entry">
			<label for="deposit-proceeding-title">Proceeding Title</label>
			<input type="text" id="deposit-proceeding-title" name="deposit-proceeding-title" size="75" class="long" value="<?php 
    if (!empty($_POST['deposit-proceeding-title'])) {
        echo sanitize_text_field($_POST['deposit-proceeding-title']);
    }
    ?>
" />
		</div>

		<div id="deposit-proceeding-pages-entry">
			<label for="deposit-proceeding-start-page"><span>Start Page</span>
			<input type="text" id="deposit-proceeding-start-page" name="deposit-proceeding-start-page" size="5" class="text" value="<?php 
    if (!empty($_POST['deposit-proceeding-start-page'])) {
        echo sanitize_text_field($_POST['deposit-proceeding-start-page']);
    }
    ?>
" />
			</label>
			<label for="deposit-proceeding-end-page"><span>End Page</span>
			<input type="text" id="deposit-proceeding-end-page" name="deposit-proceeding-end-page" size="5" class="text" value="<?php 
    if (!empty($_POST['deposit-proceeding-start-page'])) {
        echo sanitize_text_field($_POST['deposit-proceeding-start-page']);
    }
    ?>
" />
			</label>
			<br style='clear:both'>
		</div>

	</div>

	<div id="deposit-non-published-entries">

		<div id="deposit-non-published-date-entry">
			<label for="deposit-non-published-date">Date of Creation</label>
			<input type="text" id="deposit-non-published-date" name="deposit-non-published-date" class="text" value="<?php 
    if (!empty($_POST['deposit-non-published-date'])) {
        echo sanitize_text_field($_POST['deposit-non-published-date']);
    }
    ?>
" />
		</div>

	</div>

	<input id="submit" name="submit" type="submit" value="Deposit" />
	<?php 
    $wp_referer = wp_get_referer();
    printf('<a href="%1$s" class="button white">Cancel</a>', !empty($wp_referer) && !strpos($wp_referer, 'item/new') ? $wp_referer : '/deposits/');
    ?>

	</div>

</form>
	<br /><span class="description">Required fields are marked *.</span><br />
<br />

<?php 
}
 /**
  * figure out the current used buddypress group_id
  *
  * @since   0.1
  * @access public
  * @returns int  $group_id
  */
 public function bd_docs_get_current_group_id()
 {
     $group_id = false;
     if (bp_docs_is_bp_docs_page() && NULL !== bp_docs_get_current_doc()) {
         $group_id = bp_docs_get_associated_group_id(get_the_ID());
     } else {
         $path = $_SERVER['REQUEST_URI'];
         $p_arr = explode('/', $path);
         if (isset($p_arr[1]) && $p_arr[1] == bp_get_groups_root_slug()) {
             $slug = $p_arr[2];
             $group_id = BP_Groups_Group::get_id_from_slug($slug);
         } else {
             $u = parse_url(wp_get_referer());
             $path = $u['path'];
             $p_arr = explode('/', $path);
             if (isset($p_arr[1]) && $p_arr[1] == bp_get_groups_root_slug()) {
                 $slug = $p_arr[2];
                 $group_id = BP_Groups_Group::get_id_from_slug($slug);
             }
         }
     }
     return $group_id;
 }
예제 #16
0
 /**
  * Refresh the total_member_count for a group.
  *
  * @since BuddyPress (1.8.0)
  *
  * @param int $group_id ID of the group.
  *
  * @return bool True on success, false on failure.
  */
 public static function refresh_total_member_count_for_group($group_id)
 {
     return groups_update_groupmeta($group_id, 'total_member_count', (int) BP_Groups_Group::get_total_member_count($group_id));
 }
/**
 * Display a summary of the associated group
 *
 * @since 1.2
 *
 * @param int $group_id
 */
function bp_docs_associated_group_summary($group_id = 0)
{
    $html = '';
    if (!$group_id) {
        if (isset($_GET['group'])) {
            $group_slug = $_GET['group'];
            $group_id = BP_Groups_Group::get_id_from_slug($group_slug);
        } else {
            $doc_id = is_singular() ? get_the_ID() : 0;
            $group_id = bp_docs_get_associated_group_id($doc_id);
        }
    }
    $group_id = intval($group_id);
    if ($group_id) {
        $group = groups_get_group('group_id=' . $group_id);
        if (!empty($group->name)) {
            $group_link = esc_url(bp_get_group_permalink($group));
            $group_avatar = bp_core_fetch_avatar(array('item_id' => $group_id, 'object' => 'group', 'type' => 'thumb', 'width' => '40', 'height' => '40'));
            $group_member_count = sprintf(1 == $group->total_member_count ? __('%s member', 'bp-docs') : __('%s members', 'bp-docs'), intval($group->total_member_count));
            switch ($group->status) {
                case 'public':
                    $group_type_string = __('Public Group', 'bp-docs');
                    break;
                case 'private':
                    $group_type_string = __('Private Group', 'bp-docs');
                    break;
                case 'hidden':
                    $group_type_string = __('Hidden Group', 'bp-docs');
                    break;
                default:
                    $group_type_string = '';
                    break;
            }
            $html .= '<a href="' . $group_link . '">' . $group_avatar . '</a>';
            $html .= '<div class="item">';
            $html .= '<a href="' . $group_link . '">' . esc_html($group->name) . '</a>';
            $html .= '<div class="meta">' . $group_type_string . ' / ' . $group_member_count . '</div>';
            $html .= '</div>';
        }
    }
    echo $html;
}
예제 #18
0
/**
 * Catch requests for a random group page (example.com/groups/?random-group) and redirect.
 */
function groups_action_redirect_to_random_group()
{
    if (bp_is_groups_component() && isset($_GET['random-group'])) {
        $group = BP_Groups_Group::get_random(1, 1);
        bp_core_redirect(bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group['groups'][0]->slug . '/');
    }
}
예제 #19
0
function bp_group_documents_bulk_uploads()
{
    /* this is normally taken care of with AJAX, but it is here as well in case
    	something goes wrong (no javascript) and a normal form submit occurs */
    bp_group_documents_check_uploads_submit();
    //array to hold file names
    $files = array();
    $dh = opendir(BP_GROUP_DOCUMENTS_ADMIN_UPLOAD_PATH);
    if ($dh) {
        //read files
        while (false !== ($file = readdir($dh))) {
            if ($file != '.' && $file != '..') {
                $files[] = $file;
            }
        }
        if (!empty($files)) {
            ?>
			<hr />
			<div id="bp-group-documents-bulk-message"></div>
			<h2><?php 
            _e('Bulk File Uploads', 'bp-group-documents');
            ?>
</h2>
			<div id="bp-group-documents-bulk-upload">
			<div class="doc-list">
			<?php 
            foreach ($files as $file) {
                ?>
				<div class="doc-single">
					<form method="post" class="bp-group-documents-admin-upload" action="">
					<input type="hidden" name="file" value="<?php 
                echo $file;
                ?>
" />
					<div class="file"><strong><?php 
                echo $file;
                ?>
</strong></div>
					<div class="group"><select name="group">
						<option value="0"><?php 
                _e('Select Group...', 'bp-group-documents');
                ?>
</option>
	<?php 
                $groups_list = BP_Groups_Group::get_alphabetically();
                $groups_list = $groups_list['groups'];
                foreach ($groups_list as $group) {
                    echo "<option value='{$group->id}'>" . stripslashes($group->name) . "</option>\n";
                }
                ?>
					</select></div>
					<div class="name"><input type="text" name="name" /></div>
					<div class="description"><textarea name="description"></textarea></div>
					<div class="submit"><input type="submit" value="<?php 
                _e('Move File', 'bp-group-documents');
                ?>
" /></div>
					</form>
					<div class="clear"></div>
				</div>
			<?php 
            }
            echo '</div></div>';
        }
        closedir($dh);
    }
}
예제 #20
0
/**
 * Get a total count of all topics of a given status, across groups/forums.
 *
 * @since BuddyPress (1.5.0)
 *
 * @param string $status Which groups to count. 'public', 'private', 'hidden',
 *        'all'. Default: 'public'.
 * @param string $search_terms Optional. Limit by a search term.
 * @return int The topic count.
 */
function groups_total_forum_topic_count($status = 'public', $search_terms = false)
{
    return apply_filters('groups_total_forum_topic_count', BP_Groups_Group::get_global_topic_count($status, $search_terms));
}
/**
 * Add the meta box to the edit page.
 *
 * @since 1.9
 */
function bp_docs_folders_meta_box()
{
    $doc_id = get_the_ID();
    $associated_group_id = bp_is_active('groups') ? bp_docs_get_associated_group_id($doc_id) : 0;
    if (!$associated_group_id && isset($_GET['group'])) {
        $group_id = BP_Groups_Group::get_id_from_slug(urldecode($_GET['group']));
        if (current_user_can('bp_docs_associate_with_group', $group_id)) {
            $associated_group_id = $group_id;
        }
    }
    // On the Create screen, respect the 'folder' $_GET param
    if (bp_docs_is_doc_create()) {
        $folder_id = bp_docs_get_current_folder_id();
    } else {
        $folder_id = bp_docs_get_doc_folder($doc_id);
    }
    ?>

	<div id="doc-folders" class="doc-meta-box">
		<div class="toggleable <?php 
    bp_docs_toggleable_open_or_closed_class();
    ?>
">
			<p id="folders-toggle-edit" class="toggle-switch">
				<span class="hide-if-js toggle-link-no-js"><?php 
    _e('Folders', 'bp-docs');
    ?>
</span>
				<a class="hide-if-no-js toggle-link" id="folders-toggle-link" href="#"><span class="show-pane plus-or-minus"></span><span class="toggle-title"><?php 
    _e('Folders', 'bp-docs');
    ?>
</span></a>
			</p>

			<div class="toggle-content">
				<table class="toggle-table" id="toggle-table-tags">
					<tr>
						<td class="desc-column">
							<label for="bp_docs_tag"><?php 
    _e('Select a folder for this Doc.', 'bp-docs');
    ?>
</label>
						</td>

						<td>
							<div class="existing-or-new-selector">
								<input type="radio" name="existing-or-new-folder" id="use-existing-folder" value="existing" checked="checked" />
								<label for="use-existing-folder" class="radio-label"><?php 
    _e('Use an existing folder', 'bp-docs');
    ?>
</label><br />
								<div class="selector-content">
									<?php 
    bp_docs_folder_selector(array('name' => 'bp-docs-folder', 'id' => 'bp-docs-folder', 'group_id' => $associated_group_id, 'selected' => $folder_id));
    ?>
								</div>
							</div>

							<div class="existing-or-new-selector" id="new-folder-block">
								<input type="radio" name="existing-or-new-folder" id="create-new-folder" value="new" />
								<label for="create-new-folder" class="radio-label"><?php 
    _e('Create a new folder', 'bp-docs');
    ?>
</label>
								<div class="selector-content">

									<?php 
    bp_docs_create_new_folder_markup(array('group_id' => $associated_group_id, 'selected' => $associated_group_id));
    ?>
								</div><!-- .selector-content -->
							</div>
						</td>
					</tr>
				</table>
			</div>
		</div>
	</div>

	<?php 
}
예제 #22
0
 function __construct($group_id, $per_page, $max)
 {
     global $bp;
     $this->pag_page = isset($_REQUEST['mrpage']) ? intval($_REQUEST['mrpage']) : 1;
     $this->pag_num = isset($_REQUEST['num']) ? intval($_REQUEST['num']) : $per_page;
     $this->requests = BP_Groups_Group::get_membership_requests($group_id, $this->pag_num, $this->pag_page);
     if (!$max || $max >= (int) $this->requests['total']) {
         $this->total_request_count = (int) $this->requests['total'];
     } else {
         $this->total_request_count = (int) $max;
     }
     $this->requests = $this->requests['requests'];
     if ($max) {
         if ($max >= count($this->requests)) {
             $this->request_count = count($this->requests);
         } else {
             $this->request_count = (int) $max;
         }
     } else {
         $this->request_count = count($this->requests);
     }
     $this->pag_links = paginate_links(array('base' => add_query_arg('mrpage', '%#%'), 'format' => '', 'total' => ceil($this->total_request_count / $this->pag_num), 'current' => $this->pag_page, 'prev_text' => '&larr;', 'next_text' => '&rarr;', 'mid_size' => 1));
 }
예제 #23
0
 function get_id_from_slug($slug)
 {
     return BP_Groups_Group::group_exists($slug);
 }
예제 #24
0
/**
 * Get a total count of all topics of a given status, across groups/forums.
 *
 * @since BuddyPress (1.5.0)
 *
 * @param string      $status       Which groups to count. 'public', 'private', 'hidden',
 *                                  'all'. Default: 'public'.
 * @param string|bool $search_terms Optional. Limit by a search term.
 *
 * @return int The topic count.
 */
function groups_total_forum_topic_count($status = 'public', $search_terms = false)
{
    /**
     * Filters the total count of all topics of a given status, across groups/forums.
     *
     * @since BuddyPress (1.5.0)
     *
     * @param int $value Total count of all topics.
     */
    return apply_filters('groups_total_forum_topic_count', BP_Groups_Group::get_global_topic_count($status, $search_terms));
}
 /**
  * @group get_group_extras
  */
 public function test_get_group_extras_banned()
 {
     $u = $this->factory->user->create();
     $g = $this->factory->group->create();
     $member = new BP_Groups_Member();
     $member->group_id = $g;
     $member->user_id = $u;
     $member->date_modified = bp_core_current_time();
     $member->is_banned = true;
     $member->save();
     $paged_groups = array();
     $paged_groups[] = new stdClass();
     $paged_groups[0]->id = $g;
     $group_ids = array($g);
     $expected = array();
     foreach ($paged_groups as $key => $value) {
         $expected[$key] = new stdClass();
         $expected[$key]->id = $value->id;
         $expected[$key]->is_member = '0';
         $expected[$key]->is_invited = '0';
         $expected[$key]->is_pending = '0';
         $expected[$key]->is_banned = true;
     }
     $old_user = get_current_user_id();
     $this->set_current_user($u);
     $this->assertEquals($expected, BP_Groups_Group::get_group_extras($paged_groups, $group_ids));
     $this->set_current_user($old_user);
 }
예제 #26
0
    function form($instance)
    {
        do_action('bp_group_documents_newest_widget_form');
        $instance = wp_parse_args((array) $instance, array('num_items' => 5));
        $title = esc_attr($instance['title']);
        $group_filter = esc_attr($instance['group_filter']);
        $featured = (bool) $instance['featured'];
        $num_items = absint($instance['num_items']);
        $download_count = esc_attr($instance['download_count']);
        ?>

                <p><label><?php 
        _e('Title:', 'bp-group-documents');
        ?>
</label><input class="widefat" id="<?php 
        echo $this->get_field_id('title');
        ?>
" name="<?php 
        echo $this->get_field_name('title');
        ?>
" type="text" value="<?php 
        echo $title;
        ?>
" /></p>
                        <?php 
        if (BP_GROUP_DOCUMENTS_WIDGET_GROUP_FILTER) {
            ?>
                            <p><label><?php 
            _e('Filter by Group:', 'bp-group-documents');
            ?>
</label>
                                <select id="<?php 
            echo $this->get_field_id('group_filter');
            ?>
" name="<?php 
            echo $this->get_field_name('group_filter');
            ?>
" >
                                    <option value="0"><?php 
            _e('Select Group...', 'bp-group-documents');
            ?>
</option>
                                    <?php 
            $groups_list = BP_Groups_Group::get('alphabetical');
            //                                get_alphabetically();
            foreach ($groups_list['groups'] as $group) {
                echo '<option value="' . $group->id . '" ';
                if ($group->id == $group_filter) {
                    echo 'selected="selected"';
                }
                echo '>' . stripslashes($group->name) . '</option>';
            }
            ?>
                            </select></p>
                            <?php 
        }
        if (BP_GROUP_DOCUMENTS_FEATURED) {
            ?>
                        <p><label><?php 
            printf(__('Show featured %s only', 'bp-group-documents'), $this->bp_group_documents_name);
            ?>
</label>
                            <input type="checkbox" id="<?php 
            echo $this->get_field_id('featured');
            ?>
" name="<?php 
            echo $this->get_field_name('featured');
            ?>
" value="1" <?php 
            checked($featured);
            ?>
>
                            </p>
                        <?php 
        }
        ?>

                <p><label><?php 
        _e('Number of items to show:', 'bp-group-documents');
        ?>
</label> <input class="widefat" id="<?php 
        echo $this->get_field_id('num_items');
        ?>
" name="<?php 
        echo $this->get_field_name('num_items');
        ?>
" type="text" value="<?php 
        echo absint($num_items);
        ?>
" style="width: 30%" /></p>
                        <p><input type="checkbox" id="<?php 
        echo $this->get_field_id('download_count');
        ?>
" name="<?php 
        echo $this->get_field_name('download_count');
        ?>
" value="1" <?php 
        if ($download_count) {
            echo 'checked="checked"';
        }
        ?>
>
                            <label><?php 
        printf(__('Show downloads', 'bp-group-documents'), $this->bp_group_documents_name);
        ?>
</label></p>
                        <?php 
    }
/**
 * Delete all invitations to a given group.
 *
 * @param int $group_id ID of the group whose invitations are being deleted.
 *
 * @return int|null Number of rows records deleted on success, null on failure.
 */
function groups_delete_all_group_invites($group_id)
{
    return BP_Groups_Group::delete_all_invites($group_id);
}
 public static function get_access_options($options, $settings_field, $doc_id = 0, $group_id = 0)
 {
     if (!$group_id) {
         $group_id = bp_docs_get_associated_group_id($doc_id);
     }
     // If this is the Doc creation page, check to see whether a
     // group id has been passed somewhere
     if (empty($group_id)) {
         if (isset($_POST['associated_group_id'])) {
             $group_id = intval($_POST['associated_group_id']);
         } else {
             if (isset($_GET['associated_group_id'])) {
                 $group_id = intval($_GET['associated_group_id']);
             } else {
                 if (isset($_GET['group'])) {
                     $maybe_group = BP_Groups_Group::get_id_from_slug($_GET['group']);
                     if ($maybe_group) {
                         $group_id = $maybe_group;
                     }
                 }
             }
         }
     }
     if ($group_id && current_user_can('bp_docs_associate_with_group', $group_id)) {
         $group = groups_get_group(array('group_id' => intval($group_id)));
         $options[40] = array('name' => 'group-members', 'label' => sprintf(__('Members of %s', 'bp-docs'), $group->name));
         // "Admins and mods" setting only available to admins and mods
         // Otherwise users end up locking themselves out
         $group_settings = bp_docs_get_group_settings($group_id);
         $is_admin = groups_is_user_admin(bp_loggedin_user_id(), $group_id);
         $is_mod = groups_is_user_mod(bp_loggedin_user_id(), $group_id);
         if ($is_admin || $is_mod) {
             $options[50] = array('name' => 'admins-mods', 'label' => sprintf(__('Admins and mods of %s', 'bp-docs'), $group->name));
         }
         // Group-associated docs should have the edit/post
         // permissions limited to group-members by default. If
         // the group is non-public, set the other permissions
         // to group-members as well
         if ('public' != $group->status || in_array($settings_field, array('edit', 'post_comments'))) {
             // First, unset existing defaults
             foreach ($options as &$option) {
                 $option['default'] = 0;
             }
             $options[40]['default'] = 1;
         }
     }
     return $options;
 }
예제 #29
0
 /**
  * Set up items for display in the list table.
  *
  * Handles filtering of data, sorting, pagination, and any other data
  * manipulation required prior to rendering.
  *
  * @since 1.7.0
  */
 public function prepare_items()
 {
     global $groups_template;
     $screen = get_current_screen();
     // Option defaults
     $include_id = false;
     $search_terms = false;
     // Set current page
     $page = $this->get_pagenum();
     // Set per page from the screen options
     $per_page = $this->get_items_per_page(str_replace('-', '_', "{$screen->id}_per_page"));
     // Sort order.
     $order = 'DESC';
     if (!empty($_REQUEST['order'])) {
         $order = 'desc' == strtolower($_REQUEST['order']) ? 'DESC' : 'ASC';
     }
     // Order by - default to newest
     $orderby = 'last_activity';
     if (!empty($_REQUEST['orderby'])) {
         switch ($_REQUEST['orderby']) {
             case 'name':
                 $orderby = 'name';
                 break;
             case 'id':
                 $orderby = 'date_created';
                 break;
             case 'members':
                 $orderby = 'total_member_count';
                 break;
             case 'last_active':
                 $orderby = 'last_activity';
                 break;
         }
     }
     // Are we doing a search?
     if (!empty($_REQUEST['s'])) {
         $search_terms = $_REQUEST['s'];
     }
     // Check if user has clicked on a specific group (if so, fetch only that group).
     if (!empty($_REQUEST['gid'])) {
         $include_id = (int) $_REQUEST['gid'];
     }
     // Set the current view
     if (isset($_GET['group_status']) && in_array($_GET['group_status'], array('public', 'private', 'hidden'))) {
         $this->view = $_GET['group_status'];
     }
     // We'll use the ids of group types for the 'include' param
     $this->group_type_ids = BP_Groups_Group::get_group_type_ids();
     // Pass a dummy array if there are no groups of this type
     $include = false;
     if ('all' != $this->view && isset($this->group_type_ids[$this->view])) {
         $include = !empty($this->group_type_ids[$this->view]) ? $this->group_type_ids[$this->view] : array(0);
     }
     // Get group type counts for display in the filter tabs
     $this->group_counts = array();
     foreach ($this->group_type_ids as $group_type => $group_ids) {
         $this->group_counts[$group_type] = count($group_ids);
     }
     // If we're viewing a specific group, flatten all activities into a single array.
     if ($include_id) {
         $groups = array((array) groups_get_group('group_id=' . $include_id));
     } else {
         $groups_args = array('include' => $include, 'per_page' => $per_page, 'page' => $page, 'orderby' => $orderby, 'order' => $order);
         $groups = array();
         if (bp_has_groups($groups_args)) {
             while (bp_groups()) {
                 bp_the_group();
                 $groups[] = (array) $groups_template->group;
             }
         }
     }
     // Set raw data to display
     $this->items = $groups;
     // Store information needed for handling table pagination
     $this->set_pagination_args(array('per_page' => $per_page, 'total_items' => $groups_template->total_group_count, 'total_pages' => ceil($groups_template->total_group_count / $per_page)));
 }
예제 #30
0
 /**
  * Setup globals
  *
  * The BP_GROUPS_SLUG constant is deprecated, and only used here for
  * backwards compatibility.
  *
  * @since BuddyPress (1.5)
  * @global BuddyPress $bp The one true BuddyPress instance
  */
 function setup_globals()
 {
     global $bp;
     // Define a slug, if necessary
     if (!defined('BP_GROUPS_SLUG')) {
         define('BP_GROUPS_SLUG', $this->id);
     }
     // Global tables for messaging component
     $global_tables = array('table_name' => $bp->table_prefix . 'bp_groups', 'table_name_members' => $bp->table_prefix . 'bp_groups_members', 'table_name_groupmeta' => $bp->table_prefix . 'bp_groups_groupmeta');
     // All globals for messaging component.
     // Note that global_tables is included in this array.
     $globals = array('slug' => BP_GROUPS_SLUG, 'root_slug' => isset($bp->pages->groups->slug) ? $bp->pages->groups->slug : BP_GROUPS_SLUG, 'has_directory' => true, 'notification_callback' => 'groups_format_notifications', 'search_string' => __('Search Groups...', 'buddypress'), 'global_tables' => $global_tables);
     parent::setup_globals($globals);
     /** Single Group Globals **********************************************/
     // Are we viewing a single group?
     if (bp_is_groups_component() && ($group_id = BP_Groups_Group::group_exists(bp_current_action()))) {
         $bp->is_single_item = true;
         $current_group_class = apply_filters('bp_groups_current_group_class', 'BP_Groups_Group');
         $this->current_group = apply_filters('bp_groups_current_group_object', new $current_group_class($group_id));
         // When in a single group, the first action is bumped down one because of the
         // group name, so we need to adjust this and set the group name to current_item.
         $bp->current_item = bp_current_action();
         $bp->current_action = bp_action_variable(0);
         array_shift($bp->action_variables);
         // Using "item" not "group" for generic support in other components.
         if (bp_current_user_can('bp_moderate')) {
             bp_update_is_item_admin(true, 'groups');
         } else {
             bp_update_is_item_admin(groups_is_user_admin(bp_loggedin_user_id(), $this->current_group->id), 'groups');
         }
         // If the user is not an admin, check if they are a moderator
         if (!bp_is_item_admin()) {
             bp_update_is_item_mod(groups_is_user_mod(bp_loggedin_user_id(), $this->current_group->id), 'groups');
         }
         // Is the logged in user a member of the group?
         if (is_user_logged_in() && groups_is_user_member(bp_loggedin_user_id(), $this->current_group->id)) {
             $this->current_group->is_user_member = true;
         } else {
             $this->current_group->is_user_member = false;
         }
         // Should this group be visible to the logged in user?
         if ('public' == $this->current_group->status || $this->current_group->is_user_member) {
             $this->current_group->is_visible = true;
         } else {
             $this->current_group->is_visible = false;
         }
         // If this is a private or hidden group, does the user have access?
         if ('private' == $this->current_group->status || 'hidden' == $this->current_group->status) {
             if ($this->current_group->is_user_member && is_user_logged_in() || bp_current_user_can('bp_moderate')) {
                 $this->current_group->user_has_access = true;
             } else {
                 $this->current_group->user_has_access = false;
             }
         } else {
             $this->current_group->user_has_access = true;
         }
         // Set current_group to 0 to prevent debug errors
     } else {
         $this->current_group = 0;
     }
     // Illegal group names/slugs
     $this->forbidden_names = apply_filters('groups_forbidden_names', array('my-groups', 'create', 'invites', 'send-invites', 'forum', 'delete', 'add', 'admin', 'request-membership', 'members', 'settings', 'avatar', $this->slug, $this->root_slug));
     // If the user was attempting to access a group, but no group by that name was found, 404
     if (bp_is_groups_component() && empty($this->current_group) && bp_current_action() && !in_array(bp_current_action(), $this->forbidden_names)) {
         bp_do_404();
         return;
     }
     if (bp_is_groups_component() && !empty($this->current_group)) {
         $this->default_extension = apply_filters('bp_groups_default_extension', defined('BP_GROUPS_DEFAULT_EXTENSION') ? BP_GROUPS_DEFAULT_EXTENSION : 'home');
         if (!bp_current_action()) {
             $bp->current_action = $this->default_extension;
         }
         // Prepare for a redirect to the canonical URL
         $bp->canonical_stack['base_url'] = bp_get_group_permalink($this->current_group);
         if (bp_current_action()) {
             $bp->canonical_stack['action'] = bp_current_action();
         }
         if (!empty($bp->action_variables)) {
             $bp->canonical_stack['action_variables'] = bp_action_variables();
         }
         // When viewing the default extension, the canonical URL should not have
         // that extension's slug, unless more has been tacked onto the URL via
         // action variables
         if (bp_is_current_action($this->default_extension) && empty($bp->action_variables)) {
             unset($bp->canonical_stack['action']);
         }
     }
     // Group access control
     if (bp_is_groups_component() && !empty($this->current_group)) {
         if (!$this->current_group->user_has_access) {
             // Hidden groups should return a 404 for non-members.
             // Unset the current group so that you're not redirected
             // to the default group tab
             if ('hidden' == $this->current_group->status) {
                 $this->current_group = 0;
                 $bp->is_single_item = false;
                 bp_do_404();
                 return;
                 // Skip the no_access check on home and membership request pages
             } elseif (!bp_is_current_action('home') && !bp_is_current_action('request-membership')) {
                 // Off-limits to this user. Throw an error and redirect to the group's home page
                 if (is_user_logged_in()) {
                     bp_core_no_access(array('message' => __('You do not have access to this group.', 'buddypress'), 'root' => bp_get_group_permalink($bp->groups->current_group), 'redirect' => false));
                     // User does not have access, and does not get a message
                 } else {
                     bp_core_no_access();
                 }
             }
         }
         // Protect the admin tab from non-admins
         if (bp_is_current_action('admin') && !bp_is_item_admin()) {
             bp_core_no_access(array('message' => __('You are not an admin of this group.', 'buddypress'), 'root' => bp_get_group_permalink($bp->groups->current_group), 'redirect' => false));
         }
     }
     // Preconfigured group creation steps
     $this->group_creation_steps = apply_filters('groups_create_group_steps', array('group-details' => array('name' => __('Details', 'buddypress'), 'position' => 0), 'group-settings' => array('name' => __('Settings', 'buddypress'), 'position' => 10)));
     // If avatar uploads are not disabled, add avatar option
     if (!(int) bp_get_option('bp-disable-avatar-uploads')) {
         $this->group_creation_steps['group-avatar'] = array('name' => __('Avatar', 'buddypress'), 'position' => 20);
     }
     // If friends component is active, add invitations
     if (bp_is_active('friends')) {
         $this->group_creation_steps['group-invites'] = array('name' => __('Invites', 'buddypress'), 'position' => 30);
     }
     // Groups statuses
     $this->valid_status = apply_filters('groups_valid_status', array('public', 'private', 'hidden'));
     // Auto join group when non group member performs group activity
     $this->auto_join = defined('BP_DISABLE_AUTO_GROUP_JOIN') && BP_DISABLE_AUTO_GROUP_JOIN ? false : true;
 }