• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tfuse_qtranslate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: widget

 function widget($args, $instance)
 {
     extract($args);
     $uniq = rand(1, 100);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     $posts = isset($instance['posts']) ? $instance['posts'] : array();
     $b = $instance['b'] = empty($instance['b']) ? '' : $instance['b'];
     $class = $b ? 'widget-boxed' : '';
     $before_widget = '<div class="widget widget_text ' . $class . '">';
     $after_widget = '</div>';
     $before_title = '<h3 class="widget-title">';
     $after_title = '</h3>';
     $tfuse_title = !empty($title) ? $before_title . tfuse_qtranslate($title) . $after_title : '';
     if (!empty($posts)) {
         echo $before_widget;
         echo $tfuse_title;
         echo '
                 <div class="textwidget">
                 <div class="portfolio">
                     <ul class="portfolio-list">';
         foreach ($posts as $key => $post) {
             $image = get_the_post_thumbnail($key, 'gallery-widget-thumb');
             $image_src = wp_get_attachment_url(get_post_thumbnail_id($key, 'post-thumbnails'));
             if (!empty($image)) {
                 echo '<li>
                                     <a data-rel="prettyPhoto[gal_1]" title="' . get_the_title($key) . '" href="' . $image_src . '">' . $image . '</a>
                                 </li>';
             }
         }
         echo ' </ul></div>
                 </div>';
         echo $after_widget;
     }
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:34,代码来源:TFuse_Widget_Gallery.php


示例2: widget

 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? __('Twitter', 'tfuse') : $instance['title'], $instance, $this->id_base);
     $username = apply_filters('widget_items', $instance['username'], $instance, $this->id_base);
     $items = apply_filters('widget_items', $instance['items'], $instance, $this->id_base);
     $return_html = '';
     if (!empty($username)) {
         $tweets = tfuse_get_tweets($username, $items);
         $before_widget = '<div class="widget widget_twitter">';
         $after_widget = '</div>';
         $return_html .= $before_widget;
         if (!empty($title)) {
             $return_html .= '<h3 class="widget-title">' . tfuse_qtranslate($title) . '</h3>';
         }
         $return_html .= '<div class="tweet_list">';
         foreach ($tweets as $tweet) {
             $return_html .= '<div class="tweet_item clearfix">';
             $return_html .= '<div class="tweet_image"><img src="' . $tweet->user->profile_image_url . '" width="58" height="58" alt="" /></div>';
             if (isset($tweet->text)) {
                 $return_html .= '<div class="tweet_text">' . $tweet->text;
             }
             if (!empty($tweet->created_at)) {
                 $return_html .= '<br><span class="tweet_time">' . ucfirst($tweet->created_at) . '</span>';
             }
             if (isset($tweet->text)) {
                 $return_html .= '</div>';
             }
             $return_html .= '</div>';
         }
         $return_html .= '</div>' . $after_widget;
     }
     echo $return_html;
 }
开发者ID:part-time-project,项目名称:italians,代码行数:34,代码来源:TFuse_Widget_Twitter.php


示例3: widget

 function widget($args, $instance)
 {
     extract($args);
     $instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     $before_widget = '<div class="widget widget-container widget_login">';
     $after_widget = '</div>';
     $before_title = '<h3 class="widget-title">';
     $after_title = '</h3>';
     $return_html = '';
     if (!is_user_logged_in()) {
         $return_html .= $before_widget;
         if (!empty($instance['title'])) {
             $return_html .= $before_title . tfuse_qtranslate($instance['title']) . $after_title;
         }
         $return_html .= '<form action="' . home_url() . '/wp-login.php" method="post" name="loginform" id="loginform"  class="loginform">
             <p><label>' . __('Username', 'tfuse') . '</label><br /><input name="log" id="user_login" class="input" value="" size="20" tabindex="10" type="text"></p>
             <p><label>' . __('Password', 'tfuse') . '</label><br /><input name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" type="password"></p>
             <div class="forgetmenot input_styled checklist">
                 <input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" checked />
                 <label for="rememberme">' . __('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 id="submit" type="submit" name="wp-submit" id="wp-submit" class="btn-submit" 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>';
     }
     $return_html .= $after_widget;
     echo $return_html;
 }
