static function init() { $atts = array('name' => __('Map', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 10, 'options' => array(array('name' => __('Width', 'tfuse'), 'desc' => __('Specifies the width of the map', 'tfuse'), 'id' => 'tf_shc_map_width', 'value' => '590', 'type' => 'text'), array('name' => __('Height', 'tfuse'), 'desc' => __('Specifies the height of the map', 'tfuse'), 'id' => 'tf_shc_map_height', 'value' => '365', 'type' => 'text'), array('name' => __('Latitude', 'tfuse'), 'desc' => __('Specifies the latitude of the map', 'tfuse'), 'id' => 'tf_shc_map_lat', 'value' => '', 'type' => 'text'), array('name' => __('Longitude', 'tfuse'), 'desc' => __('Specifies the longitude of the map', 'tfuse'), 'id' => 'tf_shc_map_long', 'value' => '', 'type' => 'text'), array('name' => __('Zoom', 'tfuse'), 'desc' => __('Specifies the zooming of the map', 'tfuse'), 'id' => 'tf_shc_map_zoom', 'value' => '3', 'type' => 'text'), array('name' => __('Type', 'tfuse'), 'desc' => __('Specifies the type of the map', 'tfuse'), 'id' => 'tf_shc_map_type', 'value' => '', 'options' => array('map1' => '1', 'map2' => '2', 'map3' => '3'), 'type' => 'select'), array('name' => __('Address', 'tfuse'), 'desc' => __('Specifies the address of the map', 'tfuse'), 'id' => 'tf_shc_map_address', 'value' => '', 'type' => 'text'), array('name' => __('Title', 'tfuse'), 'desc' => __('Specifies the title of the map', 'tfuse'), 'id' => 'tf_shc_map_title', 'value' => '', 'type' => 'text'))); tf_add_shortcode('map', array(__CLASS__, 'handle_shortcode'), $atts); add_action('init', array(__CLASS__, 'register_script')); add_action('wp_footer', array(__CLASS__, 'print_script')); }
static function init() { $atts = array('name' => __('Code', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 8, 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('Enter shortcode content', 'tfuse'), 'id' => 'tf_shc_code_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('code', array(__CLASS__, 'tfuse_code'), $atts); add_action('init', array(__CLASS__, 'register_script')); add_action('wp_footer', array(__CLASS__, 'print_script')); add_action('wp_print_styles', array(__CLASS__, 'print_styles')); }
foreach ($posts as $post) { if ($count == $item) { break; } $count++; $img = tfuse_page_options('member_photo', '', $post->ID); $id = tfuse_page_options('member_id', '', $post->ID); $url = tfuse_page_options('member_link', '', $post->ID); $image_src = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails')); if (!empty($url)) { $link = $url; } else { $link = ''; } $output .= '<div class="member"> <div class="member-image"><img src="' . $image_src . '" width="193" height="217" alt=""/></div> <div class="member-descr"> <h4 class="member-name">' . get_the_title($post->ID) . '</h4> <p><a href="' . $link . '">' . $id . '</a></p> </div> </div>'; } $output .= '</ul> </div>'; $output .= '</section>'; } return $output; } $atts = array('name' => __('Members', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 20, 'options' => array(array('name' => __('Items', 'tfuse'), 'desc' => '', 'id' => 'tf_shc_members_item', 'value' => '', 'type' => 'text'), array('name' => __('Title', 'tfuse'), 'desc' => '', 'id' => 'tf_shc_members_title', 'value' => '', 'type' => 'text'))); tf_add_shortcode('members', 'tfuse_members', $atts);
case 'italic': $before = '<em>'; $after = '</em>'; break; case 'strike': $before = '<s>'; $after = '</s>'; break; case 'mark': $before = '<mark>'; $after = '</mark>'; break; case 'insert': $before = '<ins>'; $after = '</ins>'; break; case 'subscript': $before = '<sub>'; $after = '</sub>'; break; case 'superscript': $before = '<sup>'; $after = '</sup>'; break; } $return_html = $before . do_shortcode($content) . $after; return $return_html; } $atts = array('name' => __('Text Styles', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Type', 'tfuse'), 'desc' => __('Specify the type', 'tfuse'), 'id' => 'tf_shc_text_styles_type', 'value' => 'link', 'options' => array('link' => 'link', 'strong' => 'strong', 'italic' => 'italic', 'strike' => 'strike', 'mark' => 'mark', 'insert' => 'insert', 'subscript' => 'subscript', 'superscript' => 'superscript'), 'type' => 'select'), array('name' => __('Link', 'tfuse'), 'desc' => __('Specifies the URL of the page the link goes to', 'tfuse'), 'id' => 'tf_shc_text_styles_link', 'value' => '//themefuse.com/', 'type' => 'text'), array('name' => __('Target', 'tfuse'), 'desc' => __('Specifies the the of the site the link goes to,ex:_blank,_self,_parent,_top', 'tfuse'), 'id' => 'tf_shc_text_styles_target', 'value' => '_blank', 'type' => 'text'), array('name' => __('Content', 'tfuse'), 'desc' => __('Enter Quotes Content', 'tfuse'), 'id' => 'tf_shc_text_styles_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('text_styles', 'tfuse_text_styles', $atts);
<?php /** * Rows * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. */ function tfuse_row_box($atts, $content = null) { extract(shortcode_atts(array('class' => ''), $atts)); return '<div class="' . $class . '">' . do_shortcode($content) . '<div class="clear"></div></div>'; } $atts = array('name' => __('Row Box', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 7, 'options' => array(array('name' => __('Class', 'tfuse'), 'desc' => __('Specifies one or more class names for an shortcode. To specify multiple classes,<br /> separate the class names with a space, e.g. <b>"left important"</b>', 'tfuse'), 'id' => 'tf_shc_row_box_class', 'value' => '', 'type' => 'text'), array('name' => __('Content', 'tfuse'), 'desc' => __('The page templates need to be constructed on rows. <br /> You need to use the [row] shortcode when you want your content to go on another row.', 'tfuse'), 'id' => 'tf_shc_row_box_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('row_box', 'tfuse_row_box', $atts); function tfuse_row($atts, $content = null) { return '<div class="row">' . do_shortcode($content) . '</div>'; } $atts = array('name' => __('Row', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 7, 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('The page templates need to be constructed on rows. <br /> You need to use the [row] shortcode when you want your content to go on another row.', 'tfuse'), 'id' => 'tf_shc_row_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('row', 'tfuse_row', $atts);
$output .= "google.maps.event.addListener(centralOfficeMarker,'click',function() {\r\n map.setZoom(" . $zoom . ");\r\n map.setCenter(centralOfficeMarker.getPosition());\r\n if (infowindow) {\r\n infowindow.close();\r\n }\r\n infowindow = new google.maps.InfoWindow();\r\n infowindow.setContent(\"<span class='title-map-marker'>" . $header_map['title'][0] . "</span><p class='map-text-marker'>" . $header_map['adress'][0] . "</p>\");\r\n infowindow.open(map,centralOfficeMarker);\r\n });\r\n\r\n\r\n centralOfficeMarker.setMap(map);"; $output .= " } "; $output .= "\r\n function showMarker(marker){\r\n var gMarker = null;\r\n var center = null; "; while (isset($header_map['lat'][$k]) && isset($header_map['long'][$k])) { $output .= "\r\n if(marker === 'officemarker" . $k . "') {\r\n gMarker = officemarker" . $k . ";\r\n center = officecenter" . $k . ";\r\n }\r\n else if(marker === 'centralOfficeMarker') {\r\n gMarker = centralOfficeMarker;\r\n center = centralOfficeMarker;\r\n }\r\n\r\n \r\n "; $k++; } $output .= " \r\n google.maps.event.trigger(gMarker, 'click', {\r\n latLng: center\r\n });\r\n\r\n }\r\n google.maps.event.addDomListener(window, 'load', initialize);"; while (isset($header_map['lat'][$y]) && isset($header_map['long'][$y])) { $output .= "jQuery('#officemarker" . $y . "').on('click',function(){\r\n showMarker('officemarker" . $y . "');\r\n });"; $y++; } $output .= "});\r\n\t </script>"; } return $output; } $atts = array('name' => 'Header Map', 'desc' => 'Here comes some lorem ipsum description for the shortcode.', 'category' => 4, 'options' => array(array('name' => __('Zoom', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_header_map_zoom', 'value' => '', 'type' => 'text', 'divider' => true), array('name' => __('Map Icon', 'tfuse'), 'desc' => __('Map icon URL', 'tfuse'), 'id' => 'tf_shc_header_map_icon', 'value' => '', 'type' => 'text', 'divider' => true), array('name' => 'Title', 'desc' => '', 'id' => 'tf_shc_header_map_title', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_0 tf_shc_addable'), 'type' => 'text'), array('name' => __('Latitude', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_header_map_lat', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_1 tf_shc_addable'), 'type' => 'text'), array('name' => __('Longitude', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_header_map_long', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_2 tf_shc_addable'), 'type' => 'text'), array('name' => __('Email', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_header_map_email', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_3 tf_shc_addable'), 'type' => 'text'), array('name' => __('Phone', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_header_map_phone', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_4 tf_shc_addable'), 'type' => 'text'), array('name' => 'Address', 'desc' => '', 'id' => 'tf_shc_header_map_adress', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_5 tf_shc_addable tf_shc_addable_last'), 'type' => 'textarea'))); tf_add_shortcode('header_map', 'tfuse_header_map', $atts); function tfuse_head_map($atts, $content = null) { global $header_map; extract(shortcode_atts(array('title' => '', 'adress' => '', 'lat' => '', 'long' => '', 'email' => '', 'phone' => ''), $atts)); $header_map['title'][] = $title; $header_map['adress'][] = $adress; $header_map['lat'][] = $lat; $header_map['long'][] = $long; $header_map['email'][] = $email; $header_map['phone'][] = $phone; } $atts = array('name' => 'Header Map', 'desc' => 'Here comes some lorem ipsum description for the box shortcode.', 'category' => 3, 'options' => array(array('name' => 'Title', 'desc' => '', 'id' => 'tf_shc_head_map_title', 'value' => 'image', 'type' => 'text'), array('name' => 'Address', 'desc' => '', 'id' => 'tf_shc_head_map_adress', 'value' => '', 'type' => 'textarea'), array('name' => __('Latitude', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_head_map_lat', 'value' => '', 'type' => 'text'), array('name' => __('Longitude', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_head_map_long', 'value' => '', 'type' => 'text'), array('name' => __('Email', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_head_map_email', 'value' => '', 'type' => 'text'), array('name' => __('Phone', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_head_map_phone', 'value' => '', 'type' => 'text'))); add_shortcode('head_map', 'tfuse_head_map', $atts);
} return $out; } $forms_name = array(-1 => 'Choose Form'); $forms_term = get_terms('reservations', array('hide_empty' => 0)); $forms = array(); foreach ($forms_term as $key => $form) { $forms[$form->term_id] = unserialize($form->description); } if (!empty($forms)) { foreach ($forms as $key => $value) { $forms_name[$key] = urldecode($value['form_name']); } } $atts = array('name' => __('Reservation Form', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Type', 'tfuse'), 'desc' => __('Select the form', 'tfuse'), 'id' => 'tf_rf_formid', 'value' => '', 'options' => $forms_name, 'type' => 'select'))); tf_add_shortcode('tfuse_reservationform', 'tf_reservationform_shortcode', $atts); function res_text($input, $form_input) { return "<div class='row field_text alignleft " . $form_input['classes'] . "' style='" . $form_input['floating'] . "'>\r\r\n <label for='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "'>" . __($form_input['label_text'], 'tfuse') . "</label><br>\r\r\n <input type='text' style='width:" . $form_input['ewidthpx'] . "px;' class='" . $input['properties']['class'] . "' name='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "'/>\r\r\n </div>"; } function res_textarea($input, $form_input) { return "<div class='row field_textarea alignleft " . $form_input['classes'] . "' style='" . $form_input['floating'] . "'>\r\r\n <label for='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "'>" . __($form_input['label_text'], 'tfuse') . "</label><br>\r\r\n <textarea style='width:" . $form_input['ewidthpx'] . "px;' class='" . $input['properties']['class'] . "' name='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "' rows='10' ></textarea>\r\r\n </div>"; } function res_radio($input, $form_input) { $checked = 'checked="checked"'; $output = "<div class='row field_text alignleft' style='width:" . $form_input['width'] . "%;" . $form_input['floating'] . "'>\r\r\n <label for='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "'>" . __($form_input['label_text'], 'tfuse') . "</label>"; if (is_array($form_input['options'])) { foreach ($form_input['options'] as $key => $option) { $output .= '<div class="multicheckbox"><input ' . $checked . ' id="' . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . '_' . $key . '" type="radio" name="' . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . '" value="' . $option . '" /><label class="radiolabel" for="' . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . '_' . $key . '">' . __(urldecode($option), 'tfuse') . '</label></div>';
<div class="tab-content clearfix"> <div id="tab_cont_1_1" class="tab-pane fade in active"> <ul class="post_list recent_posts">'; foreach ($popular_posts as $post_val) { $return_html .= '<li class="clearfix">'; $return_html .= '<a href="' . $post_val['post_link'] . '" >' . $post_val['post_img'] . '</a>' . ' <a href="' . $post_val['post_link'] . '" >' . $post_val['post_title'] . '</a>'; $return_html .= '<div class="date">' . $post_val['post_date_post'] . '</div>'; $return_html .= '</li>'; } $return_html .= '</ul> </div> <div id="tab_cont_1_2" class="tab-pane fade"> <ul class="post_list popular_posts">'; foreach ($latest_posts as $post_val) { $return_html .= '<li class="clearfix">'; $return_html .= '<a href="' . $post_val['post_link'] . '" >' . $post_val['post_img'] . '</a>'; $return_html .= '<a href="' . $post_val['post_link'] . '" > ' . $post_val['post_title'] . '</a>'; $return_html .= '<div class="date">' . $post_val['post_date_post'] . '</div>'; $return_html .= '</li>'; } $return_html .= '</ul> </div> </div> </div> </div>'; return $return_html; } $atts = array('name' => __('Tab Posts', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array(array('name' => __('Items', 'tfuse'), 'desc' => __('Specifies the number of the post to show', 'tfuse'), 'id' => 'tf_shc_tabs_posts_items', 'value' => '5', 'type' => 'text'))); tf_add_shortcode('tabs_posts', 'tfuse_tabs_posts', $atts);
<?php function tfuse_shortcode_donate($atts, $content = null) { extract(shortcode_atts(array('img' => '', 'title' => '', 'email' => '', 'label' => '', 'code' => '', 'amount' => ''), $atts)); return '<section class="make-donation" style="background: url(\'' . $img . '\')"> <div class="donation-form"> <h5 class="title">' . $title . ':</h5> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <label for="amount">' . $label . '</label> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="' . $email . '"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value=""> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="currency_code" value="' . $code . '"> <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest"> <input type="text" id="amount" name="amount" placeholder="' . $amount . '" value="' . $amount . '"> <button type="submit" class="btn btn-yellow btn-donate-form"><span>' . __('Donate Now', 'tfuse') . '</span></button> <span class="info-donate-form">' . __('Payments handled securely through', 'tfuse') . ' <a href="https://www.paypal.com/">PayPal</a></span> </form> </div> </section>'; } $atts = array('name' => __('Donate', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_donate_title', 'value' => '', 'type' => 'text'), array('name' => __('Bg', 'tfuse'), 'desc' => __('Background Image', 'tfuse'), 'id' => 'tf_shc_donate_img', 'value' => '', 'type' => 'text'), array('name' => __('Paypal Email', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_donate_email', 'value' => '', 'type' => 'text'), array('name' => __('Label', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_donate_label', 'value' => 'USD ($):', 'type' => 'text'), array('name' => __('Currency Code', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_donate_code', 'value' => 'USD', 'type' => 'text'), array('name' => __('Amount', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_donate_amount', 'value' => '245', 'type' => 'text'))); tf_add_shortcode('donate', 'tfuse_shortcode_donate', $atts);
} } $out .= '</ul> </div><a class="prev" id="minigallery' . $uniq . '_prev" href="#"><span class="tficon-shevron-left"></span></a><a class="next" id="minigallery' . $uniq . '_next" href="#"><span class="tficon-shevron-right"></span></a> </div>'; $out .= ' <script> jQuery(document).ready(function() { function mini_gallery_start(){ jQuery("#minigallery' . $uniq . '").carouFredSel({ next : "#minigallery' . $uniq . '_next", prev : "#minigallery' . $uniq . '_prev", auto: false, circular: false, infinite: true, width: "100%", scroll: { items : 1 } }); } mini_gallery_start(); jQuery("ul.tabs li").click(function(){ mini_gallery_start(); }); }); </script>'; return $out; } $atts = array('name' => __('Minigallery', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 6, 'options' => array(array('name' => __('ID', 'tfuse'), 'desc' => __('Specifies the post or page ID. For more detail about this shortcode follow the <a href="http://codex.wordpress.org/Template_Tags/get_posts" target="_blank">link</a>', 'tfuse'), 'id' => 'tf_shc_minigallery_id', 'value' => '', 'type' => 'text'), array('name' => __('Title', 'tfuse'), 'desc' => __('Specifies the title for minigallery.', 'tfuse'), 'id' => 'tf_shc_minigallery_title', 'value' => '', 'type' => 'text'), array('name' => __('prettyPhoto', 'tfuse'), 'desc' => __('Open images with prettyphoto', 'tfuse'), 'id' => 'tf_shc_minigallery_prettyphoto', 'value' => 'false', 'type' => 'checkbox'))); tf_add_shortcode('minigallery', 'tfuse_minigallery', $atts);
{ extract(shortcode_atts(array('items' => 5, 'title' => 'Popular Posts', 'image_width' => 75, 'image_height' => 75, 'image_class' => 'thumbnail'), $atts)); $return_html = !empty($title) ? '<h2>' . $title . '</h2>' : ''; $latest_posts = tfuse_shortcode_posts(array('sort' => 'popular', 'items' => $items, 'image_post' => true, 'image_width' => $image_width, 'image_height' => $image_height, 'image_class' => $image_class, 'date_post' => false)); $return_html .= ' <div class="widget_popular_posts"> <ul>'; foreach ($latest_posts as $post_val) { $return_html .= '<li>'; $return_html .= '<a href="' . $post_val['post_link'] . '" class="post-title">' . $post_val['post_title'] . '</a>'; $return_html .= ' <div class="post-meta"><em> ' . __('by ', 'tfuse') . '<a href="' . $post_val['post_author_link'] . '" class="author">' . $post_val['post_author_name'] . '</a> <span class="separator">|</span>' . $post_val['post_comnt_numb_link'] . '</em> </div>'; $return_html .= ' <div class="extras"> ' . $post_val['post_img'] . ' ' . $post_val['post_excerpt'] . ' </div> <a href="' . $post_val['post_link'] . '" class="link-more">' . __('Read more', 'tfuse') . '</a>'; $return_html .= '</li>'; } $return_html .= ' </ul> </div> '; return $return_html; } $atts = array('name' => __('Popular Posts', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array(array('name' => __('Items', 'tfuse'), 'desc' => __('Specifies the number of the post to show', 'tfuse'), 'id' => 'tf_shc_popular_posts_items', 'value' => '5', 'type' => 'text'), array('name' => __('Title', 'tfuse'), 'desc' => __('Specifies the title for an shortcode', 'tfuse'), 'id' => 'tf_shc_popular_posts_title', 'value' => 'Popular Posts', 'type' => 'text'), array('name' => __('Image Width', 'tfuse'), 'desc' => __('Specifies the width of an thumbnail', 'tfuse'), 'id' => 'tf_shc_popular_posts_image_width', 'value' => '75', 'type' => 'text'), array('name' => __('Image Height', 'tfuse'), 'desc' => __('Specifies the height of an thumbnail', 'tfuse'), 'id' => 'tf_shc_popular_posts_image_height', 'value' => '75', 'type' => 'text'), array('name' => __('Image Class', 'tfuse'), 'desc' => __('Specifies one or more class names for an shortcode. To specify multiple classes,<br /> separate the class names with a space, e.g. <b>"left important"</b>.', 'tfuse'), 'id' => 'tf_shc_popular_posts_image_class', 'value' => 'thumbnail', 'type' => 'text'))); tf_add_shortcode('popular_posts', 'tfuse_popular_posts', $atts);
} global $wp_query; if (!isset($wp_query->queried_object->ID)) { return $out; } return $out; } $forms_name = array(-1 => 'Choose Form'); $forms = get_option(TF_THEME_PREFIX . '_tfuse_contact_forms'); if (!empty($forms)) { foreach ($forms as $key => $value) { $forms_name[$key] = $value['form_name']; } } $atts = array('name' => __('Contact Form', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Type', 'tfuse'), 'desc' => __('Select the form', 'tfuse'), 'id' => 'tf_cf_formid', 'value' => '', 'options' => $forms_name, 'type' => 'select'))); tf_add_shortcode('tfuse_contactform', 'tf_contactform_shortcode', $atts); function text($input, $form_input) { return "<div class='field-text " . $form_input['classes'] . "' style='width:" . $form_input['ewidthpx'] . "px; " . $form_input['floating'] . "'>\n <label for='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "'>" . $form_input['label_text'] . "</label>\n <input type='text' style='width:" . $form_input['ewidthpx'] . "px;' class='" . $input['properties']['class'] . "' name='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "' value='' />\n </div>"; } function textarea($input, $form_input) { return "<div class='field-text field-text' style='" . $form_input['floating'] . "'>\n <textarea style='width:" . $form_input['ewidthpx'] . "px;' class='" . $input['properties']['class'] . "' name='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "' rows='10' value='' placeholder='" . $form_input['label_text'] . "' onblur=' if (this.placeholder == \"\") {this.placeholder = \"" . $form_input['label_text'] . "\";}' onfocus='if (this.placeholder == \"" . $form_input['label_text'] . "\") {this.placeholder = \"\";}'></textarea>\n </div>"; } function radio($input, $form_input) { $checked = 'checked="checked"'; $output = "<div class='field-text radio " . $form_input['classes'] . "' style='width:" . $form_input['ewidthpx'] . "px;" . $form_input['floating'] . "'>\n <label class='label_title' for='" . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . "'>" . $form_input['label_text'] . "</label>"; if (is_array($form_input['options'])) { foreach ($form_input['options'] as $key => $option) { $output .= '<div class=rowRadio"><input ' . $checked . ' id="' . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . '_' . $key . '" type="radio" name="' . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . '" value="' . $option . '" /><label class="radiolabel" for="' . TF_THEME_PREFIX . '_' . trim($form_input['shortcode']) . '_' . $key . '">' . urldecode($option) . '</label></div>';
recentsliderInit(); jQuery(window).resize(function() { recentsliderInit(); }); var tControlsHeight = jQuery(".recent-slider-controls").innerHeight(); jQuery(".recent-slider-controls").css("margin-top" , -tControlsHeight/2); //Script align center the text for two mini slider var caroufredsel_wrapper = jQuery(".caroufredsel_wrapper"); var recent_slider_text = jQuery(".recent-slider-text"); caroufredsel_wrapper.each(function(){ hei1 = jQuery(this).height(); recent_slider_text.each(function(){ hei2 = jQuery(this).height(); jQuery(this).css({ "padding-top" :hei1/2-hei2/2 }); }); }); }); </script> '; } return $output; } $atts = array('name' => __('Project', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array(array('name' => __('Select Project Post', 'tfuse'), 'desc' => __('Select Project Post', 'tfuse'), 'id' => 'tf_shc_projects_post', 'value' => '', 'type' => 'multi', 'subtype' => 'project'))); tf_add_shortcode('projects', 'tfuse_projects', $atts);
} switch ($type) { case '3dpie': $type = 'p3'; break; case 'pie': $type = 'p'; break; case 'line': $type = 'lc'; break; case 'bar': $type = 'bvg'; break; } $width = (int) $width; $height = (int) $height; $data = trim($data); if ($type == 'p3' || $type == 'p') { return '<p><img class="noborder" src="http://chart.apis.google.com/chart?chxs=0,555555,11.5&chxt=x&chs=' . $width . 'x' . $height . '&cht=' . $type . '&chtt=' . $title . '&chl=' . $label . '&chco=' . $colors . '&chs=' . $width . 'x' . $height . '&chd=t:' . $data . '&chdl=' . $legend . '&chf=bg,s,' . $background . '" alt="' . $title . '" /></p>'; } elseif ($type == 'lc') { return '<p><img class="noborder" src="http://chart.apis.google.com/chart?chs=' . $width . 'x' . $height . '&chf=bg,s,' . $background . '&chl=' . $label . '&cht=lc&chco=' . $colors . '&chd=t:' . $data . '&chdlp=b&chg=4,1,0,5&chls=1&chma=|0,10&chtt=' . $title . '&chts=676767,13.5" width="' . $width . '" height="' . $height . '" alt="' . $title . '" /></p>'; } elseif ($type == 'bvg') { return '<p><img class="noborder" src="http://chart.apis.google.com/chart?chbh=a&chs=' . $width . 'x' . $height . '&chf=bg,s,' . $background . '&cht=bvs&chco=' . $colors . '&chd=t:' . $data . '&chdl=' . $legend . '&chdlp=b&chg=4,1,0,5&chma=|0,10&chtt=' . $title . '&chts=676767,13.5" width="' . $width . '" height="' . $height . '" alt="' . $title . '" /></p>'; } else { return '<p><img class="noborder" src="http://chart.apis.google.com/chart?chxs=0,555555,11.5&chxt=x&chs=' . $width . 'x' . $height . '&cht=' . $type . '&chtt=' . $title . '&chl=' . $label . '&chco=' . $colors . '&chs=' . $width . 'x' . $height . '&chd=t:' . $data . '&chdl=' . $legend . '&chf=bg,s,' . $background . '" alt="' . $title . '" /></p>'; } } $atts = array('name' => __('Charts', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the chart shortcode.', 'tfuse'), 'category' => 3, 'options' => array(array('name' => __('Width', 'tfuse'), 'desc' => __('Specifies the width of an shortcode', 'tfuse'), 'id' => 'tf_shc_chart_width', 'value' => '540', 'type' => 'text'), array('name' => __('Height', 'tfuse'), 'desc' => __('Specifies the height of an shortcode', 'tfuse'), 'id' => 'tf_shc_chart_height', 'value' => '250', 'type' => 'text'), array('name' => __('Type', 'tfuse'), 'desc' => __('Select chart type', 'tfuse'), 'id' => 'tf_shc_chart_type', 'value' => '3dpie', 'options' => array('3dpie' => __('3D ROUND PIE', 'tfuse'), 'pie' => __('2D ROUND PIE', 'tfuse'), 'line' => __('LINE CHART', 'tfuse'), 'bar' => __('BAR CHART', 'tfuse')), 'type' => 'select'), array('name' => __('Title', 'tfuse'), 'desc' => __('Text to display above the chart', 'tfuse'), 'id' => 'tf_shc_chart_title', 'value' => 'The most popularity internet browser', 'type' => 'text'), array('name' => __('Data', 'tfuse'), 'desc' => __('The data to use to draw the chart, separated by comma', 'tfuse'), 'id' => 'tf_shc_chart_data', 'value' => '40,25,5,25,5', 'type' => 'text'), array('name' => __('Legend', 'tfuse'), 'desc' => __('Specifies the legend of an shortcode, separated by vertical bar <b>"|"</b>', 'tfuse'), 'id' => 'tf_shc_chart_legend', 'value' => '40|25|5|25|5', 'type' => 'text'), array('name' => __('Label', 'tfuse'), 'desc' => __('A label for the chart', 'tfuse'), 'id' => 'tf_shc_chart_label', 'value' => 'Internet Explorer|Firefox|Safari|Chrome|Others', 'type' => 'text'), array('name' => __('Colors', 'tfuse'), 'desc' => __('Colors a cell according to whether the values fall within a specified range', 'tfuse'), 'id' => 'tf_shc_chart_colors', 'value' => 'FF9900|E40B0B|1B9A1B|3399CC|BBCCED', 'type' => 'text'), array('name' => __('Background color', 'tfuse'), 'desc' => __('Specify button text color', 'tfuse'), 'id' => 'tf_shc_chart_background', 'value' => '#FFFFFF', 'type' => 'colorpicker'))); tf_add_shortcode('chart', 'tfuse_chart', $atts);
$i++; } $output .= '</div><div class="slider_pagination" id="slider' . $uniq . '_pag"></div></div> <script> jQuery(document).ready(function() { jQuery("#slider' . $uniq . '").carouFredSel({ pagination : "#slider' . $uniq . '_pag", infinite: false, auto: false, height: "auto", items: 1, scroll: { fx: "fade", duration: 200 } }); }); </script>'; return $output; } $atts = array('name' => __('Slideshow', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the shortcode.', 'tfuse'), 'category' => 4, 'options' => array(array('name' => __('Size Type', 'tfuse'), 'desc' => __('Select size of the slideshow', 'tfuse'), 'id' => 'tf_shc_slideshow_type_size', 'value' => 'medium', 'options' => array('medium' => __('Medium (600x291)', 'tfuse'), 'small' => __('Small (430x208)', 'tfuse'), 'mini' => __('Mini (220x107)', 'tfuse')), 'type' => 'select'), array('name' => __('Type', 'tfuse'), 'desc' => '', 'id' => 'tf_shc_slideshow_type', 'value' => 'image', 'options' => array('image' => __('Image', 'tfuse'), 'text' => __('Text', 'tfuse')), 'properties' => array('class' => 'tf_shc_addable_0 tf_shc_addable'), 'type' => 'select'), array('name' => __('Content', 'tfuse'), 'desc' => '', 'id' => 'tf_shc_slideshow_content', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_1 tf_shc_addable tf_shc_addable_last'), 'type' => 'text'))); tf_add_shortcode('slideshow', 'tfuse_slideshow', $atts); function tfuse_slide($atts, $content = null) { global $slide; extract(shortcode_atts(array('type' => '', 'content' => ''), $atts)); $slide['type'][] = $type; $slide['content'][] = $content; } $atts = array('name' => __('Slide', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 3, 'options' => array(array('name' => __('Type', 'tfuse'), 'desc' => '', 'id' => 'tf_shc_slide_type', 'value' => 'image', 'options' => array('image' => __('Image', 'tfuse'), 'text' => __('Text', 'tfuse')), 'type' => 'select'), array('name' => __('Content', 'tfuse'), 'desc' => '', 'id' => 'tf_shc_slide_content', 'value' => '', 'type' => 'text'))); add_shortcode('slide', 'tfuse_slide', $atts);
if (!empty($categories)) { $platforms_links = ''; foreach ($categories as $categ) { $term = get_term_by('id', $categ, 'platforms_game'); if ($term) { $platforms_links .= '&platforms_game' . $term->term_id . '=' . $term->term_id; } } $out .= ' <div class="col-sm-4"> <div class="textbox textbox-style2">'; if (!empty($img)) { $out .= '<div class="textbox-thumbnail"><img src="' . $img . '" width="100" height="100" alt=""/></div>'; } $out .= '<div class="textbox-aside"> <h3 class="textbox-title">' . $title . '</h3> <div class="textbox-text"> <p>' . $desc . '</p> </div> <div class="textbox-foot clearfix"> <a class="btn btn-default btn-xs" href="?s=~&tax_games=' . $id_term . $platforms_links . '">' . __('View Games', 'tfuse') . '</a> </div> </div> </div> </div>'; } return $out; } $atts = array('name' => __('Platforms', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('Platform Title', 'tfuse'), 'id' => 'tf_shc_game_platforms_title', 'value' => '', 'type' => 'text'), array('name' => __('Image', 'tfuse'), 'desc' => __('Image url', 'tfuse'), 'id' => 'tf_shc_game_platforms_img', 'value' => '', 'type' => 'text'), array('name' => __('Description', 'tfuse'), 'desc' => __('Short description', 'tfuse'), 'id' => 'tf_shc_game_platforms_desc', 'value' => '', 'type' => 'textarea'), array('name' => __('Platforms', 'tfuse'), 'desc' => __('Type platforms name', 'tfuse'), 'id' => 'tf_shc_game_platforms_cat', 'value' => '', 'type' => 'multi', 'subtype' => 'platforms_game'))); tf_add_shortcode('game_platforms', 'tfuse_shortcode_game_platforms', $atts);
* To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * title: * link: * type: link/button * gallery: * style: * class: * * http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/ */ function tfuse_prettyPhoto($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'link' => '', 'type' => 'link', 'gallery' => '', 'style' => '', 'class' => ''), $atts)); if (empty($gallery)) { $gallery = 'p_' . rand(1, 1000); } if (!empty($style)) { $style = 'style="' . $style . '"'; } if ($type == 'button') { return '<a href="' . $link . '" class="btn ' . $class . '" ' . $style . ' rel="prettyPhoto[' . $gallery . ']" title="' . $title . '">' . $content . '</a>'; } else { return '<a href="' . $link . '" class=" ' . $class . ' prettyPhoto" ' . $style . ' rel="prettyPhoto[' . $gallery . ']" title="' . $title . '" >' . $content . '</a>'; } } $atts = array('name' => __('PrettyPhoto', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 5, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('Specifies the title', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_title', 'value' => '', 'type' => 'text'), array('name' => __('Link', 'tfuse'), 'desc' => __('Specifies the URL of an image', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_link', 'value' => '', 'type' => 'text'), array('name' => __('Type', 'tfuse'), 'desc' => __('Specify the type for an shortcode', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_type', 'value' => 'link', 'options' => array('link' => __('Link', 'tfuse'), 'button' => __('Button', 'tfuse')), 'type' => 'select'), array('name' => __('Gallery', 'tfuse'), 'desc' => __('Specify the name, if you want display images in gallery prettyPhoto', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_gallery', 'value' => '', 'type' => 'text'), array('name' => __('Style', 'tfuse'), 'desc' => __('Specify an inline style for an shortcode', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_style', 'value' => '', 'type' => 'text'), array('name' => __('Class', 'tfuse'), 'desc' => __('Specifies one or more class names for an shortcode. To specify multiple classes,<br /> separate the class names with a space, e.g. <b>"left important"</b>.', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_class', 'value' => '', 'type' => 'text'), array('name' => __('Content', 'tfuse'), 'desc' => __('Enter prettyPhoto Content', 'tfuse'), 'id' => 'tf_shc_prettyPhoto_content', 'value' => __('Open image with prettyPhoto', 'tfuse'), 'type' => 'textarea'))); tf_add_shortcode('prettyPhoto', 'tfuse_prettyPhoto', $atts);
* Autentificate * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. */ function tfuse_login($atts, $content = null) { $return_html = ''; if (!is_user_logged_in()) { $return_html = '<div class="widget widget_login"> <h3 class="widget-title">' . __('Login Form', 'tfuse') . '</h3>'; $return_html .= '<form action="' . home_url() . '/wp-login.php" method="post" name="loginform" id="loginform" class="loginform"> <p><input name="log" id="user_login2" class="input" value="" size="20" tabindex="10" type="text" placeholder="' . __('Username', 'tfuse') . '"></p> <p><input name="pwd" id="user_pass2" class="input" value="" size="20" tabindex="20" type="password" placeholder="' . __('Password', 'tfuse') . '"></p> <div class="forgetmenot input_styled checklist"> <input name="rememberme" type="checkbox" id="rememberme2" value="forever" tabindex="90" checked><label for="rememberme2">' . __('Remember Me', 'tfuse') . '</label> </div> <p class="forget_password"><a href="' . home_url() . '/wp-login.php?action=lostpassword">' . __('Forgot Password?', 'tfuse') . '</a></p> <p class="submit"> <input type="submit" name="wp-submit" id="wp-submit" class="btn btn-primary" value="' . __('Login', 'tfuse') . '" tabindex="100" /> <input type="hidden" name="redirect_to" value="' . home_url() . '/wp-admin/" /> <input type="hidden" name="testcookie" value="1" /> </p> </form> </div>'; } return $return_html; } $atts = array('name' => __('Login', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array()); tf_add_shortcode('autentificate', 'tfuse_login', $atts);
<?php /** * Video player * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * link: * width: * height: * title: */ function tfuse_youtube($atts, $content = null) { extract(shortcode_atts(array('link' => '', 'width' => 660, 'height' => 400), $atts)); $tfuse_shortcode_arr = array(); preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\\/)[^&\n]+|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+#", $link, $video_id); return '<div clas="video"><iframe width="' . $width . '" height="' . $height . '" src="//www.youtube.com/embed/' . $video_id[0] . '?wmode=transparent" frameborder="0"></iframe></div>' . PHP_EOL; } $atts = array('name' => __('Youtube', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 6, 'options' => array(array('name' => __('Link', 'tfuse'), 'desc' => __('Specifies the link of the youtube video', 'tfuse'), 'id' => 'tf_shc_youtube_link', 'value' => '//www.youtube.com/watch?v=5yB1XPzFzjk', 'type' => 'text'), array('name' => __('Width', 'tfuse'), 'desc' => __('Specifies the width of the video', 'tfuse'), 'id' => 'tf_shc_youtube_width', 'value' => '590', 'type' => 'text'), array('name' => __('Height', 'tfuse'), 'desc' => __('Specifies the height of the video', 'tfuse'), 'id' => 'tf_shc_youtube_height', 'value' => '315', 'type' => 'text'))); tf_add_shortcode('youtube', 'tfuse_youtube', $atts); function tfuse_vimeo($atts, $content) { extract(shortcode_atts(array('link' => '', 'width' => 640, 'height' => 385), $atts)); return '<div clas="video"><iframe src="//player.vimeo.com/video/' . substr($link, 17, 8) . '?title=0&byline=0&portrait=0" width="' . $width . '" height="' . $height . '" frameborder="0"></iframe></div>' . PHP_EOL; } $atts = array('name' => __('Vimeo', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 6, 'options' => array(array('name' => __('Link', 'tfuse'), 'desc' => __('Specifies the link of the vimeo video', 'tfuse'), 'id' => 'tf_shc_vimeo_link', 'value' => '//vimeo.com/16919307', 'type' => 'text'), array('name' => __('Width', 'tfuse'), 'desc' => __('Specifies the width of the video', 'tfuse'), 'id' => 'tf_shc_vimeo_width', 'value' => '590', 'type' => 'text'), array('name' => __('Height', 'tfuse'), 'desc' => __('Specifies the height of the video', 'tfuse'), 'id' => 'tf_shc_vimeo_height', 'value' => '332', 'type' => 'text'))); tf_add_shortcode('vimeo', 'tfuse_vimeo', $atts);
<?php /** * Dropcaps * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. */ function tfuse_drop_cap_1($atts, $content = null) { return '<span class="dropcap1">' . do_shortcode($content) . '</span>'; } $atts = array('name' => __('Drop Cap 1', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'after_preview' => __('orem Ipsum is simply dummy text of the printing and typesetting industry.', 'tfuse'), 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('Enter shortcode content', 'tfuse'), 'id' => 'tf_shc_dropcap1_content', 'value' => 'L', 'type' => 'text'))); tf_add_shortcode('dropcap1', 'tfuse_drop_cap_1', $atts); function tfuse_drop_cap_2($atts, $content = null) { return '<span class="dropcap2">' . do_shortcode($content) . '</span>'; } $atts = array('name' => __('Drop Cap 2', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'after_preview' => __('orem Ipsum is simply dummy text of the printing and typesetting industry.', 'tfuse'), 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('Enter shortcode content', 'tfuse'), 'id' => 'tf_shc_dropcap2_content', 'value' => 'L', 'type' => 'text'))); tf_add_shortcode('dropcap2', 'tfuse_drop_cap_2', $atts);
<?php /** * Table * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * class: custom css class */ function tfuse_table($atts, $content) { extract(shortcode_atts(array('class' => ''), $atts)); $tfuse_shortcode_arr['content'] = html_entity_decode(do_shortcode($content)); return '<div class="styled_table ' . $class . ' styled_table" >' . html_entity_decode(do_shortcode($content)) . '</div>'; } $atts = array('name' => __('Table', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 7, 'options' => array(array('name' => __('Class', 'tfuse'), 'desc' => __('Specifies one or more class names for an shortcode:table-default, table-teal, table-striped, table-primary, table-hover, table-info, table-success, table-warning, table-orange, table-purple, table-danger', 'tfuse'), 'id' => 'tf_shc_table_class', 'value' => '', 'type' => 'text'), array('name' => __('Content', 'tfuse'), 'desc' => __('Enter table content', 'tfuse'), 'id' => 'tf_shc_table_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('table', 'tfuse_table', $atts);
<?php /** * Flickr * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * title: * flickr_id: * items: */ function tfuse_flickr($atts, $content) { extract(shortcode_atts(array('items' => 9, 'flickr_id' => '', 'title' => ''), $atts)); if (!empty($title)) { $title = '<h2>' . tfuse_qtranslate($title) . '</h2>'; } return '<div class="flickr">' . $title . '<script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=' . $items . '&display=random&size=s&layout=x&source=user&user='******'"></script><div class="clear"/></div></div>'; } $atts = array('name' => __('Flickr', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('Text to display above the flickr', 'tfuse'), 'id' => 'tf_shc_flickr_title', 'value' => 'Flickr photostream', 'type' => 'text'), array('name' => __('Items', 'tfuse'), 'desc' => __('Enter the number of images', 'tfuse'), 'id' => 'tf_shc_flickr_items', 'value' => '5', 'type' => 'text'), array('name' => __('Flickr ID', 'tfuse'), 'desc' => __('Flickr Id <a href="http://idgettr.com/" target="_blank">idGettr</a>', 'tfuse'), 'id' => 'tf_shc_flickr_flickr_id', 'value' => '51362473@N05', 'type' => 'text'))); tf_add_shortcode('flickr', 'tfuse_flickr', $atts);
<?php function tfuse_shortcode_tooltip($atts, $content = null) { extract(shortcode_atts(array('pos' => '', 'toolt' => ''), $atts)); return '<a href="#" data-toggle="tooltip" data-placement="' . $pos . '" title="' . $toolt . '" data-original-title="' . do_shortcode($content) . '">' . do_shortcode($content) . '</a>'; } $atts = array('name' => __('Tooltip', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Position', 'tfuse'), 'desc' => __('Select tooltip position', 'tfuse'), 'id' => 'tf_shc_tooltip_pos', 'value' => 'h2', 'options' => array('top' => 'Top', 'boottom' => 'Bottom', 'right' => 'Right', 'left' => 'Left'), 'type' => 'select'), array('name' => __('Tooltip', 'tfuse'), 'desc' => __('Enter tooltip text', 'tfuse'), 'id' => 'tf_shc_tooltip_toolt', 'value' => '', 'type' => 'textarea'), array('name' => __('Content', 'tfuse'), 'desc' => __('Enter tooltip content', 'tfuse'), 'id' => 'tf_shc_tooltip_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('tooltip', 'tfuse_shortcode_tooltip', $atts);
</div>'; while (isset($help_bar['item_title'][$z])) { if ($c < 10) { $c = '0' . $c; } $output .= '<div class="col-md-3 col-sm-3 col-xs-3"> <a href="' . $help_bar['link'][$z] . '" class="link-help-bar"> <div class="help-bar-number">' . $c . '</div> <span class="line-help-bar"></span> <div class="title-link-help-bar">' . $help_bar['item_title'][$z] . '</div> </a> <img src="' . $help_bar['image'][$z] . '" alt=""> </div>'; $z++; $c++; } $output .= '</div></div></div>'; return $output; } $atts = array('name' => 'Help Bar', 'desc' => 'Here comes some lorem ipsum description for the shortcode.', 'category' => 4, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_help_bar_title', 'value' => '', 'type' => 'text', 'divider' => true), array('name' => 'Item Title', 'desc' => '', 'id' => 'tf_shc_help_bar_item_title', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_0 tf_shc_addable'), 'type' => 'text'), array('name' => __('Image', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_help_bar_image', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_1 tf_shc_addable'), 'type' => 'text'), array('name' => 'Link', 'desc' => '', 'id' => 'tf_shc_help_bar_link', 'value' => '', 'properties' => array('class' => 'tf_shc_addable_2 tf_shc_addable tf_shc_addable_last'), 'type' => 'text'))); tf_add_shortcode('help_bar', 'tfuse_help_bar', $atts); function tfuse_help_bar_item($atts, $content = null) { global $help_bar; extract(shortcode_atts(array('item_title' => '', 'image' => '', 'link' => ''), $atts)); $help_bar['item_title'][] = $item_title; $help_bar['image'][] = $image; $help_bar['link'][] = $link; } $atts = array('name' => 'Help Bar', 'desc' => 'Here comes some lorem ipsum description for the box shortcode.', 'category' => 3, 'options' => array(array('name' => 'Title', 'desc' => '', 'id' => 'tf_shc_help_bar_item_item_title', 'value' => 'image', 'type' => 'text'), array('name' => 'Image', 'desc' => '', 'id' => 'tf_shc_help_bar_item_image', 'value' => '', 'type' => 'text'), array('name' => __('Link', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_help_bar_item_link', 'value' => '', 'type' => 'text'))); add_shortcode('help_bar_item', 'tfuse_help_bar_item', $atts);
} $output .= '<div class="slider slider_quotes ' . $class . '"> <div class="slider_container clearfix" id="testimonials' . $testimonials_uniq . '"> ' . $slide . ' </div> ' . $nav . ' </div> <script> jQuery(document).ready(function() { jQuery("#testimonials' . $testimonials_uniq . '").carouFredSel({ next : "#testimonials-next' . $testimonials_uniq . '", prev : "#testimonials-prev' . $testimonials_uniq . '", responsive: true, infinite: false, items: 1, auto: false, scroll: { items : 1, fx: "crossfade", easing: "linear", duration: 300 } }); }); </script>'; } return $output; } $atts = array('name' => __('Testimonials', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('Specifies the title of an shortcode', 'tfuse'), 'id' => 'tf_shc_testimonials_title', 'value' => 'Testimonials', 'type' => 'text'), array('name' => __('Subtitle', 'tfuse'), 'desc' => __('Specifies the subtitle of an shortcode', 'tfuse'), 'id' => 'tf_shc_testimonials_subtitle', 'value' => '', 'type' => 'text'), array('name' => __('Order', 'tfuse'), 'desc' => __('Select display order', 'tfuse'), 'id' => 'tf_shc_testimonials_order', 'value' => 'DESC', 'options' => array('RAND' => __('Random', 'tfuse'), 'ASC' => __('Ascending', 'tfuse'), 'DESC' => __('Descending', 'tfuse')), 'type' => 'select'), array('name' => __('Type', 'tfuse'), 'desc' => __('Select type', 'tfuse'), 'id' => 'tf_shc_testimonials_type', 'value' => 'big_slider', 'options' => array('mini_slider' => __('Mini Slider', 'tfuse'), 'mini_boxed' => __('Mini Slider Boxed', 'tfuse'), 'big_slider' => __('Big Slider', 'tfuse')), 'type' => 'select'))); tf_add_shortcode('testimonials', 'tfuse_testimonials', $atts);
{ return '<p><span class="quote_right">' . do_shortcode($content) . '</span></p>'; } $atts = array('name' => __('Quote Right', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('Enter Quotes Content', 'tfuse'), 'id' => 'tf_shc_quote_right_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('quote_right', 'tfuse_quote_right', $atts); function tfuse_quote_left($atts, $content = null) { return '<div class="quote_left"><div class="inner"><p>' . do_shortcode($content) . '</p></div></div>'; } $atts = array('name' => __('Quote Left', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('Enter Quotes Content', 'tfuse'), 'id' => 'tf_shc_quote_left_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('quote_left', 'tfuse_quote_left', $atts); function tfuse_blockquote($atts, $content = null) { extract(shortcode_atts(array('class' => '', 'author' => '', 'type' => 'simple'), $atts)); if ($class != '') { $class = 'class="' . $class . '"'; } if ($type == 'frame') { return '<div class="frame_quote"><blockquote ' . $class . '>' . do_shortcode($content) . '</blockquote></div>'; } else { $out = '<blockquote ' . $class . '><div class="inner"><p>' . do_shortcode($content) . '</p>'; if ($author != '') { $out .= '<small>' . $author . '</small>'; } $out .= '</div></blockquote>'; return $out; } } $atts = array('name' => __('BlockQuote', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Content', 'tfuse'), 'desc' => __('Enter Quotes Content', 'tfuse'), 'id' => 'tf_shc_blockquote_content', 'value' => '', 'type' => 'textarea'), array('name' => __('Class', 'tfuse'), 'desc' => __('Enter Class. Ex: pull-left, pull-right', 'tfuse'), 'id' => 'tf_shc_blockquote_class', 'value' => '', 'type' => 'text'), array('name' => __('Author', 'tfuse'), 'desc' => __('Enter author', 'tfuse'), 'id' => 'tf_shc_blockquote_author', 'value' => '', 'type' => 'text'), array('name' => __('Type', 'tfuse'), 'desc' => __('Select Type', 'tfuse'), 'id' => 'tf_shc_blockquote_type', 'value' => 'simple', 'options' => array('simple' => __('Simple Bloquote', 'tfuse'), 'frame' => __('Framed Bloquote', 'tfuse')), 'type' => 'select'))); tf_add_shortcode('blockquote', 'tfuse_blockquote', $atts);
* To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * items: 5 * username: * title: * post_date: */ function tfuse_twitter($atts, $content = null) { extract(shortcode_atts(array('items' => 5, 'username' => '', 'title' => '', 'post_date' => ''), $atts)); $return_html = ''; if (!empty($username)) { $tweets = tfuse_get_tweets($username, $items); $return_html .= '<div class="twitter">'; if (!empty($title)) { $return_html .= '<h2>' . tfuse_qtranslate($title) . '</h2><ul>'; } foreach ($tweets as $tweet) { if (isset($tweet->text)) { $return_html .= '<li>' . $tweet->text . '</li>'; } } $return_html .= '</ul></div>'; } return $return_html; } $atts = array('name' => __('Twitter', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 11, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('Specifies the title of an shortcode', 'tfuse'), 'id' => 'tf_shc_twitter_title', 'value' => '', 'type' => 'text'), array('name' => __('Username', 'tfuse'), 'desc' => __('Twitter username', 'tfuse'), 'id' => 'tf_shc_twitter_username', 'value' => '', 'type' => 'text'), array('name' => __('Items', 'tfuse'), 'desc' => __('Enter the number of tweets', 'tfuse'), 'id' => 'tf_shc_twitter_items', 'value' => '5', 'type' => 'text'))); tf_add_shortcode('twitter', 'tfuse_twitter', $atts);
<?php /** * Buttons * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * style: custom css style * link: the destination of a link e.g. http://themefuse.com/ * class: css class * target: _blank, _self, _parent, _top */ function tfuse_button($atts, $content = null) { extract(shortcode_atts(array('style' => '', 'link' => '#', 'class' => '', 'target' => '_self'), $atts)); if (!empty($style)) { $class = 'button_styled'; $style = ' style="' . $style . '"'; } else { $class = 'button_link ' . $class; } return '<a href="' . $link . '" class="' . $class . '" target="' . $target . '"' . $style . '><span>' . $content . '</span></a>'; } $atts = array('name' => __('Buttons', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the button shortcode.', 'tfuse'), 'category' => 2, 'options' => array(array('name' => __('Target', 'tfuse'), 'desc' => __('Specifies where to open the linked shortcode', 'tfuse'), 'id' => 'tf_shc_button_target', 'value' => '_self', 'options' => array('_blank' => __('Opens the link in a new window or tab', 'tfuse'), '_parent' => __('Opens the link in the parent frame', 'tfuse'), '_self' => __('Opens the link in the same frame as it was clicked (this is default)', 'tfuse'), '_top' => __('Opens the link in the full body of the window', 'tfuse')), 'type' => 'select'), array('name' => __('Style', 'tfuse'), 'desc' => __('Specify an inline style for an shortcode', 'tfuse'), 'id' => 'tf_shc_button_style', 'value' => '', 'type' => 'text'), array('name' => __('Class', 'tfuse'), 'desc' => __('Specifies one or more class names for an shortcode, separated by space. <br /><b>predefined classes:</b> btn_pink, btn_black, btn_blue, btn_yellow, btn_green', 'tfuse'), 'id' => 'tf_shc_button_class', 'value' => '', 'type' => 'text'), array('name' => __('Link', 'tfuse'), 'desc' => __('Specifies the URL of the page the link goes to', 'tfuse'), 'id' => 'tf_shc_button_link', 'value' => '#', 'type' => 'text'), array('name' => __('Content', 'tfuse'), 'desc' => __('Enter shortcode content', 'tfuse'), 'id' => 'tf_shc_button_content', 'value' => 'button', 'type' => 'textarea'))); tf_add_shortcode('button', 'tfuse_button', $atts);
<?php /** * Columns * * To override this shortcode in a child theme, copy this file to your child theme's * theme_config/extensions/shortcodes/shortcodes/ folder. * * Optional arguments: * type: 1, 1_2, 1_3, 1_4, 2_3 etc. * class: */ function tfuse_col($atts, $content = null) { extract(shortcode_atts(array('type' => '1', 'class' => ''), $atts)); return '<div class="col-sm-' . $type . ' col-md-' . $type . ' ' . $class . '">' . do_shortcode($content) . '</div>'; } $atts = array('name' => __('Columns', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the button shortcode.', 'tfuse'), 'category' => 4, 'options' => array(array('name' => __('Type', 'tfuse'), 'desc' => __('Select column type', 'tfuse'), 'id' => 'tf_shc_col_type', 'value' => '_self', 'options' => array('12' => __('One column', 'tfuse'), '6' => __('One half column (1/2)', 'tfuse'), '4' => __('One third column (1/3)', 'tfuse'), '3' => __('A fourth column (1/4)', 'tfuse'), '8' => __('Two thirds column (2/3)', 'tfuse'), '9' => __('Three fourths column (3/4)', 'tfuse')), 'type' => 'select'), array('name' => __('Class', 'tfuse'), 'desc' => __('Specifies one or more class names for an shortcode. To specify multiple classes,<br /> separate the class names with a space, e.g. <b>"left important"</b>.', 'tfuse'), 'id' => 'tf_shc_col_class', 'value' => '', 'type' => 'text'), array('name' => __('Content', 'tfuse'), 'desc' => __('Enter shortcode content', 'tfuse'), 'id' => 'tf_shc_col_content', 'value' => '', 'type' => 'textarea'))); tf_add_shortcode('col', 'tfuse_col', $atts);
<?php function tfuse_shortcode_footer_menu($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'menu' => ''), $atts)); $out = ''; $items = wp_get_nav_menu_items($menu); $out .= '<div class="col-lg-2 col-md-2 col-sm-6 col-xs-6"> <div class="widget widget-footer-menu"> <h3 class="widget-title">' . $title . '</h3>' . '<ul>'; foreach ($items as $item) { $out .= '<li><a href="' . $item->url . '">' . $item->title . '</a></li>'; } $out .= '</ul></div> </div>'; return $out; } $atts = array('name' => __('Footer Menu', 'tfuse'), 'desc' => __('Here comes some lorem ipsum description for the box shortcode.', 'tfuse'), 'category' => 9, 'options' => array(array('name' => __('Title', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_footer_menu_title', 'value' => '', 'type' => 'text'), array('name' => __('Select Menu', 'tfuse'), 'desc' => __('', 'tfuse'), 'id' => 'tf_shc_footer_menu_menu', 'value' => '', 'options' => tfuse_get_menus(), 'type' => 'select'))); tf_add_shortcode('footer_menu', 'tfuse_shortcode_footer_menu', $atts);