当前位置: 首页>>代码示例>>PHP>>正文


PHP tf_add_shortcode函数代码示例

本文整理汇总了PHP中tf_add_shortcode函数的典型用法代码示例。如果您正苦于以下问题:PHP tf_add_shortcode函数的具体用法?PHP tf_add_shortcode怎么用?PHP tf_add_shortcode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了tf_add_shortcode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 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'));
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:7,代码来源:map.php

示例2: init

 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'));
 }
开发者ID:part-time-project,项目名称:italians,代码行数:8,代码来源:toggle_code.php

示例3: foreach

        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);
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:30,代码来源:members.php

示例4: do_shortcode

        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);
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:30,代码来源:text-styles.php

示例5: tfuse_row_box

<?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);
开发者ID:shimion,项目名称:stlucks,代码行数:23,代码来源:rows.php

示例6: if

        $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);
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:31,代码来源:header_map.php

示例7: array

    }
    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>';
开发者ID:shimion,项目名称:stlucks,代码行数:31,代码来源:reservationform.php

示例8: foreach

            <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'] . '" >&nbsp;' . $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);
开发者ID:part-time-project,项目名称:italians,代码行数:30,代码来源:tabs_posts.php

示例9: tfuse_shortcode_donate

<?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);
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:27,代码来源:donate.php

示例10: jQuery

        }
    }
    $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);
开发者ID:part-time-project,项目名称:italians,代码行数:30,代码来源:minigallery.php

示例11: extract

{
    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);
开发者ID:shimion,项目名称:stlucks,代码行数:30,代码来源:popular_posts.php

示例12: array

    }
    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>';
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:31,代码来源:contactform.php

示例13: jQuery

				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);
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:30,代码来源:projects.php

示例14: switch

    }
    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 . '&#038;chtt=' . $title . '&#038;chl=' . $label . '&#038;chco=' . $colors . '&#038;chs=' . $width . 'x' . $height . '&#038;chd=t:' . $data . '&chdl=' . $legend . '&#038;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 . '&#038;chtt=' . $title . '&#038;chl=' . $label . '&#038;chco=' . $colors . '&#038;chs=' . $width . 'x' . $height . '&#038;chd=t:' . $data . '&chdl=' . $legend . '&#038;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);
开发者ID:part-time-project,项目名称:italians,代码行数:30,代码来源:chart.php

示例15: jQuery

        $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);
开发者ID:part-time-project,项目名称:italians,代码行数:31,代码来源:slideshow.php


注:本文中的tf_add_shortcode函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。