开发者ID:part-time-project,项目名称:italians,代码行数:32,代码来源:TFuse_Widget_Login.php


示例4: widget

    function widget($args, $instance)
    {
        extract($args);
        $flickr_id = esc_attr($instance['flickr_id']);
        $number = esc_attr($instance['number']);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        $before_widget = '<div class="widget flickr flickr_widget">';
        $after_widget = '<div class="clear"></div></div>';
        $before_title = '<h3 class="widget-title">';
        $after_title = '</h3>';
        echo $before_widget;
        $title = tfuse_qtranslate($title);
        if (!empty($title)) {
            echo $before_title . $title . $after_title;
        }
        ?>
        <script type="text/javascript" src="http://www.flickr.com/badge_code_v2.gne?count=<?php 
        echo $number;
        ?>
&amp;display=random&amp;size=s&amp;layout=x&amp;source=user&amp;user=<?php 
        echo $flickr_id;
        ?>
"></script>

	   <?php 
        echo $after_widget;
    }
开发者ID:part-time-project,项目名称:italians,代码行数:27,代码来源:TFuse_Widget_Flickr.php


示例5: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Pages', 'tfuse') : $instance['title'], $instance, $this->id_base);
        $sortby = empty($instance['sortby']) ? 'menu_order' : $instance['sortby'];
        $exclude = empty($instance['exclude']) ? '' : $instance['exclude'];
        $b = $instance['b'] = empty($instance['b']) ? '' : $instance['b'];
        $class = $b ? 'widget-boxed' : '';
        $out = wp_list_pages(apply_filters('widget_pages_args', array('title_li' => '', 'echo' => 0, 'sort_column' => $sortby, 'exclude' => $exclude, 'link_before' => '<span>', 'link_after' => '</span>')));
        if (!empty($out)) {
            echo '<div class="widget widget_pages ' . $class . '">';
            $title = tfuse_qtranslate($title);
            if ($title) {
                echo '<h3 class="widget-title">' . $title . '</h3>';
            }
            ?>
		<ul>
			<?php 
            echo $out;
            ?>
		</ul>
		<?php 
            echo '</div>';
        }
    }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:25,代码来源:TFuse_Widget_Pages.php


示例6: widget

 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     $before_widget = '<div class="widget-container widget_contact">';
     $after_widget = '</div>';
     $before_title = '<h3 class="widget-title">';
     $after_title = '</h3>';
     $tfuse_title = !empty($title) ? $before_title . tfuse_qtranslate($title) . $after_title : '';
     echo $before_widget;
     // echo widgets title
     echo $tfuse_title;
     echo '<div class="inner">';
     if ($instance['phone'] != '') {
         echo '<div class="contact-phone">
                 <label>' . __('by phone:', 'tfuse') . '
                 </label>' . tfuse_qtranslate($instance['phone']) . '
             </div>';
     }
     if ($instance['email'] != '') {
         echo '<div class="contact-mail">
                 <label>' . __('by email:', 'tfuse') . '</label>
                 ' . tfuse_qtranslate($instance['email']) . '
             </div>';
     }
     if ($instance['adress'] != '') {
         echo '<div class="contact-address">
                 <label>' . __('by address:', 'tfuse') . '</label>
                 ' . tfuse_qtranslate($instance['adress']) . '
             </div>';
     }
     echo '</div>';
     echo $after_widget;
 }
开发者ID:shimion,项目名称:stlucks,代码行数:34,代码来源:TF_Widget_Contact.php


