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


PHP __td函数代码示例

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


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

示例1: get_social_network_meta

 function get_social_network_meta($service_id, $user_id, &$td_social_api)
 {
     switch ($service_id) {
         case 'facebook':
             return array('button' => __td('Like'), 'url' => "https://www.facebook.com/{$user_id}", 'text' => __td('Fans'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'twitter':
             return array('button' => __td('Follow'), 'url' => "https://twitter.com/{$user_id}", 'text' => __td('Followers'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'vimeo':
             return array('button' => __td('Like'), 'url' => "http://vimeo.com/{$user_id}", 'text' => __td('Likes'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'youtube':
             return array('button' => __td('Subscribe'), 'url' => strpos('channel/', $user_id) >= 0 ? "http://www.youtube.com/{$user_id}" : "http://www.youtube.com/user/{$user_id}", 'text' => __td('Subscribers'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'googleplus':
             return array('button' => __td('+1'), 'url' => "https://plus.google.com/{$user_id}", 'text' => __td('Subscribers'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'instagram':
             return array('button' => __td('Follow'), 'url' => "http://instagram.com/{$user_id}#", 'text' => __td('Followers'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'soundcloud':
             return array('button' => __td('Follow'), 'url' => "https://soundcloud.com/{$user_id}", 'text' => __td('Followers'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
         case 'rss':
             return array('button' => __td('Follow'), 'url' => get_bloginfo('rss2_url'), 'text' => __td('Followers'), 'api' => $td_social_api->get_social_counter($service_id, $user_id));
             break;
     }
 }
开发者ID:rinodung,项目名称:newspaper-wordpress,代码行数:29,代码来源:td_block_social_counter.php

示例2: get_block_sub_cats

 function get_block_sub_cats($atts)
 {
     extract(shortcode_atts(array('limit' => 5, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'show_child_cat' => '', 'sub_cat_ajax' => ''), $atts));
     $buffy = '';
     if (!empty($show_child_cat) and !empty($category_id)) {
         $td_subcategories = get_categories(array('child_of' => $category_id));
         if (!empty($td_subcategories)) {
             if ($show_child_cat != 'all') {
                 $td_subcategories = array_slice($td_subcategories, 0, $show_child_cat);
             }
             $buffy .= '<div class="block-mega-child-cats">';
             //show all categories only on ajax
             if (empty($sub_cat_ajax)) {
                 $buffy .= '<div><a class="cur-sub-cat ajax-sub-cat-mega sub-cat-' . $this->block_uid . '" id="sub-cat-' . $this->block_uid . '-' . $category_id . '" data-cat_id="' . $category_id . '"
                     data-td_block_id="' . $this->block_uid . '" href="' . get_category_link($category_id) . '">' . __td('All') . '</a></div>';
             }
             foreach ($td_subcategories as $td_category) {
                 if (empty($sub_cat_ajax)) {
                     $buffy .= '<div><a class="ajax-sub-cat-mega sub-cat-' . $this->block_uid . '" id="sub-cat-' . $this->block_uid . '-' . $td_category->cat_ID . '" data-cat_id="' . $td_category->cat_ID . '" data-td_block_id="' . $this->block_uid . '" href="' . get_category_link($td_category->cat_ID) . '">' . $td_category->name . '</a></div>';
                 } else {
                     $buffy .= '<div><a href="' . get_category_link($td_category->cat_ID) . '">' . $td_category->name . '</a></div>';
                 }
             }
             $buffy .= '</div>';
         } else {
             //there are no subcategories, return false - this is used by the mega menu block to alter it's structure
             return false;
         }
     }
     return $buffy;
 }
开发者ID:Vatia13,项目名称:wordpress,代码行数:31,代码来源:td_block_mega_menu.php

示例3: render

 function render($atts, $content = null)
 {
     parent::render($atts);
     // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
     // this block need td_column_number to add rows if more posts are displayed on a post.
     /// the td_column_number is not standard here, it's    5 for full width / 3 for content + sidebar
     extract(shortcode_atts(array('td_column_number' => ''), $atts));
     // we have no related posts to display
     if ($this->td_query->post_count == 0) {
         return;
     }
     $buffy = '';
     //output buffer
     //get the js for this block
     $buffy .= $this->get_block_js();
     $buffy .= '<div class="' . $this->get_block_classes() . '">';
     //get the filter for this block
     $buffy .= '<h4 class="td-related-title">';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-left td-cur-simple-item" data-td_filter_value="" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('RELATED ARTICLES', TD_THEME_NAME) . '</a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_related_more_from_author" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('MORE FROM AUTHOR', TD_THEME_NAME) . '</a>';
     $buffy .= '</h4>';
     $buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
     $buffy .= $this->inner($this->td_query->posts, $td_column_number);
     //inner content of the block
     $buffy .= '</div>';
     //get the ajax pagination for this block
     $buffy .= $this->get_block_pagination();
     $buffy .= '</div> <!-- ./block -->';
     return $buffy;
 }
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:30,代码来源:td_block_related_posts.php

示例4: widget

 function widget($args, $instance)
 {
     $buffy = '';
     $buffy .= '<div class="footer-logo-wrap">';
     if (!empty($instance['logo_url_r'])) {
         $buffy .= '<img  class="td-retina-data" src="' . $instance['logo_url'] . '" data-retina="' . htmlentities($instance['logo_url_r']) . '" alt=""/>';
     } else {
         $buffy .= '<img src="' . $instance['logo_url'] . '" alt=""/>';
     }
     $buffy .= '</div>';
     $buffy .= '<div class="footer-text-wrap">';
     $buffy .= $instance['footer_text'];
     $buffy .= '</div>';
     if (!empty($instance['footer_text_2'])) {
         $buffy .= '<div class="footer-text-wrap">';
         $buffy .= $instance['footer_text_2'];
         $buffy .= '</div>';
     }
     if (!empty($instance['footer_email'])) {
         $buffy .= '<div class="footer-email-wrap">';
         $buffy .= __td('Contact us') . ': <a href="mailto:' . $instance['footer_email'] . '">' . $instance['footer_email'] . '</a>';
         $buffy .= '</div>';
     }
     //print_r($instance);
     echo $buffy;
 }
开发者ID:Vatia13,项目名称:wordpress,代码行数:26,代码来源:td_footer_logo_widget.php

示例5: render

 function render($atts, $content = null)
 {
     parent::render($atts);
     // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
     // we have no related posts to display
     if ($this->td_query->post_count == 0) {
         return;
     }
     $buffy = '';
     //output buffer
     //get the js for this block
     $buffy .= $this->get_block_js();
     $buffy .= '<div class="' . $this->get_block_classes() . '">';
     //get the filter for this block
     $buffy .= '<h4 class="td-related-title">';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-left td-cur-simple-item" data-td_filter_value="" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('RELATED ARTICLES') . '</a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_related_more_from_author" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('MORE FROM AUTHOR') . '</a>';
     $buffy .= '</h4>';
     $buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
     $buffy .= $this->inner($this->td_query->posts);
     //inner content of the block
     $buffy .= '</div>';
     //get the ajax pagination for this block
     $buffy .= $this->get_block_pagination();
     $buffy .= '</div> <!-- ./block -->';
     return $buffy;
 }
开发者ID:vikasjain1595,项目名称:wordpresstheme,代码行数:27,代码来源:td_related_posts.php

示例6: render

    function render()
    {
        ob_start();
        ?>

        <div class="td_mod_wrap td_mod8 <?php 
        echo $this->get_no_thumb_class();
        ?>
" <?php 
        echo $this->get_item_scope();
        ?>
>
            <?php 
        echo $this->get_image('art-big-1col');
        ?>

            <div class="item-details">
                <?php 
        echo $this->get_title(td_util::get_option('tds_mod8_title_excerpt'));
        ?>
                <div class="meta-info">
                    <?php 
        //echo $this->get_author();
        ?>
                    <?php 
        echo $this->get_date();
        ?>
                    <?php 
        echo $this->get_commentsAndViews();
        ?>
                </div>


                <p><div class="td-post-text-excerpt"><?php 
        echo $this->get_excerpt(td_util::get_option('tds_mod8_content_excerpt'));
        ?>
</div></p>

                <div class="more-link-wrap wpb_button td_read_more clearfix">
                    <a href="<?php 
        echo $this->href;
        ?>
"><?php 
        echo __td('Continue', TD_THEME_NAME);
        ?>
</a>
                </div>


            </div>

            <?php 
        echo $this->get_item_scope_meta();
        ?>
        </div>

        <?php 
        return ob_get_clean();
    }
开发者ID:Vatia13,项目名称:tofido,代码行数:59,代码来源:td_module_8.php

示例7: render

    function render()
    {
        ob_start();
        ?>

        <div class="<?php 
        echo $this->get_module_classes();
        ?>
">
            <div class="meta-info-container">
                <?php 
        echo $this->get_image('td_696x385');
        ?>

                <div class="td-module-meta-info">
                    <div class="td-module-meta-holder">
                        <?php 
        echo $this->get_title();
        ?>
                        <?php 
        if (td_util::get_option('tds_category_module_14') == 'yes') {
            echo $this->get_category();
        }
        ?>
                        <?php 
        echo $this->get_author();
        ?>
                        <?php 
        echo $this->get_date();
        ?>
                        <?php 
        echo $this->get_comments();
        ?>
                    </div>
                </div>
            </div>

            <div class="td-excerpt">
                <?php 
        echo $this->get_excerpt();
        ?>

                <div class="td-read-more">
                    <a href="<?php 
        echo $this->href;
        ?>
"><?php 
        echo __td('Read more', TD_THEME_NAME);
        ?>
</a>
                </div>
            </div>

        </div>

        <?php 
        return ob_get_clean();
    }
开发者ID:luxifel,项目名称:Bionerd,代码行数:58,代码来源:td_module_14.php

示例8: render

    function render()
    {
        ob_start();
        ?>

        <div class="<?php 
        echo $this->get_module_classes();
        ?>
" <?php 
        echo $this->get_item_scope();
        ?>
>
            <div class="item-details">
                <?php 
        echo $this->get_title();
        ?>

                <div class="td-module-meta-info">
                    <?php 
        if (td_util::get_option('tds_category_module_13') == 'yes') {
            echo $this->get_category();
        }
        ?>
                    <?php 
        echo $this->get_author();
        ?>
                    <?php 
        echo $this->get_date();
        ?>
                    <?php 
        echo $this->get_comments();
        ?>
                </div>

                <?php 
        echo $this->get_image('td_696x0');
        ?>

                <div class="td-read-more">
                    <a href="<?php 
        echo $this->href;
        ?>
"><?php 
        echo __td('Read more', TD_THEME_NAME);
        ?>
</a>
                </div>
            </div>

            <?php 
        echo $this->get_item_scope_meta();
        ?>
        </div>

        <?php 
        return ob_get_clean();
    }
开发者ID:rinodung,项目名称:newspaper-wordpress,代码行数:57,代码来源:td_module_13.php

示例9: get_social_sharing_bottom

    function get_social_sharing_bottom()
    {
        if (!$this->is_single) {
            return;
        }
        if (td_util::get_option('tds_bottom_social_show') == 'hide' and td_util::get_option('tds_bottom_like_tweet_show') == 'hide') {
            return;
        }
        // used to style the sharing icon to be big on tablet
        $td_no_like = '';
        if (td_util::get_option('tds_bottom_like_tweet_show') != 'hide') {
            $td_no_like = 'td-with-like';
        }
        $buffy = '';
        // @todo single-post-thumbnail appears to not be in used! please check
        $image = wp_get_attachment_image_src(get_post_thumbnail_id($this->post->ID), 'single-post-thumbnail');
        $buffy .= '<div class="td-post-sharing td-post-sharing-bottom ' . $td_no_like . '"><span class="td-post-share-title">' . __td('SHARE', TD_THEME_NAME) . '</span>';
        if (td_util::get_option('tds_bottom_social_show') != 'hide') {
            $twitter_user = td_util::get_option('tds_tweeter_username');
            /**
             * get Pinterest share description
             * get it from SEO by Yoast meta (if the plugin is active and the description is set) else use the post title
             */
            if (is_plugin_active('wordpress-seo/wp-seo.php') and get_post_meta($this->post->ID, '_yoast_wpseo_metadesc', true) != '') {
                $td_pinterest_share_description = get_post_meta($this->post->ID, '_yoast_wpseo_metadesc', true);
            } else {
                $td_pinterest_share_description = htmlspecialchars(urlencode(html_entity_decode($this->title, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8');
            }
            //default share buttons
            $buffy .= '
            <div class="td-default-sharing">
	            <a class="td-social-sharing-buttons td-social-facebook" href="http://www.facebook.com/sharer.php?u=' . urlencode(esc_url(get_permalink())) . '" onclick="window.open(this.href, \'mywin\',\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><i class="td-icon-facebook"></i><div class="td-social-but-text">Facebook</div></a>
	            <a class="td-social-sharing-buttons td-social-twitter" href="https://twitter.com/intent/tweet?text=' . htmlspecialchars(urlencode(html_entity_decode($this->title, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8') . '&url=' . urlencode(esc_url(get_permalink())) . '&via=' . urlencode($twitter_user ? $twitter_user : get_bloginfo('name')) . '"><i class="td-icon-twitter"></i><div class="td-social-but-text">Twitter</div></a>
	            <a class="td-social-sharing-buttons td-social-google" href="http://plus.google.com/share?url=' . esc_url(get_permalink()) . '" onclick="window.open(this.href, \'mywin\',\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><i class="td-icon-googleplus"></i></a>
	            <a class="td-social-sharing-buttons td-social-pinterest" href="http://pinterest.com/pin/create/button/?url=' . esc_url(get_permalink()) . '&amp;media=' . (!empty($image[0]) ? $image[0] : '') . '&description=' . $td_pinterest_share_description . '" onclick="window.open(this.href, \'mywin\',\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><i class="td-icon-pinterest"></i></a>
	            <a class="td-social-sharing-buttons td-social-whatsapp" href="whatsapp://send?text=' . htmlspecialchars(urlencode(html_entity_decode($this->title, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8') . ' - ' . urlencode(esc_url(get_permalink())) . '" ><i class="td-icon-whatsapp"></i></a>
            </div>';
        }
        if (td_util::get_option('tds_bottom_like_tweet_show') != 'hide') {
            //classic share buttons
            $buffy .= '<div class="td-classic-sharing">';
            $buffy .= '<ul>';
            $buffy .= '<li class="td-classic-facebook">';
            $buffy .= '<iframe frameBorder="0" src="' . td_global::$http_or_https . '://www.facebook.com/plugins/like.php?href=' . $this->href . '&amp;layout=button_count&amp;show_faces=false&amp;width=105&amp;action=like&amp;colorscheme=light&amp;height=21" style="border:none; overflow:hidden; width:105px; height:21px; background-color:transparent;"></iframe>';
            $buffy .= '</li>';
            $buffy .= '<li class="td-classic-twitter">';
            $buffy .= '<a href="https://twitter.com/share" class="twitter-share-button" data-url="' . esc_attr($this->href) . '" data-text="' . $this->title . '" data-via="' . td_util::get_option('tds_' . 'social_twitter') . '" data-lang="en">tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>';
            $buffy .= '</li>';
            $buffy .= '</ul>';
            $buffy .= '</div>';
        }
        $buffy .= '</div>';
        return $buffy;
    }
开发者ID:luxifel,项目名称:Bionerd,代码行数:54,代码来源:td_module_single.php

示例10: get_social_sharing_bottom

    function get_social_sharing_bottom()
    {
        if (!$this->is_single) {
            return;
        }
        if (td_util::get_option('tds_bottom_social_show') == 'hide' and td_util::get_option('tds_bottom_like_tweet_show') == 'hide') {
            return;
        }
        // used to style the sharing icon to be big on tablet
        $td_no_like = '';
        if (td_util::get_option('tds_bottom_like_tweet_show') != 'hide') {
            $td_no_like = 'td-with-like';
        }
        $buffy = '';
        // @todo single-post-thumbnail appears to not be in used! please check
        $image = wp_get_attachment_image_src(get_post_thumbnail_id($this->post->ID), 'single-post-thumbnail');
        $buffy .= '<div class="td-post-sharing td-post-sharing-bottom ' . $td_no_like . '"><span class="td-post-share-title">' . __td('SHARE', TD_THEME_NAME) . '</span>';
        if (td_util::get_option('tds_bottom_social_show') != 'hide') {
            $twitter_user = td_util::get_option('tds_tweeter_username');
            //default share buttons
            $buffy .= '
            <div class="td-default-sharing">
	            <a class="td-social-sharing-buttons td-social-facebook" href="http://www.facebook.com/sharer.php?u=' . urlencode(esc_url(get_permalink())) . '" onclick="window.open(this.href, \'mywin\',\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><i class="td-icon-facebook"></i><div class="td-social-but-text">Facebook</div></a>
	            <a class="td-social-sharing-buttons td-social-twitter" href="https://twitter.com/intent/tweet?text=' . htmlspecialchars(urlencode(html_entity_decode($this->title, ENT_COMPAT, 'UTF-8')), ENT_COMPAT, 'UTF-8') . '&url=' . urlencode(esc_url(get_permalink())) . '&via=' . urlencode($twitter_user ? $twitter_user : get_bloginfo('name')) . '"><i class="td-icon-twitter"></i><div class="td-social-but-text">Twitter</div></a>
	            <a class="td-social-sharing-buttons td-social-google" href="http://plus.google.com/share?url=' . esc_url(get_permalink()) . '" onclick="window.open(this.href, \'mywin\',\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><i class="td-icon-googleplus"></i></a>
	            <a class="td-social-sharing-buttons td-social-pinterest" href="http://pinterest.com/pin/create/button/?url=' . esc_url(get_permalink()) . '&amp;media=' . (!empty($image[0]) ? $image[0] : '') . '" onclick="window.open(this.href, \'mywin\',\'left=50,top=50,width=600,height=350,toolbar=0\'); return false;"><i class="td-icon-pinterest"></i></a>
            </div>';
        }
        if (td_util::get_option('tds_bottom_like_tweet_show') != 'hide') {
            //classic share buttons
            $buffy .= '<!-- JiaThis Button BEGIN -->
<div class="jiathis_style_32x32">
	<a class="jiathis_button_qzone"></a>
	<a class="jiathis_button_tsina"></a>
	<a class="jiathis_button_tqq"></a>
	<a class="jiathis_button_weixin"></a>
	<a class="jiathis_button_renren"></a>
	<a href="http://www.jiathis.com/share?uid=2037753" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
</div>
<script type="text/javascript">';
            $buffy .= "var jiathis_config = {data_track_clickback:'true'};";
            $buffy .= '</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=2037753" charset="utf-8"></script>
<!-- JiaThis Button END -->';
        }
        $buffy .= '</div>';
        return $buffy;
    }
开发者ID:ryandong82,项目名称:colorfulladysite,代码行数:48,代码来源:td_module_single.php

示例11: render_before_list_wrap

 function render_before_list_wrap()
 {
     if (td_global::$cur_single_template_sidebar_pos == 'no_sidebar') {
         $td_class_nr_of_columns = ' td-3-columns ';
     } else {
         $td_class_nr_of_columns = ' td-2-columns ';
     }
     $buffy = '';
     //generate unique gallery slider id
     $this->smart_list_tip_1_unique_id = 'smart_list_tip1_' . td_global::td_generate_unique_id();
     //wrapper with id for smart list wrapper type 1
     $buffy .= '<div class="td_smart_list_1' . $td_class_nr_of_columns . '">';
     $buffy .= '<div class="td-controls"><a class="td-left-smart-list doubleSliderPrevButton" href="#" onclick="return false;"><i class = "td-icon-left"></i>' . __td('Prev', TD_THEME_NAME) . '</a><a class="td-right-smart-list doubleSliderNextButton" href="#" onclick="return false;">' . __td('Next', TD_THEME_NAME) . '<i class = "td-icon-right"></i></a></div>';
     $buffy .= '<div class="td-iosSlider td-smart-list-slider" id="' . $this->smart_list_tip_1_unique_id . '">';
     $buffy .= '<div class ="td-slider">';
     return $buffy;
 }
开发者ID:tuanlibra,项目名称:thptxuanang,代码行数:17,代码来源:td_smart_list_1.php

示例12: td_js_generator

function td_js_generator()
{
    td_js_buffer::add_variable('td_ajax_url', admin_url('admin-ajax.php'));
    td_js_buffer::add_variable('td_get_template_directory_uri', get_template_directory_uri());
    td_js_buffer::add_variable('tds_snap_menu', td_util::get_option('tds_snap_menu'));
    td_js_buffer::add_variable('tds_header_style', td_util::get_option('tds_header_style'));
    td_js_buffer::add_variable('tds_mobile_swipe', td_util::get_option('tds_mobile_swipe'));
    td_js_buffer::add_variable('td_search_url', get_search_link());
    td_js_buffer::add_variable('td_please_wait', str_replace(array('"', "'"), array('`'), __td("Please wait...")));
    td_js_buffer::add_variable('td_email_user_pass_incorrect', str_replace(array('"', "'"), array('`'), __td("User or password incorrect!")));
    td_js_buffer::add_variable('td_email_user_incorrect', str_replace(array('"', "'"), array('`'), __td("Email or username incorrect!")));
    td_js_buffer::add_variable('td_email_incorrect', str_replace(array('"', "'"), array('`'), __td("Email incorrect!")));
    //use for more articles on post pages
    td_js_buffer::add_variable('tds_more_articles_on_post_enable', td_util::get_option('tds_more_articles_on_post_pages_enable'));
    td_js_buffer::add_variable('tds_more_articles_on_post_time_to_wait', td_util::get_option('tds_more_articles_on_post_pages_time_to_wait'));
    td_js_buffer::add_variable('tds_more_articles_on_post_pages_distance_from_top', intval(td_util::get_option('tds_more_articles_on_post_pages_distance_from_top')));
    td_js_buffer::add("\nvar td_blocks = []; //here we store all the items for the current page\n\n//td_block class - each ajax block uses a object of this class for requests\nfunction td_block() {\n    this.id = '';\n    this.block_type = 1; //block type id (1-234 etc)\n    this.atts = '';\n    this.td_cur_cat = '';\n    this.td_column_number = '';\n    this.td_current_page = 1; //\n    this.post_count = 0; //from wp\n    this.found_posts = 0; //from wp\n    this.max_num_pages = 0; //from wp\n    this.is_ajax_running = false;\n    this.header_color = '';\n}\n\n    ");
}
开发者ID:Vatia13,项目名称:tofido,代码行数:18,代码来源:td_js_generator.php

示例13: get_author

 function get_author($show_stars_on_review = true)
 {
     $buffy = '';
     if (td_review::has_review($this->td_review) and $show_stars_on_review === true) {
         //if review do nothing
         //            $buffy .= '<div class="entry-review-stars">';
         //            $buffy .=  td_review::render_stars($this->td_review);
         //            $buffy .= '</div>';
     } else {
         $td_article_date_unix = get_the_time('U', $this->post->ID);
         $buffy .= '<span class="td-block-author">';
         $buffy .= __td('by', TD_THEME_NAME);
         $buffy .= ' ';
         $buffy .= get_the_author_meta('display_name', $this->post->post_author);
         $buffy .= '</span>';
         $buffy .= '<meta itemprop="interactionCount" content="UserComments:' . get_comments_number($this->post->ID) . '"/>';
         //$buffy .= '<meta itemprop="dateCreated" content="' . get_the_time(get_option('date_format'), $this->post->ID) . '"/>';
     }
     return $buffy;
 }
开发者ID:Vatia13,项目名称:wordpress,代码行数:20,代码来源:td_module.php

示例14: render

 function render($atts, $content = null)
 {
     parent::render($atts);
     // sets the live atts, $this->atts, $this->block_uid, $this->td_query (it runs the query)
     // this block need td_column_number to add rows if more posts are displayed on a post.
     /// the td_column_number is not standard here, it's    5 for full width / 3 for content + sidebar
     extract(shortcode_atts(array('td_column_number' => ''), $atts));
     // we have no related posts to display
     if ($this->td_query->post_count == 0) {
         return;
     }
     $buffy = '';
     //output buffer
     //get the js for this block
     $buffy .= $this->get_block_js();
     $buffy .= '<div class="' . $this->get_block_classes() . '">';
     //get the filter for this block
     $buffy .= '<h4 class="td-related-title">';
     // $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-left td-cur-simple-item" data-td_filter_value="" data-td_block_id="' . $this->block_uid . '" href="#">' . __td('RELATED ARTICLES', TD_THEME_NAME) . '</a>';
     $buffy .= '<span class="title-inner">' . __td('RELATED ARTICLES', TD_THEME_NAME) . '</span>';
     // ZA Custom
     $buffy .= '<div id="related-filter">Filter <img src="/wp-content/uploads/2015/12/icon-caret-down_white.png" alt=""></div>';
     $buffy .= '<div class="td-related-mobile">';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right " data-td_filter_value="td_related_more_from_author" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="NEUTRAL" src="/wp-content/uploads/2015/12/icon-articleNeutual.png" alt=""><img class="NEUTRAL-hover" src="/wp-content/uploads/2015/12/icon-articleNeutual-selected.png" alt=""><span> NEUTRAL</span></div></div></a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_happy" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleHappy.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleHappy-selected.png" alt=""><span> HAPPY</span></div></div></a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_funny" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleFunny.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleFunny-selected.png" alt=""><span> FUNNY</span></div></div></a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_romantic" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleRomantic.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleRomantic-selected.png" alt=""><span> ROMANTIC</span></div></div></a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_surprised" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleSurprised.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleSurprised-selected.png" alt=""><span> SURPRISED</span></div></div></a>';
     $buffy .= '<a id="' . td_global::td_generate_unique_id() . '" class="td-related-right" data-td_filter_value="td_tag_slug_filter_sad" data-td_block_id="' . $this->block_uid . '" href="#"><div class="td-related-mobile-inner"><div class="icon-title"><img class="HAPPY" src="/wp-content/uploads/2015/12/icon-articleSad.png" alt=""><img class="HAPPY-hover" src="/wp-content/uploads/2015/12/icon-articleSad-selected.png" alt=""><span> SAD</span></div></div></a>';
     $buffy .= '</div>';
     // End ZA Custom
     $buffy .= '</h4>';
     $buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
     $buffy .= $this->inner($this->td_query->posts, $td_column_number);
     //inner content of the block
     $buffy .= '</div>';
     //get the ajax pagination for this block
     $buffy .= $this->get_block_pagination();
     $buffy .= '</div> <!-- ./block -->';
     return $buffy;
 }
开发者ID:weerapat,项目名称:wp-daily,代码行数:41,代码来源:td_block_related_posts.php

示例15: inner

 function inner($posts, $td_column_number = '')
 {
     $buffy = '';
     $navigation = '';
     if (!empty($this->atts['navigation'])) {
         $navigation = $this->atts['navigation'];
     }
     $td_block_layout = new td_block_layout();
     if (!empty($posts)) {
         $buffy .= $td_block_layout->open_row();
         $trending_now_unique_id = td_global::td_generate_unique_id();
         //generate unique id for this object
         $buffy .= '<div class="td-trending-now-wrapper" id="' . $trending_now_unique_id . '" data-start="' . esc_attr($navigation) . '">';
         $buffy .= '<div class="td-trending-now-title">' . __td('Trending Now', TD_THEME_NAME) . '</div><div class="td-trending-now-display-area">';
         foreach ($posts as $post_count => $post) {
             $td_module_trending_now = new td_module_trending_now($post);
             $buffy .= $td_module_trending_now->render($post_count);
         }
         $buffy .= '</div>';
         // ZA Cutom
         // $buffy .= '<div class="td-next-prev-wrap">';
         //     $buffy .= '<a href="#"
         //                   class="td_ajax-prev-pagex td-trending-now-nav-left"
         //                   data-wrapper-id="' . $trending_now_unique_id . '"
         //                   data-moving="left"
         //                   data-control-start="' . $navigation . '"><i class="td-icon-menu-left"></i></a>';
         //     $buffy .= '<a href="#"
         //                   class="td_ajax-next-pagex td-trending-now-nav-right"
         //                   data-wrapper-id="' . $trending_now_unique_id . '"
         //                   data-moving="right"
         //                   data-control-start="' . $navigation . '"><i class="td-icon-menu-right"></i></a>';
         // $buffy .= '</div>';
         $buffy .= '</div>';
         $buffy .= $td_block_layout->close_row();
     }
     $buffy .= $td_block_layout->close_all_tags();
     return $buffy;
 }
开发者ID:weerapat,项目名称:wp-daily,代码行数:38,代码来源:td_block_trending_now.php


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