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

PHP tfuse_options函数代码示例

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

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



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

示例1: 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


示例2: admin_add_css

 public function admin_add_css()
 {
     global $wp_version;
     // For cases like '3.5-beta2' the version_compare() will not work properly, extract only '3.5'
     $version = explode('-', $wp_version);
     $_wp_version = array_shift($version);
     wp_enqueue_style('thickbox');
     wp_register_style('JQueryUiStyle', TFUSE_ADMIN_CSS . '/jquery-ui-1.8.14.custom.css', false, '1.0.0');
     wp_enqueue_style('JQueryUiStyle');
     $this->include->register_type('framework_css', TFUSE . '/static/css');
     $this->include->css('style', 'framework_css', 'tf_head', '1.5');
     if (version_compare($_wp_version, "3.8", ">=")) {
         // wp3.8 css fixes
         $this->include->css('style-wp3.8', 'framework_css', 'tf_head', '1.0');
         $this->include->css('screen-wp3.8', 'framework_css', 'tf_head', '1.0');
     } elseif (version_compare($_wp_version, "3.5", ">=")) {
         // wp3.5 css fixes
         $this->include->css('style-wp3.5', 'framework_css', 'tf_head', '1.1');
     }
     if (tfuse_options('activate_tfuse_style', true) && version_compare($_wp_version, '3.8', '<')) {
         $this->include->css('tfuse_style', 'framework_css', 'tf_head', '1.3');
         if (version_compare($_wp_version, "3.5", ">=")) {
             // wp3.5 css fixes
             $this->include->css('tfuse_style-wp3.5', 'framework_css', 'tf_head', '1.1');
         }
     }
     $this->include->css('prettyPhoto', 'framework_css', 'tf_head');
     $this->include->css('colorpicker', 'framework_css', 'tf_head');
     $this->include->css('datepicker', 'framework_css', 'tf_head');
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:30,代码来源:INTERFACE.php


示例3: tfuse_latest_news

function tfuse_latest_news($atts, $content = null)
{
    extract(shortcode_atts(array('posts' => '', 'title' => '', 'b_title' => '', 'b_link' => ''), $atts));
    $posts = explode(',', $posts);
    $return_html = $img = '';
    if (!empty($posts)) {
        $return_html .= '<section class="postlist postlist-cols-1 shortcode_news">
                            <h1>' . $title . '</h1>';
        foreach ($posts as $post) {
            $image = wp_get_attachment_url(get_post_thumbnail_id($post, 'post-thumbnails'));
            $img_pos = tfuse_page_options('single_img_position', '', $post);
            $post_date = get_the_date($post);
            $time = strtotime($post_date);
            $position = tfuse_page_options('img_pos', '', $post);
            $current_post = get_post($post);
            $user_data = get_user_by('id', $current_post->post_author);
            $return_html .= '<article class="post">
                                <div class="inner">';
            $press_source = tfuse_page_options('press_source', '', $post);
            $press_author = tfuse_page_options('press_author', '', $post);
            $is_outer_link = !empty($press_source) ? true : false;
            $target_window = !empty($press_source) ? "_blank" : "_self";
            $author_url = !empty($press_source) ? $press_source : get_author_posts_url($current_post->post_author, $user_data->data->user_nicename);
            $press_source = !empty($press_source) ? $press_source : get_permalink($post);
            $press_author = !empty($press_author) ? $press_author : $user_data->data->display_name;
            if (!empty($image)) {
                $return_html .= '<a class="post-thumbnail" href="' . $press_source . '"><img src="' . $image . '" alt="' . get_the_title($post) . '" /></a>';
            }
            $return_html .= '<div class="entry-aside">
                                        <header class="entry-header">
                                            <h2 class="entry-title"><a target="' . $target_window . '" href="' . $press_source . '">' . get_the_title($post) . '</a></h2>
                                            <div class="entry-meta">
                                                ' . __('By ', 'tfuse') . '<span class="author"><a href="' . $author_url . '">' . $press_author . '</a></span>
                                                ' . __(' on ', 'tfuse') . '<time class="entry-date" datetime="' . date('Y-m-d', $time) . 'T' . date('g:i:s', $time) . '">' . get_the_time(get_option('date_format'), $post) . '</time>
                                            </div>
                                        </header>
                                        <div class="entry-content">';
            if (tfuse_options('post_content') == 'content') {
                $return_html .= '<p>' . $current_post->post_content . '</p>';
            } else {
                $return_html .= !empty($current_post->post_excerpt) ? '<p>' . $current_post->post_excerpt . '</p>' : '<p>' . strip_tags(tfuse_shorten_string(apply_filters('the_content', $current_post->post_content), 150)) . '</p>';
            }
            $tmp_comments = $is_outer_link ? '' : '<span class="comments-link"><a href="' . $press_source . '#comments"><i class="tficon-comment"></i> ' . get_comments_number($post) . '</a></span>';
            $return_html .= '</div>
                                        <footer class="entry-meta">
                                            <a target="' . $target_window . '" class="btn btn-default btn-xs" href="' . $press_source . '">' . __('Read more', 'tfuse') . '</a>
											' . $tmp_comments . '
                                        </footer>
                                    </div>
                                </div>
                            </article>';
        }
        $return_html .= '<div class="load_button">
                                    <a href="' . $b_link . '" class="btn btn-main">' . $b_title . '</a>
                            </div>';
        $return_html .= '</section>';
    }
    return $return_html;
}
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:59,代码来源:latest_news.php


示例4: 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


示例5: tf_sidebars_init

function tf_sidebars_init()
{
    extract(tf_sidebar_cfg());
    register_sidebar(array('name' => __('General Sidebar', 'tfuse'), 'id' => 'sidebar-1', 'before_widget' => $beforeWidget, 'after_widget' => $afterWidget, 'before_title' => $beforeTitle, 'after_title' => $afterTitle, 'description' => ''));
    if (!tfuse_options('enable_footer_shortcodes')) {
        register_sidebar(array('name' => __('Footer 1', 'tfuse'), 'id' => 'footer-1', 'before_widget' => $beforeWidget, 'after_widget' => $afterWidget, 'before_title' => $beforeTitle, 'after_title' => $afterTitle));
        register_sidebar(array('name' => __('Footer 2', 'tfuse'), 'id' => 'footer-2', 'before_widget' => $beforeWidget, 'after_widget' => $afterWidget, 'before_title' => $beforeTitle, 'after_title' => $afterTitle));
        register_sidebar(array('name' => __('Footer 3', 'tfuse'), 'id' => 'footer-3', 'before_widget' => $beforeWidget, 'after_widget' => $afterWidget, 'before_title' => $beforeTitle, 'after_title' => $afterTitle));
        register_sidebar(array('name' => __('Footer 4', 'tfuse'), 'id' => 'footer-4', 'before_widget' => $beforeWidget, 'after_widget' => $afterWidget, 'before_title' => $beforeTitle, 'after_title' => $afterTitle));
        register_sidebar(array('name' => __('Footer 5', 'tfuse'), 'id' => 'footer-5', 'before_widget' => $beforeWidget, 'after_widget' => $afterWidget, 'before_title' => $beforeTitle, 'after_title' => $afterTitle));
    }
}
开发者ID:shimion,项目名称:stlucks,代码行数:12,代码来源:sidebars_init.php


示例6: tfuse_search

/**
 * Search form
 * 
 * To override this shortcode in a child theme, copy this file to your child theme's
 * theme_config/extensions/shortcodes/shortcodes/ folder.
 */
function tfuse_search($atts)
{
    extract(shortcode_atts(array('title' => ''), $atts));
    if (empty($title)) {
        $title = __('SEARCH WIDGET', 'tfuse');
    }
    $output = '';
    $output .= '<div class="widget widget-search">
        <h3 class="widget-title">' . tfuse_qtranslate($title) . '</h3>
        <form method="get" id="searchform" action="' . home_url('/') . '">
            <input name="s" id="s" type="text" class="inputtext" placeholder="' . tfuse_options('search_box_text') . '" name="search" value="">
            <button id="searchsubmit" type="submit" class="btn btn-search"><span class="tficon-row"></span></button>
        </form>
    </div>';
    return $output;
}
开发者ID:part-time-project,项目名称:italians,代码行数:22,代码来源:search.php


示例7: tfuse_portfolio

function tfuse_portfolio($atts)
{
    extract(shortcode_atts(array('category' => '', 'columns' => 'three-column'), $atts));
    wp_register_script('isotope', tfuse_get_file_uri('/js/isotope.pkgd.min.js'), array('jquery'), '1.0', true);
    wp_enqueue_script('isotope');
    $output = '';
    if ($category != 0) {
        $tax = 'group';
        $term = get_term_by('id', $category, $tax);
        $term_children = get_term_children($category, $tax);
        $args = array('posts_per_page' => -1, 'post_type' => 'portfolio', 'tax_query' => array(array('taxonomy' => $tax, 'field' => 'id', 'terms' => $category)));
        $query = new WP_Query($args);
        $posts = $query->get_posts();
        if (!empty($term)) {
            $output .= '<div class="shortcode-portfolio">';
            if (tfuse_options('enable_portfolio_filter', true)) {
                $output .= '<div class="wrapp-categories-gallery">
                    <ul id="categories" class="gallery-categories">';
                if (!empty($term_children)) {
                    $output .= '<li class="categories-item active" data-category="' . $term->slug . '"><div class="check-category"><span></span></div>' . $term->name . '</li>';
                    foreach ($term_children as $id) {
                        $term_child = get_term_by('id', $id, $tax);
                        $output .= '<li class="categories-item" data-category="' . $term_child->slug . '"><div class="check-category"><span></span></div>' . $term_child->name . '</li>';
                    }
                }
                $output .= '</ul>
                    <a class="prev" id="categories-prev" href="#"><i class="tficon-shevron-left"></i></a>
                    <a class="next" id="categories-next" href="#"><i class="tficon-shevron-right"></i></a>
                </div>';
            }
            $output .= '<section class="gallery">' . '' . '
                <ul id="gallery-list" class="gallery-list ' . $columns . '">';
            if (!empty($posts)) {
                foreach ($posts as $post) {
                    $output .= '<li class="gallery-item" data-category="' . tfuse_get_portfolio_categories_list($post->ID) . '">
                                <div class="gallery-img">' . tfuse_get_portfolio_thumbnail($post->ID, $columns) . '</div>
                                ' . tfuse_get_portfolio_gallery($post->ID) . '
                            </li>';
                }
            }
            $output .= '</ul>';
            $output .= '</section></div>';
        }
    }
    return $output;
}
开发者ID:part-time-project,项目名称:italians,代码行数:46,代码来源:portfolio.php


示例8: 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 subscribtion.
 * action: URL where to send the form data.
 * rss_feed:
 */
function tfuse_newsletter($atts, $content = null)
{
    extract(shortcode_atts(array('title' => '', 'text' => '', 'rss_feed' => ''), $atts));
    if (empty($title)) {
        $title = __('Newsletter', 'tfuse');
    }
    if (empty($text)) {
        $text = __('', 'tfuse');
    }
    $out = '
    <div class="widget widget_newsletter newsletter_subscription_box">
        
        <h1 class="widget-title">' . $title . '</h1> 
                <div class="newsletter_subscription_messages before-text">
                    <div class="newsletter_subscription_message_initial">
                        ' . __('', 'tfuse') . ' 
                    </div>
                    <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>

                <form action="#" method="post" class="newsletter_subscription_form">
                    <div class="newsletter_text">' . $text . '</div>
                        <input type="text" value="" name="newsletter" id="newsletter" class="newsletter_subscription_email inputtext" placeholder="' . __('Your email adress here...', 'tfuse') . '"/>
                        <button type="submit" class="btn btn-newsletter newsletter_subscription_submit"><span>' . __('Subscribe', 'tfuse') . '</span></button>
                        <div class="newsletter_subscription_ajax">' . __('Loading...', 'tfuse') . '</div>
                        <div class="newsletter_text">';
    if ($rss_feed != 'false') {
        $out .= '<a class="newssetter_subscribe" href="' . tfuse_options('feedburner_url', get_bloginfo_rss('rss2_url')) . '">' . __('I also want to subscribe to the RSS Feed', 'tfuse') . '</a>';
    }
    $out .= '
                        </div>
                </form>
        </div>';
    return $out;
}
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:55,代码来源:newsletter.php


示例9: tfuse_shortcode_latest_post

function tfuse_shortcode_latest_post($atts, $content = null)
{
    $out = '';
    $recent_post = wp_get_recent_posts(array('numberposts' => 1));
    if (!empty($recent_post)) {
        foreach ($recent_post as $post) {
            $image = wp_get_attachment_url(get_post_thumbnail_id($post['ID'], 'post-thumbnails'));
            $get_image = new TF_GET_IMAGE();
            $img = $get_image->properties(array('class' => '', 'alt' => get_the_title($post['ID'])))->width(210)->height(82)->src($image)->resize(true)->get_img();
            $current_post = get_post($post['ID']);
            $user_data = get_user_by('id', $current_post->post_author);
            $out .= '<article class="post">
                    <h2 class="entry-title"><a href="' . get_permalink($post['ID']) . '">' . get_the_title($post['ID']) . '</a></h2>
                    <div class="entry-meta">
                        <time class="entry-date" datetime="">' . get_the_time(get_option('date_format'), $post['ID']) . '</time>
                        <span class="author"> ' . __('by', 'tfuse') . ' <a href="' . get_author_posts_url($current_post->post_author, $user_data->data->user_nicename) . '">' . $user_data->data->user_nicename . '</a></span>
                    </div>
                    <span class="post-thumbnail">';
            if (!empty($image)) {
                $out .= $img;
            }
            $out .= '</span>
                    <div class="entry-content"><p>';
            if (tfuse_options('post_content') == 'content') {
                $out .= $current_post->post_content;
            } else {
                $out .= !empty($current_post->post_excerpt) ? $current_post->post_excerpt : strip_tags(tfuse_shorten_string(apply_filters('the_content', $current_post->post_content), 150));
            }
            $out .= '</p></div>
                    <footer class="entry-meta">
                        <a href="' . get_permalink($post['ID']) . '" class="btn btn-yellow"><span>' . __('find out more', 'tfuse') . '</span></a>
                    </footer>
                </article>';
        }
    }
    return $out;
}
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:37,代码来源:latest_post.php


示例10: 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' => '', 'rss_feed' => ''), $atts));
    if (empty($title)) {
        $title = __('Newsletter', 'tfuse');
    }
    if (empty($text)) {
        $text = __('Sign up for our weekly newsletter to receive updates, news, and promos:', 'tfuse');
    }
    $out = '
    <div class="newsletter_subscription_box newsletterBox">
    <div class="inner">
        <div class="ribbon"></div>
        <h2>' . $title . '</h2>

        <div class="newsletter_subscription_messages before-text">
            <div class="newsletter_subscription_message_initial">' . $text . '</div>
            <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>

        <form action="#" method="post" class="newsletter_subscription_form">
            <input type="text" value="" name="newsletter" class="newsletter_subscription_email inputField" />
            <input type="submit" value="" class="btn-submit newsletter_subscription_submit" />
            <div class="clear"></div>
        </form>

        <div class="newsletter_subscription_ajax">' . __('Loading', 'tfuse') . '...</div>';
    if ($rss_feed == 'true') {
        $out .= '<div class="newsletter_text"><a href="' . tfuse_options('feedburner_url', get_bloginfo_rss('rss2_url')) . '" class="link-news-rss">' . __('You can also', 'tfuse') . ' <span>' . __('Subscribe to our RSS', 'tfuse') . '</span> ' . __('feed', 'tfuse') . '</a></div>';
    }
    $out .= '</div>
    </div>';
    return $out;
}
开发者ID:shimion,项目名称:stlucks,代码行数:48,代码来源:newsletter.php