示例7: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
        $text = apply_filters('widget_text', $instance['text'], $instance);
        $b = $instance['b'] = empty($instance['b']) ? '' : $instance['b'];
        $class = $b ? 'widget-boxed' : '';
        $tf_class = @$instance['nopadding'] ? '' : 'class="widget widget_text ' . $class . '"';
        $before_widget = '<div ' . $tf_class . '>';
        $after_widget = '</div>';
        $before_title = '<h3 class="widget-title">';
        $after_title = '</h3>';
        echo $before_widget;
        $title = tfuse_qtranslate($title);
        if (!empty($title)) {
            ?>
        <?php 
            echo $before_title . $title . $after_title;
        }
        ?>
			<div class="textwidget"><?php 
        echo $instance['filter'] ? wpautop($text) : $text;
        ?>
</div>
		<?php 
        echo $after_widget;
    }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:27,代码来源:TFuse_Widget_Text.php


示例8: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
        $before_widget = '<div class="widget widget-search">';
        $after_widget = '</div>';
        echo $before_widget;
        ?>

        <?php 
        if (!empty($title)) {
            ?>
            <h3 class="widget-title"><?php 
            echo tfuse_qtranslate($title);
            ?>
</h3>
        <?php 
        }
        ?>
        <form method="get" id="searchform" action="<?php 
        echo home_url('/');
        ?>
">
            <input name="s" id="s" type="text" class="inputtext" placeholder="<?php 
        echo tfuse_options('search_box_text');
        ?>
" name="search" value="">
            <button type="submit" class="btn btn-search"><span class="tficon-row"></span></button>
        </form>

    <?php 
        echo $after_widget;
    }
开发者ID:part-time-project,项目名称:italians,代码行数:33,代码来源:TFuse_Widget_Search.php


示例9: tfuse_popular_posts

/**
 * Popular Posts
 * 
 * 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:
 * title:
 * image_width:
 * image_height:
 * image_class:
 */
function tfuse_popular_posts($atts, $content = null)
{
    remove_filter('excerpt_length', 'tfuse_custom_excerpt_length');
    add_filter('excerpt_length', 'tfuse_custom_excerpt_length_short', 99);
    extract(shortcode_atts(array('items' => 5, 'title' => 'Popular Posts', 'image_width' => 70, 'image_height' => 70, 'image_class' => 'thumb'), $atts));
    $return_html = '';
    $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' => true));
    $return_html .= '<div class="widget-container widget_postlist widget_recent_posts">';
    if (!empty($title)) {
        $return_html .= '<h3 class="widget-title">' . tfuse_qtranslate($title) . '</h3>';
    }
    $return_html .= '<ul>';
    foreach ($latest_posts as $post_val) {
        $return_html .= '<li class="clearfix">
            <a href="' . $post_val['post_link'] . '" class="post-title">' . $post_val['post_title'] . '</a>
            <div class="post-meta">
                <span class="post-date">' . $post_val['post_date_post'] . '</span> &nbsp;|&nbsp;  ' . $post_val['post_comnt_numb_link'] . '
            </div>
            <div class="extras"><a href="' . $post_val['post_link'] . '">' . $post_val['post_img'] . '</a> ' . $post_val['post_excerpt'] . '</div>
            <a href="' . $post_val['post_link'] . '" class="link-more">' . __('Read more', 'tfuse') . '</a>
        </li>';
    }
    $return_html .= '</ul>
    </div>';
    return $return_html;
}
开发者ID:part-time-project,项目名称:italians,代码行数:39,代码来源:popular_posts.php


示例10: tfuse_mgtwitter

/**
 * MG_Twitter
 * 
 * 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_mgtwitter($atts, $content = null)
{
    extract(shortcode_atts(array('items' => 5, 'username' => '', 'title' => '', 'post_date' => '', 'follow' => ''), $atts));
    $return_html = '';
    if (!empty($username)) {
        $tweets = tfuse_get_tweets($username, $items);
        $return_html .= '<div class="widget-container widget_twitter">';
        if (!empty($title)) {
            $return_html .= '<h3 class="widget-title">' . tfuse_qtranslate($title) . '</h3>';
        }
        $return_html .= '<div class="tweet_list">';
        foreach ($tweets as $tweet) {
            if (isset($tweet->text)) {
                $return_html .= '<div class="tweet_item clearfix even">
                <div class="tweet_image"><img src="' . $tweet->user->profile_image_url . '" width="36" height="38" alt=""></div>
                    <div class="tweet_text"><div class="inner">' . $tweet->text . '</div></div>
                </div>';
            }
        }
        if (!empty($follow)) {
            $return_html .= '<p><a href="https://twitter.com/' . $username . '" class="link-more">' . $follow . '</a></p>';
        }
        $return_html .= '</div>';
        $return_html .= '</div>';
    }
    return $return_html;
}
开发者ID:part-time-project,项目名称:italians,代码行数:39,代码来源:mgtwitter.php


示例11: tfuse_login

/**
 * 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)
{
    extract(shortcode_atts(array('title' => ''), $atts));
    $return_html = '';
    if (!is_user_logged_in()) {
        $return_html = '<div class="widget-container widget_login">
            <h3 class="widget-title">' . tfuse_qtranslate($title) . '</h3>';
        $return_html .= '<form action="' . home_url() . '/wp-login.php" method="post" name="loginform" id="loginform"  class="loginform">
                <p>
                    <label>' . __('Username', 'tfuse') . '</label><br />
                    <input name="log" id="user_login" class="input" value="" size="20" tabindex="10" type="text">
                </p>
                <p>
                    <label>' . __('Password', 'tfuse') . '</label><br />
                    <input name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" type="password">
                </p>
                <div class="forgetmenot input_styled checklist">
                    <input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" checked /><label for="rememberme">' . __('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="submit" class="btn btn-black" 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;
}
开发者ID:part-time-project,项目名称:italians,代码行数:36,代码来源:login.php


示例12: widget

 function widget($args, $instance)
 {
     extract($args);
     $current_taxonomy = $this->_get_current_taxonomy($instance);
     if (!empty($instance['title'])) {
         $title = $instance['title'];
     } else {
         if ('post_tag' == $current_taxonomy) {
             $title = __('Tags', 'tfuse');
         } else {
             $tax = get_taxonomy($current_taxonomy);
             $title = $tax->labels->name;
         }
     }
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     $before_widget = '<div id="tag_cloud-' . $args['widget_id'] . '" class="widget-container widget_tag_cloud">';
     $after_widget = '</div>';
     $before_title = '<h3 class="widget-title">';
     $after_title = '</h3>';
     echo $before_widget;
     $title = tfuse_qtranslate($title);
     if ($title) {
         echo $before_title . $title . $after_title;
     }
     echo '<div class="tagcloud">';
     wp_tag_cloud(apply_filters('widget_tag_cloud_args', array('taxonomy' => $current_taxonomy)));
     echo "</div>\n";
     echo $after_widget;
 }
开发者ID:shimion,项目名称:stlucks,代码行数:29,代码来源:TF_Widget_Tag_Cloud.php


示例13: tfuse_newsletter

/**
 * Newsletter
 *
 * 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: e.g. Newsletter signup
 * text: e.g. Thank you for your subscription.
 * action: URL where to send the form data.
 * rss_feed:
 */