示例11: tfuse_set_blog_page

 function tfuse_set_blog_page()
 {
     global $wp_query, $is_tf_blog_page;
     $id_post = 0;
     $blog_page_id = tfuse_options('blog_page', '');
     if (isset($wp_query->queried_object) && isset($wp_query->queried_object->ID)) {
         $id_post = $wp_query->queried_object->ID;
     } elseif (isset($wp_query->query['page_id'])) {
         $id_post = $wp_query->query['page_id'];
     }
     if (function_exists('icl_object_id')) {
         $id_post = icl_object_id($id_post, 'page', false, 'en');
     }
     if ($blog_page_id != 0 && $id_post == $blog_page_id) {
         $is_tf_blog_page = true;
     }
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:17,代码来源:THEME_FUNCTIONS.php


示例12: tfuse_load_google_fonts

 public function tfuse_load_google_fonts()
 {
     global $google_fonts;
     $fonts = '';
     $output = '';
     $tfuse_options = tfuse_options();
     // Go through the options
     if (!empty($tfuse_options['framework'])) {
         foreach ($tfuse_options['framework'] as $option) {
             // Check if option has "face" in array
             if (is_array($option) && isset($option['face'])) {
                 // Go through the google font array
                 foreach ($google_fonts as $font) {
                     // Check if the google font name exists in the current "face" option
                     if ($option['face'] == $font['name'] and !strstr($fonts, $font['name'])) {
                         // Add google font to output
                         $fonts .= $font['name'] . $font['variant'] . "|";
                     }
                     // End If Statement
                 }
                 // End Foreach Loop
             }
             // End If Statement
         }
         // End Foreach Loop
         // Output google font css in header
         if ($fonts) {
             $fonts = str_replace(" ", "+", $fonts);
             $output .= "\n<!-- Google Webfonts -->\n";
             $output .= '<link href="//fonts.googleapis.com/css?family=' . $fonts . '" rel="stylesheet" type="text/css" />' . "\n";
             $output = str_replace('|"', '"', $output);
             echo $output;
         }
     }
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:35,代码来源:actions_and_filters.php


示例13: resize

 function resize($resize = NULL, $quality = 100)
 {
     // Checks if function has been called manually
     if (isset($this->resize)) {
         return $this;
     }
     if ($this->width && !$this->removeSizeParams) {
         $this->property_string .= ' width="' . $this->width . '"';
     }
     if ($this->height && !$this->removeSizeParams) {
         $this->property_string .= ' height="' . $this->height . '"';
     }
     // in framework TRUE inseamna ca nu face resize
     // daca se apeleaza direct functia resize() ... atunci TRUE face resize
     if (!isset($resize)) {
         $this->resize = tfuse_options('disable_resize');
     } else {
         $this->resize = !$resize;
     }
     if (!$this->resize) {
         if (strpos($this->src, home_url()) === false) {
             $remote_uploaded_by_tfuse = get_option('tfuse_remote_images', array());
             if (!array_key_exists($this->src, $remote_uploaded_by_tfuse)) {
                 $attachment_id = tfuse_sideload_image_attachment($this->src);
                 if (is_numeric($attachment_id)) {
                     $remote_uploaded_by_tfuse[$this->src] = wp_get_attachment_url($attachment_id);
                     update_option('tfuse_remote_images', $remote_uploaded_by_tfuse);
                     $this->src = $remote_uploaded_by_tfuse[$this->src];
                     unset($remote_uploaded_by_tfuse);
                 }
             } else {
                 $this->src = $remote_uploaded_by_tfuse[$this->src];
                 unset($remote_uploaded_by_tfuse);
             }
         }
         $resized_img = tfuse_image_resize($this->src, $this->width, $this->height);
         if (!is_wp_error($resized_img)) {
             $this->src = $resized_img['url'];
         }
     }
     return $this;
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:42,代码来源:GET_IMAGE.php


示例14: tfuse_projects

function tfuse_projects($atts, $content = null)
{
    extract(shortcode_atts(array('post' => ''), $atts));
    $output = '';
    $uniq = rand(1, 100);
    $post = explode(',', $post);
    $query = new WP_Query(array('posts_per_page' => -1, 'post_type' => 'project', 'orderby' => 'post__in', 'post__in' => $post));
    $posts = $query->get_posts();
    if (!empty($posts)) {
        $output .= '<div class="recent-slider">
			<ul id="recent-slider' . $uniq . '">';
        foreach ($posts as $post) {
            $image = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails'));
            if (!empty($image)) {
                $image = TF_GET_IMAGE::get_src_link($image, 285, 326);
            }
            $current_post = get_post($post->ID);
            $output .= '<li data-recentslider1="1">
                            <div class="recent-slider-text">
                                    <h3 class="title"><a href="' . get_permalink($post->ID) . '">' . $post->post_title . '</a></h3>
                                    <div class="line-title-sldier"></div>
                                    <div class="recent-slider-description">';
            if (tfuse_options('post_content') == 'content') {
                $output .= $current_post->post_content;
            } else {
                $output .= !empty($current_post->post_excerpt) ? $current_post->post_excerpt : strip_tags(tfuse_shorten_string(apply_filters('the_content', $current_post->post_content), 150));
            }
            $output .= '</div>
                            </div>
                            <div class="recent-slider-image">
                                <a href="' . get_permalink($post->ID) . '" class="recent-slider-thumbnail"><span>' . __('More', 'tfuse') . '</span></a>
                                <img src="' . $image . '" >
                            </div>
                        </li>';
        }
        $output .= '</ul>
                    <div id="recent-slider' . $uniq . '-controls" class="recent-slider-controls"></div>

                    <a id="recent-slider' . $uniq . '-prev" class="prev" href="#">prev</a>
                    <a id="recent-slider' . $uniq . '-next" class="next" href="#">next</a>

                </div>';
        $output .= '
                 <script>
                   jQuery(document).ready(function(){
                        
                        function recentsliderInit() {
                                jQuery("#recent-slider' . $uniq . '").carouFredSel({
                                    swipe : {
                                            onTouch: true
                                    },
                                    next : "#recent-slider' . $uniq . '-next",
                                    prev : "#recent-slider' . $uniq . '-prev",
                                    pagination : "#recent-slider' . $uniq . '-controls",
                                    infinite: false,
                                    items: 1,
                                    auto: {
                                            play: false,
                                            timeoutDuration: 0
                                    },
                                    scroll: {
                                            items : 1,
                                            fx: "crossfade",
                                            easing: "linear",
                                            pauseOnHover: true,
                                            duration: 300
                                    }
                                    });
				}

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


示例15: the_post_thumbnail

        ?>
                            <a href="<?php 
        echo $permalink;
        ?>
" class="post-thumbnail"><?php 
        the_post_thumbnail('');
        ?>
</a>
                        <?php 
    }
}
?>
            </header>
            <div class="entry-content">
                <?php 
if (tfuse_options('post_content') == 'content') {
    the_content('');
} else {
    the_excerpt();
}
?>
            </div>
            <footer class="entry-meta">
                <a href="<?php 
echo $permalink;
?>
" class="btn btn-black-transparent btn-xs"><span><?php 
_e('find out more', 'tfuse');
?>
</span></a>
                <a href="<?php 
开发者ID:part-time-project,项目名称:italians,代码行数:31,代码来源:listing-blog.php


示例16: array

<?php

/* ----------------------------------------------------------------------------------- */
/* Initializes all the theme settings option fields for pages area. */
/* ----------------------------------------------------------------------------------- */
$options = array(array('name' => __('Single Page', 'tfuse'), 'id' => TF_THEME_PREFIX . '_side_media', 'type' => 'metabox', 'context' => 'side', 'priority' => 'low'), array('name' => __('Disable Comments', 'tfuse'), 'desc' => '', 'id' => TF_THEME_PREFIX . '_disable_comments', 'value' => tfuse_options('disable_page_comments', 'true'), 'type' => 'checkbox', 'divider' => true), array('name' => __('Page Title', 'tfuse'), 'desc' => __('Select your preferred Page Title.', 'tfuse'), 'id' => TF_THEME_PREFIX . '_page_title', 'value' => 'default_title', 'options' => array('hide_title' => __('Hide Page Title', 'tfuse'), 'default_title' => __('Default Title', 'tfuse'), 'custom_title' => __('Custom Title', 'tfuse')), 'type' => 'select'), array('name' => __('Custom Title', 'tfuse'), 'desc' => __('Enter your custom title for this page.', 'tfuse'), 'id' => TF_THEME_PREFIX . '_custom_title', 'value' => '', 'type' => 'text'), array('name' => __('Header', 'tfuse'), 'id' => TF_THEME_PREFIX . '_header_option', 'type' => 'metabox', 'context' => 'normal'), array('name' => __('Element of Hedear', 'tfuse'), 'desc' => __('Select type of element on the header.', 'tfuse'), 'id' => TF_THEME_PREFIX . '_header_element', 'value' => 'image', 'options' => array('none' => __('Without Header Element', 'tfuse'), 'slider' => __('Slider on Header', 'tfuse'), 'image' => __('Image on Header', 'tfuse')), 'type' => 'select'), $this->ext->slider->model->has_sliders() ? array('name' => __('Slider', 'tfuse'), 'desc' => __('Select a slider for your post. The sliders are created on the', 'tfuse') . '<a href="' . admin_url('admin.php?page=tf_slider_list') . '" target="_blank">' . __('Sliders page', 'tfuse') . '</a>.', 'id' => TF_THEME_PREFIX . '_select_slider', 'value' => '', 'options' => $TFUSE->ext->slider->get_sliders_dropdown(), 'type' => 'select') : array('name' => __('Slider', 'tfuse'), 'desc' => '', 'id' => TF_THEME_PREFIX . '_select_slider', 'value' => '', 'html' => __('No sliders created yet. You can start creating one', 'tfuse') . '<a href="' . admin_url('admin.php?page=tf_slider_list') . '">' . __('here', 'tfuse') . '</a>.', 'type' => 'raw'), array('name' => __('Header Image', 'tfuse'), 'desc' => __('Upload an image for your header. It will be resized to 960x142 px', 'tfuse'), 'id' => TF_THEME_PREFIX . '_header_image', 'value' => '', 'type' => 'upload'), array('name' => __('Shortcodes after Content', 'tfuse'), 'desc' => __('In this textarea you can input your prefered custom shotcodes.', 'tfuse'), 'id' => TF_THEME_PREFIX . '_content_bottom', 'value' => '', 'type' => 'textarea'));
/* * *********************************************************
  Advanced
 * ********************************************************** */
开发者ID:shimion,项目名称:stlucks,代码行数:9,代码来源:page_options.php


示例17: get_template_part

                            <div class="tagcloud"><?php 
    echo $tags;
    ?>
</div>
                        </section>
                    <?php 
}
?>
                    
                    <?php 
get_template_part('content', 'author');
?>
                    
                    <section class="clearfix">
                        <?php 
if (tfuse_options('post_share')) {
    ?>
                            <div class="social-share-blog">
                                <div class="twitter"><a href="https://twitter.com/share?url=<?php 
    echo get_permalink();
    ?>
" target="_blank"><i class="icon-twitter"></i><?php 
    _e('Tweet', 'tfuse');
    ?>
</a></div>
                                <div class="facebook-share-blog"><a href="https://www.facebook.com/sharer/sharer.php?u=<?php 
    echo get_permalink();
    ?>
" target="_blank"><i class="tficon-like"></i><?php 
    _e('Share', 'tfuse');
    ?>
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:31,代码来源:single.php


示例18: tfuse_get_header_content

 /**
  * Sets up theme defaults and registers support for various WordPress features.
  *
  * Note that this function is hooked into the after_setup_theme hook, which runs
  * before the init hook. The init hook is too late for some features, such as indicating
  * support post thumbnails.
  *
  * To override tfuse_slider_type() in a child theme, add your own tfuse_slider_type to your child theme's
  * functions.php file.
  */
 function tfuse_get_header_content()
 {
     global $TFUSE, $post, $header_image, $is_tf_front_page, $is_tf_blog_page;
     $posts = $header_element = $header_image = $slider = null;
     if ($is_tf_blog_page) {
         $header_element = tfuse_options('header_element_blog');
         if ('slider' == $header_element) {
             $slider = tfuse_options('select_slider_blog');
         } elseif ('image' == $header_element) {
             $header_image = tfuse_options('header_image_blog');
         }
     } elseif ($is_tf_front_page) {
         if (tfuse_options('use_page_options') && tfuse_options('homepage_category') == 'page') {
             $page_id = $post->ID;
             $header_element = tfuse_page_options('header_element', '', $page_id);
             if ('slider' == $header_element) {
                 $slider = tfuse_page_options('select_slider', '', $page_id);
             } elseif ('image' == $header_element) {
                 $header_image = tfuse_page_options('header_image', '', $page_id);
             }
         

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP tfuse_page_options函数代码示例发布时间:2022-05-23
下一篇:
PHP tfb_shellencode函数代码示例发布时间: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