function tfuse_newsletter($atts, $content = null)
{
    extract(shortcode_atts(array('title' => '', 'text' => '', 'before_title' => ''), $atts));
    if (!empty($title)) {
        $title = '<h1 class="widget-title">' . $title . '</h1>';
    }
    if (!empty($before_title)) {
        $before_title = '<h3 class="widget-title-before">' . $before_title . '</h3>';
    }
    $out = '<div class="widget widget_newsletter newsletterBox newsletter_subscription_box">
        ' . tfuse_qtranslate($before_title) . '
        ' . tfuse_qtranslate($title) . '
        <div class="widget-content"><p>' . $text . '</p></div>
        <form action="#" method="post" class="newsletter_subscription_form">
            <input type="text" value="" name="newsletter" id="newsletter" class="newsletter_subscription_email inputField" placeholder="' . __('Enter Your Email', 'tfuse') . '" />
            <button type="submit" class="btn btn-newsletter newsletter_subscription_submit" value="Send" title="Subscribe"><span class="tficon-row"></span></button>
            <div class="newsletter_subscription_ajax">' . __('Loading...', 'tfuse') . '</div>
        </form>
        <div class="newsletter_subscription_messages before-text">
            <div class="newsletter_subscription_message_success">
                ' . __('Thank you for your subscription.', 'tfuse') . '
            </div>
            <div class="newsletter_subscription_message_wrong_email">
                ' . __('Your email format is wrong!', 'tfuse') . '
            </div>
            <div class="newsletter_subscription_message_failed">
                ' . __('Sad, but we couldn\'t add you to our mailing list ATM.', 'tfuse') . '
            </div>
        </div>
    </div>';
    return $out;
}
开发者ID:part-time-project,项目名称:italians,代码行数:44,代码来源:newsletter.php


示例14: widget

 function widget($args, $instance)
 {
     extract($args);
     $current_taxonomy = $this->_get_current_taxonomy($instance);
     if (!empty($instance['title'])) {
         $title = $instance['title'];
     } else {
         if ('post_tag' == $current_taxonomy) {
             $title = __('Tags', 'tfuse');
         } else {
             $tax = get_taxonomy($current_taxonomy);
             $title = $tax->labels->name;
         }
     }
     $title = apply_filters('widget_title', $title, $instance, $this->id_base);
     $b = $instance['b'] = empty($instance['b']) ? '' : $instance['b'];
     $class = $b ? 'widget-boxed' : '';
     $before_widget = '<div class="widget widget_tag_cloud ' . $class . '">';
     $after_widget = '</div>';
     $before_title = '<h3 class="widget-title">';
     $after_title = '</h3>';
     echo $before_widget;
     $title = tfuse_qtranslate($title);
     if ($title) {
     }
     ?>
 <?php 
     echo $before_title . $title . $after_title;
     echo '<div class="tagcloud clearfix">';
     if ($instance['taxonomy'] != 'category') {
         $posttags = get_tags();
         if ($posttags) {
             $count = 0;
             foreach ($posttags as $tag) {
                 $count++;
                 if ($count == count($posttags)) {
                     echo '<a href="' . get_tag_link($tag->term_id) . '">' . $tag->name . '</a>';
                 } else {
                     echo '<a href="' . get_tag_link($tag->term_id) . '">' . $tag->name . ' </a>';
                 }
             }
         }
     } else {
         $posttags = get_categories();
         if ($posttags) {
             $count = 0;
             foreach ($posttags as $tag) {
                 $count++;
                 if ($count == count($posttags)) {
                     echo '<a href="' . get_category_link($tag->term_id) . '">' . $tag->name . '</a>';
                 } else {
                     echo '<a href="' . get_category_link($tag->term_id) . '">' . $tag->name . ' </a>';
                 }
             }
         }
     }
     echo "</div>\n";
     echo $after_widget;
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:59,代码来源:TFuse_Widget_Tag_Cloud.php


示例15: tfuse_flickr

/**
 * 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 . '&amp;display=random&amp;size=s&amp;layout=x&amp;source=user&amp;user=' . $flickr_id . '"></script><div class="clear"/></div></div>';
}
开发者ID:part-time-project,项目名称:italians,代码行数:19,代码来源:flickr.php


示例16: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
        $number = esc_attr($instance['number']);
        if ($number > 0) {
        } else {
            $number = 6;
        }
        $before_widget = '<div class="widget widget-freshpost">';
        $after_widget = '</div>';
        echo $before_widget;
        ?>

        <?php 
        if (!empty($title)) {
            ?>
            <h3 class="widget-title"><?php 
            echo tfuse_qtranslate($title);
            ?>
</h3>
        <?php 
        }
        ?>

        <ul class="side-postlist">
            <?php 
        $recent_posts = tfuse_shortcode_posts(array('sort' => 'recent', 'items' => $number, 'image_post' => false, 'date_post' => false));
        foreach ($recent_posts as $post_val) {
            ?>
                <li><a href="<?php 
            echo $post_val['post_link'];
            ?>
"><span><?php 
            echo $post_val['post_title'];
            ?>
</span></a></li>
            <?php 
        }
        ?>
        </ul>
        <?php 
        if (isset($instance['enable_rss']) && $instance['enable_rss']) {
            ?>
            <a href="<?php 
            echo tfuse_options('feedburner_url', '#');
            ?>
" class="btn btn-orange btn-freshpost"><span><?php 
            _e('subscribe to rss feed', 'tfuse');
            ?>
</span></a>
        <?php 
        }
        ?>

    <?php 
        echo $after_widget;
    }
开发者ID:part-time-project,项目名称:italians,代码行数:58,代码来源:TFuse_Widget_Recent_Posts.php


示例17: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', 'tfuse') : $instance['title'], $instance, $this->id_base);
        $number = esc_attr($instance['number']);
        $b = $instance['b'] = empty($instance['b']) ? '' : $instance['b'];
        $class = $b ? 'widget-boxed' : '';
        if ($number > 0) {
        } else {
            $number = 8;
        }
        ?>

<div class="widget widget_recent_entries <?php 
        echo $class;
        ?>
">
        <h3 class="widget-title"><?php 
        echo tfuse_qtranslate($title);
        ?>
</h3>
        <ul class="side-postlist">
            <?php 
        $pop_posts = tfuse_shortcode_posts(array('sort' => 'recent', 'items' => $number, 'image_post' => true, 'image_width' => 62, 'image_height' => 62, 'image_class' => 'post-thumbnail'));
        foreach ($pop_posts as $post_val) {
            ?>
                <li>
                    <a href="<?php 
            echo $post_val['post_link'];
            ?>
"><?php 
            echo $post_val['post_img'];
            ?>
</a>
                    <a href="<?php 
            echo $post_val['post_link'];
            ?>
" class="post-title"><?php 
            echo $post_val['post_title'];
            ?>
</a>
                    <span class="comments-link"><a href="<?php 
            echo $post_val['post_link'];
            ?>
#comments"><?php 
            echo tfuse_get_comments(false, $post_val['post_id']);
            ?>
</a></span>
                </li>

            <?php 
        }
        ?>
        </ul>
    </div>

    <?php 
    }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:58,代码来源:TFuse_Widget_Recent_Posts.php


示例18: widget

    function widget($args, $instance)
    {
        global $post;
        extract($args);
        $title = esc_attr($instance['title']);
        $pages = isset($instance['pages']) ? $instance['pages'] : '';
        $before_widget = '<div class="widget-container widget_pages">';
        $after_widget = '</div>';
        $before_title = '<h3 class="widget-title">';
        $after_title = '</h3>';
        echo $before_widget;
        $title = tfuse_qtranslate($title);
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>


            	<?php 
        if (is_array($pages)) {
            ?>


                        <ul>

							<?php 
            $k = 0;
            foreach ($pages as $key => $val) {
                $k++;
                if ($k == 1) {
                    $first = ' first ';
                } else {
                    $first = '';
                }
                if ($k == count($pages)) {
                    $last = ' last ';
                } else {
                    $last = '';
                }
                if ($key == get_query_var('page_id')) {
                    $active = ' current-menu-item ';
                } else {
                    $active = '';
                }
                $page = get_post($key);
                echo '<li class="' . $first . $last . $active . '"><a href="' . get_page_link($key) . '"><span>' . $page->post_title . '</span></a></li>';
                $page = get_post($key);
            }
            ?>


                        </ul>
                <?php 
        }
        echo $after_widget;
    }
开发者ID:shimion,项目名称:stlucks,代码行数:56,代码来源:TFuse_Widget_Selected_Pages.php


示例19: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', empty($instance['title']) ? __('Meta', 'tfuse') : $instance['title'], $instance, $this->id_base);
        $before_widget = ' <div id="meta-' . $args['widget_id'] . '" class="widget-container widget_meta">';
        $after_widget = '</div>';
        $before_title = '<h3 class="widget-title">';
        $after_title = '</h3>';
        echo $before_widget;
        $title = tfuse_qtranslate($title);
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>

			<ul>
			<?php 
        wp_register();
        ?>

			<li><?php 
        wp_loginout();
        ?>
</li>
			<li><a href="<?php 
        bloginfo('rss2_url');
        ?>
" title="<?php 
        echo esc_attr(__('Syndicate this site using RSS 2.0', 'tfuse'));
        ?>
"><?php 
        _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>');
        ?>
</a></li>
			<li><a href="<?php 
        bloginfo('comments_rss2_url');
        ?>
" title="<?php 
        echo esc_attr(__('The latest comments to all posts in RSS', 'tfuse'));
        ?>
"><?php 
        _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>');
        ?>
</a></li>
			<li><a href="http://wordpress.org/" title="<?php 
        echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'tfuse'));
        ?>
">WordPress.org</a></li>
			<?php 
        wp_meta();
        ?>

			</ul>
<?php 
        echo $after_widget;
    }
开发者ID:shimion,项目名称:stlucks,代码行数:56,代码来源:TF_Widget_Meta.php


示例20: tfuse_minigallery

/**
 * Minigallery
 *
 * To override this shortcode in a child theme, copy this file to your child theme's
 * theme_config/extensions/shortcodes/shortcodes/ folder.
 *
 * Optional arguments:
 * id: post/page id
 * order: ASC, DESC
 * orderby:
 * include:
 * exclude:
 * pretty: true/false use or not prettyPhoto
 * icon_plus:
 * class: css class e.g. boxed
 * carousel: jCarousel Configuration. http://sorgalla.com/projects/jcarousel/
 */
function tfuse_minigallery($attr, $content = null)
{
    extract(shortcode_atts(array('title' => '', 'id' => ''), $attr));
    global $post;
    extract(shortcode_atts(array('order' => 'ASC', 'orderby' => 'menu_order ID', 'id' => isset($post->ID) ? $post->ID : $attr['id'], 'include' => '', 'exclude' => '', 'pretty' => true, 'carousel' => 'easing: "easeInOutQuint",animation: 600', 'class' => 'boxed', 'prettyphoto' => ''), $attr));
    $attachments = get_children(array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby));
    if (empty($attachments)) {
        return '';
    }
    $uniq = rand(1, 200);
    $out = '<h2>' . tfuse_qtranslate($title) . '</h2>
    <div class="minigallery_carousel">
        <div class="carousel_content">
            <ul id="minigallery' . $uniq . '">';
    foreach ($attachments as $id => $attachment) {
        $link = wp_get_attachment_image_src($id, 'full', true);
        $image_link_attach = $link[0];
        $imgsrc = wp_get_attachment_image_src($id, array(92, 92), false);
        $image_src = $imgsrc[0];
        $image = new TF_GET_IMAGE();
        $img = $image->width(92)->height(92)->properties(array('alt' => $attachment->post_title))->src($image_src)->get_img();
        if ($prettyphoto == 'true') {
            $out .= '<li><a href="' . $image_link_attach . '" data-rel="prettyPhoto[mg' . $uniq . ']" class="zoom" rel="prettyPhoto[mg' . $uniq . ']">' . $img . '</a></li>';
        } else {
            $out .= '<li>' . $img . '</li>';
        }
    }
    $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;
}
开发者ID:part-time-project,项目名称:italians,代码行数:70,代码来源:minigallery.php



注:本文中的tfuse_qtranslate函数示例整理自Github/MSDocs等源码及文档


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tfuse_shortcode_content函数代码示例发布时间:2022-05-23
下一篇:
PHP tfuse_page_options函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap