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

PHP tfuse_page_options函数代码示例

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

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



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

示例1: widget

 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     $posts = isset($instance['posts']) ? $instance['posts'] : array();
     if (!empty($posts)) {
         echo '<div class="widget widget_text">
                         <h3 class="widget-title">' . $title . '</h3>
                         <div class="textwidget">';
         foreach ($posts as $key => $post) {
             $image = get_the_post_thumbnail($key, 'members-widget-thumb');
             $email = tfuse_page_options('member_email', '', $key);
             $job = tfuse_page_options('member_job', '', $key);
             $phone = tfuse_page_options('member_phone', '', $key);
             echo '<div class="contact-person">
                                 ' . $image . '
                                 <div class="contact-person-info">
                                     <strong>' . get_the_title($key) . '</strong>';
             if (!empty($job)) {
                 echo '<em>' . $job . '</em>';
             }
             if (!empty($phone)) {
                 echo '<span>' . $phone . '</span>';
             }
             if (!empty($email)) {
                 echo '<a href="mailto:' . $email . '">' . $email . '</a>';
             }
             echo '</div>
                             </div>';
         }
         echo '</div>
                     </div>';
     }
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:34,代码来源:TFuse_Widget_Members.php


示例2: tfuse_members

function tfuse_members($atts, $content = null)
{
    extract(shortcode_atts(array('post' => ''), $atts));
    $output = '';
    $post = explode(',', $post);
    $query = new WP_Query(array('posts_per_page' => -1, 'post_type' => 'member', 'post__in' => $post));
    $posts = $query->get_posts();
    if (!empty($posts)) {
        $output .= '<div class="our-team">';
        foreach ($posts as $post) {
            $job = tfuse_page_options('job', '', $post->ID);
            $image = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails'));
            if (!empty($image)) {
                $image = TF_GET_IMAGE::get_src_link($image, 270, 270);
            }
            $output .= '<div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
                            <div class="image-our-team">
                                <img src="' . $image . '" alt="' . $post->post_title . '">
                            </div>
                            <h3>' . $post->post_title . '</h3>
                            <span class="function">' . $job . '</span>
                        </div>';
        }
        $output .= '</div>';
    }
    return $output;
}
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:27,代码来源:members.php


示例3: tfuse_faq

function tfuse_faq($atts, $content = null)
{
    extract(shortcode_atts(array('post' => ''), $atts));
    $output = '';
    $post = explode(',', $post);
    $query = new WP_Query(array('posts_per_page' => -1, 'post_type' => 'faq', 'post__in' => $post));
    $posts = $query->get_posts();
    if (!empty($posts)) {
        foreach ($posts as $post) {
            $btn_title = tfuse_page_options('btn_title', '', $post->ID);
            $output .= '<div class="faq-article clearfix">
                            <div class="col-md-8 col-sm-7 col-xs-7 text">
                                <h2>Q: ' . $post->post_title . '</h2>
                                <p>' . $post->post_content . '</p>
                            </div>';
            if (!empty($btn_title)) {
                $output .= '<div class="col-md-3 col-md-offset-1 col-sm-5 col-xs-5 faq-button">
                                            <a href="' . tfuse_page_options('btn_link', '', $post->ID) . '" class="btn btn-yellow btn-donate-faq"><span>' . $btn_title . '</span></a>
                                        </div>';
            }
            $output .= '</div>';
        }
        // End IF Statement
    }
    return $output;
}
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:26,代码来源:faq.php


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


示例5: tfuse_shortcode_posts

 /**
  *  Generate array with: recent/popular/most commented posts
  * @param string $sort Sort type (recent/popular/most commented)
  * @param integer $items Number of items to be extracted
  * @param boolean $image_post Extract or no post image
  * @param integer $image_width Set width of post image
  * @param integer $image_height Set height of post image
  * @param string $image_class Set class of post image
  * @param boolean $date_post Extract or no post date
  * @param string $date_format Set date format
  * @param string $post_type Set post type
  * @param string $category Set category from where posts would be extracted
  * @since Medica 2.0
  */
 function tfuse_shortcode_posts($args = null)
 {
     $defaults = array('sort' => 'recent', 'items' => 5, 'image_post' => true, 'image_width' => 54, 'image_height' => 54, 'image_class' => 'thumbnail', 'date_post' => true, 'date_format' => 'F jS, Y', 'post_type' => 'post', 'category' => '', 'specialites' => '');
     extract(wp_parse_args($args, $defaults));
     global $post;
     $tf_cat_ID = !empty($category) && empty($specialites) ? get_cat_ID($category) : '';
     $specialites = empty($category) && !empty($specialites) ? $specialites : '';
     if ($sort == 'recent') {
         $query = new WP_Query(array('post_type' => $post_type, 'orderby' => 'post_date', 'order ' => 'DESC', 'cat' => $tf_cat_ID, 'Specialites' => $specialites, 'posts_per_page' => $items));
         $posts = $query->get_posts();
     } elseif ($sort == 'popular') {
         $query = new WP_Query(array('post_type' => $post_type, 'orderby' => 'meta_value', 'meta_key' => TF_THEME_PREFIX . '_post_viewed', 'order ' => 'DESC', 'cat' => $tf_cat_ID, 'posts_per_page' => $items));
         $posts = $query->get_posts();
     } elseif ($sort == 'commented') {
         $query = new WP_Query(array('post_type' => $post_type, 'orderby' => 'comment_count', 'order ' => 'DESC', 'cat' => $tf_cat_ID, 'posts_per_page' => $items));
         $posts = $query->get_posts();
     } else {
         return false;
     }
     $tf_post_option = array();
     $count = 0;
     if (!empty($posts)) {
         foreach ($posts as $post_elm) {
             setup_postdata($post_elm);
             $img = '';
             if ($image_post == true) {
                 $post_image_src = tfuse_page_options('thumbnail_image', tfuse_page_options('single_image', null, $post_elm->ID), $post_elm->ID);
                 if (!empty($post_image_src)) {
                     $get_image = new TF_GET_IMAGE();
                     $img = $get_image->properties(array('class' => $image_class, 'alt' => get_the_title($post_elm->ID)))->width($image_width)->height($image_height)->src($post_image_src)->resize(true)->get_img();
                 }
             }
             if (!empty($img)) {
                 $tf_post_option[$count]['post_img'] = $img;
             } else {
                 $tf_post_option[$count]['post_img'] = '';
             }
             if ($date_post) {
                 $time_format = apply_filters('tfuse_widget_time_format', $date_format);
                 $tf_post_option[$count]['post_date_post'] = get_the_time($time_format, $post_elm->ID);
             } else {
                 $tf_post_option[$count]['post_date_post'] = '';
             }
             $tf_post_option[$count]['post_class'] = is_singular() && $post->ID == $post_elm->ID ? 'current-menu-item post_' . $sort : 'post_' . $sort;
             $tf_post_option[$count]['post_title'] = get_the_title($post_elm->ID);
             $tf_post_option[$count]['post_link'] = get_permalink($post_elm->ID);
             $tf_post_option[$count]['post_author_link'] = get_author_posts_url(get_the_author_meta('ID'));
             $tf_post_option[$count]['post_author_name'] = get_the_author();
             $tf_post_option[$count]['post_comnt_numb'] = get_comments_number($post_elm->ID);
             $tf_post_option[$count]['post_comnt_numb_link'] = tfuse_get_comments(true, $post_elm->ID);
             $tf_post_option[$count]['post_loveit_number'] = get_post_meta($post_elm->ID, TF_THEME_PREFIX . '_post_viewed', true);
             $tf_post_option[$count]['post_excerpt'] = apply_filters('get_the_excerpt', $post_elm->post_excerpt);
             $count++;
         }
         wp_reset_postdata();
     }
     return $tf_post_option;
 }
开发者ID:shimion,项目名称:stlucks,代码行数:72,代码来源:SHOTCODE_POSTS.php


示例6: from_custom_field

 function from_custom_field($key = 'single_imgage')
 {
     $src = tfuse_page_options($key);
     if ($src) {
         $this->src = $src;
     } else {
         $this->src = null;
     }
     return $this;
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:10,代码来源:GET_IMAGE.php


示例7: select_hour_end

 function select_hour_end()
 {
     global $post;
     $html = $min = $m = "";
     $saved_time = tfuse_page_options('end_hour_min', false, $post->ID);
     $html .= '<select class="select_hour"  id="' . TF_THEME_PREFIX . '_event_hours_end" name="' . TF_THEME_PREFIX . '_event_hour_end" >';
     for ($i = 1; $i <= 12; $i++) {
         if ($saved_time['hour'] == $i) {
             $html .= '<option selected="selected" value="' . $i . '">' . $i . '</option>';
         } else {
             $html .= '<option value="' . $i . '">' . $i . '</option>';
         }
     }
     $html .= '</select>
           <select class="select_minute" id="' . TF_THEME_PREFIX . '_event_minute_end" name="' . TF_THEME_PREFIX . '_event_minute_end">';
     for ($i = 0; $i < 4; $i++) {
         if ($i == 0) {
             $min = '00';
         } elseif ($i == 1) {
             $min = '15';
         } elseif ($i == 2) {
             $min = '30';
         } else {
             $min = '45';
         }
         if ($saved_time['minute'] == $min) {
             $html .= '<option selected="selected" value="' . $min . '">' . $min . '</option>';
         } else {
             $html .= '<option value="' . $min . '">' . $min . '</option>';
         }
     }
     $html .= '</select>
           <select class="select_time" id="' . TF_THEME_PREFIX . '_event_time_end"  name="' . TF_THEME_PREFIX . '_event_time_end">';
     for ($i = 1; $i <= 2; $i++) {
         if ($i == 1) {
             $m = 'AM';
         } else {
             $m = 'PM';
         }
         if ($saved_time['time'] == $m) {
             $html .= '<option selected="selected" value="' . $m . '">' . $m . '</option>';
         } else {
             $html .= '<option value="' . $m . '">' . $m . '</option>';
         }
     }
     $html .= '</select>';
     return $html;
 }
开发者ID:part-time-project,项目名称:italians,代码行数:48,代码来源:custom_callbacks.php


示例8: source

 function source($source = '', $link = '')
 {
     if ($source != '') {
         if (empty($link)) {
             $this->link = tfuse_page_options($source, $source, $this->id);
         } else {
             $this->link = $link;
         }
         if ($this->link != '') {
             $this->type = '';
             if (stripos($this->link, "iframe") !== false) {
                 $this->type = "iframe";
             } else {
                 if (preg_match('/vimeo\\.com/i', $this->link)) {
                     $this->type = "vimeo";
                 } else {
                     if (stripos($this->link, ".mov") !== false) {
                         $this->type = "quicktime";
                     } else {
                         if (stripos($this->link, ".swf") !== false) {
                             $this->type = "flash";
                         } else {
                             if (preg_match('/youtube\\.com\\/watch/i', $this->link)) {
                                 $this->type = "youtube";
                             } else {
                                 if (substr($this->link, 0, 1) == "#") {
                                     $this->type = "inline";
                                 } else {
                                     if (stripos($this->link, 'object') != FALSE && stripos($this->link, 'param') != FALSE) {
                                         $this->type = "object";
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return $this;
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:41,代码来源:GET_EMBED.php


示例9: tfuse_members

function tfuse_members($atts, $content = null)
{
    extract(shortcode_atts(array('item' => '', 'title' => ''), $atts));
    $output = $link = $count = '';
    $posts = get_posts('post_type=members&posts_per_page=-1');
    if (!empty($posts)) {
        $output .= '<section class="team-widget">
                <header>
                    <h1 class="team-widget-title">' . $title . '</h1>
                </header>
                     <div class="team-content">';
        foreach ($posts as $post) {
            if ($count == $item) {
                break;
            }
            $count++;
            $img = tfuse_page_options('member_photo', '', $post->ID);
            $id = tfuse_page_options('member_id', '', $post->ID);
            $url = tfuse_page_options('member_link', '', $post->ID);
            $image_src = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails'));
            if (!empty($url)) {
                $link = $url;
            } else {
                $link = '';
            }
            $output .= '<div class="member">
                                            <div class="member-image"><img src="' . $image_src . '" width="193" height="217" alt=""/></div>
                                                <div class="member-descr">
                                                    <h4 class="member-name">' . get_the_title($post->ID) . '</h4>
                                                    <p><a href="' . $link . '">' . $id . '</a></p>
                                                </div>
                                        </div>';
        }
        $output .= '</ul>
                    </div>';
        $output .= '</section>';
    }
    return $output;
}
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:39,代码来源:members.php


示例10: tfuse_press

function tfuse_press($atts, $content = null)
{
    extract(shortcode_atts(array('post' => ''), $atts));
    $output = '';
    $post = explode(',', $post);
    $query = new WP_Query(array('posts_per_page' => -1, 'post_type' => 'press', 'post__in' => $post));
    $posts = $query->get_posts();
    if (!empty($posts)) {
        $output .= '<div class="wrap-press">';
        foreach ($posts as $post) {
            $link = tfuse_page_options('link', '', $post->ID);
            $source = tfuse_page_options('source', '', $post->ID);
            $image = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails'));
            $output .= '<a href="' . $link . '" class="press-article" style="background: url(\'' . $image . '\') no-repeat">
                                <h3>' . $post->post_title . '</h3>
                                <div class="divider"></div>
                                <p>' . $post->post_content . '</p>
                                <span>' . $source . '</span>
                        </a>';
        }
        $output .= '</div>';
    }
    return $output;
}
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:24,代码来源:press.php


示例11: 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 : '';
     echo $before_widget;
     // echo widgets title
     echo $tfuse_title;
     echo '
                 <div class="textwidget">
                 <div class="portfolio portfolio-videos">
                     <ul class="portfolio-list">';
     foreach ($posts as $key => $post) {
         $video = tfuse_page_options('video_links', '', $key);
         $image = get_the_post_thumbnail($key, 'video-thumb');
         if (!empty($image)) {
             echo '<li>
                                     <a data-rel="prettyPhoto" href="' . $video . '">
                                     ' . $image . '
                                     </a>
                                     <h4><a class="video_link" href="' . get_permalink($key) . '">' . get_the_title($key) . '</a></h4>
                                 </li>';
         }
     }
     echo ' </ul></div>
                 </div>';
     echo $after_widget;
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:36,代码来源:TFuse_Widget_Videos.php


示例12: tfuse_get_upcoming_events

 function tfuse_get_upcoming_events($items)
 {
     $final_events = array();
     $args = array('posts_per_page' => -1, 'post_type' => 'event');
     $query = new WP_Query($args);
     $posts = $query->posts;
     if (!empty($posts)) {
         $count = 0;
         $posts_with_content = array();
         foreach ($posts as $post) {
             $posts_with_content[$post->ID] = $post;
             $date = tfuse_page_options('event_date', '', $post->ID);
             if (!empty($date)) {
                 // repeat event
                 $repeat = tfuse_page_options('event_repeat', '', $post->ID);
                 if ($repeat != 'no') {
                     $repeats[$post->ID] = tfuse_page_options('event_repeat', '', $post->ID);
                 }
                 if ($repeat == 'year') {
                     $from = tfuse_page_options('event_date', '', $post->ID);
                     $date = new DateTime($from);
                     $year = (int) $date->format('Y');
                     $month = $date->format('m');
                     $day = $date->format('d');
                     for ($i = 0; $i < 10; $i++) {
                         $permalink = get_permalink($post->ID);
                         $all[$count]['event_id'] = $post->ID;
                         $all[$count]['event_date'] = $year + $i . '-' . $month . '-' . $day;
                         if (strpos($permalink, "?") === false) {
                             $permalink = $permalink . '?date=' . $all[$count]['event_date'];
                         } else {
                             $permalink = $permalink . '&date=' . $all[$count]['event_date'];
                         }
                         $all[$count]['event_permalink'] = $permalink;
                         ++$count;
                     }
                 } elseif ($repeat == 'month') {
                     $from = tfuse_page_options('event_date', '', $post->ID);
                     $day = strtotime($from);
                     for ($i = 0; $i < 10; $i++) {
                         $to = strtotime(date("Y-m-d", $day) . " +" . $i . " month");
                         $all[$count]['event_id'] = $post->ID;
                         $all[$count]['event_date'] = date("Y-m-d", $to);
                         $permalink = get_permalink($post->ID);
                         if (strpos($permalink, "?") === false) {
                             $permalink = $permalink . '?date=' . $all[$count]['event_date'];
                         } else {
                             $permalink = $permalink . '&date=' . $all[$count]['event_date'];
                         }
                         $all[$count]['event_permalink'] = $permalink;
                         ++$count;
                     }
                 } elseif ($repeat == 'week') {
                     $from = tfuse_page_options('event_date', '', $post->ID);
                     $day = strtotime($from);
                     for ($i = 0; $i < 53; $i++) {
                         $to = strtotime(date("Y-m-d", $day) . " +" . $i . " weeks");
                         $all[$count]['event_id'] = $post->ID;
                         $all[$count]['event_date'] = date("Y-m-d", $to);
                         $permalink = get_permalink($post->ID);
                         if (strpos($permalink, "?") === false) {
                             $permalink = $permalink . '?date=' . $all[$count]['event_date'];
                         } else {
                             $permalink = $permalink . '&date=' . $all[$count]['event_date'];
                         }
                         $all[$count]['event_permalink'] = $permalink;
                         ++$count;
                     }
                 } elseif ($repeat == 'day') {
                     $from = tfuse_page_options('event_date', '', $post->ID);
                     $day = strtotime($from);
                     for ($i = 0; $i < 365; $i++) {
                         $to = strtotime(date("Y-m-d", $day) . " +" . $i . " days");
                         $all[$count]['event_id'] = $post->ID;
                         $all[$count]['event_date'] = date("Y-m-d", $to);
                         $permalink = get_permalink($post->ID);
                         if (strpos($permalink, "?") === false) {
                             $permalink = $permalink . '?date=' . $all[$count]['event_date'];
                         } else {
                             $permalink = $permalink . '&date=' . $all[$count]['event_date'];
                         }
                         $all[$count]['event_permalink'] = $permalink;
                         ++$count;
                     }
                 } else {
                     $all[$count]['event_id'] = $post->ID;
                     $all[$count]['event_date'] = tfuse_page_options('event_date', '', $post->ID);
                     $permalink = get_permalink($post->ID);
                     if (strpos($permalink, "?") === false) {
                         $permalink = $permalink . '?date=' . $all[$count]['event_date'];
                     } else {
                         $permalink = $permalink . '&date=' . $all[$count]['event_date'];
                     }
                     $all[$count]['event_permalink'] = $permalink;
                     ++$count;
                 }
             }
         }
     }
     if (!empty($all)) {
//.........这里部分代码省略.........
开发者ID:part-time-project,项目名称:italians,代码行数:101,代码来源:THEME_FUNCTIONS.php


示例13: apply_filters

<?php

/**
 * The template for displaying posts on archive pages.
 * To override this template in a child theme, copy this file 
 * to your child theme's folder.
 *
 * @since Philanthropy 1.0
 */
global $more, $post;
$more = apply_filters('tfuse_more_tag', 0);
$image = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails'));
$gallery = tfuse_page_options('gallery');
?>
<li class="gallery-item">
    <?php 
if (!empty($image)) {
    ?>
        <div class="gallery-img">
            <a href="<?php 
    echo $image;
    ?>
" class="see-more-gallery" data-rel="prettyPhoto[<?php 
    echo $post->ID;
    ?>
]" title="<?php 
    echo get_the_title();
    ?>
">
                <span><?php 
    _e('More', 'tfuse');
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:31,代码来源:listing-gallery.php


示例14: tfuse_add_meta_query_ratings

 function tfuse_add_meta_query_ratings()
 {
     $ratings_exists = get_option('tfuse_ratings');
     if ($ratings_exists == true) {
         return;
     }
     $args = array('posts_per_page' => -1, 'post_type' => 'review');
     $all_posts = new WP_Query($args);
     $posts = $all_posts->get_posts();
     if (empty($posts)) {
         return;
     }
     foreach ($posts as $post) {
         $rating = tfuse_page_options('rating', '', $post->ID);
         update_post_meta($post->ID, 'tfuse_rating', $rating);
     }
     update_option('tfuse_ratings', true);
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:18,代码来源:AJAX_CALLBACKS.php


示例15: wp_get_attachment_url

 * To override this template in a child theme, copy this file 
 * to your child theme's folder.
 *
 * @since Philanthropy 1.0
 */
$image = wp_get_attachment_url(get_post_thumbnail_id($post->ID, 'post-thumbnails'));
$gallery = tfuse_page_options('gallery');
$date_post = tfuse_page_options('event_date');
if (isset($_GET['date']) && $_GET['date'] != '') {
    $date_post = $_GET['date'];
}
$date = new DateTime($date_post);
$year = $date->format('Y');
$month = $date->format('F jS');
$get_start_hour = tfuse_page_options('event_hour_min');
$get_end_hour = tfuse_page_options('end_hour_min');
?>
<header class="entry-header">
    <h1 class="entry-title">
        <?php 
echo get_the_title();
?>
        <span class="entry-title-min-description">
            <p>
                <?php 
_e('Event on', 'tfuse');
?>
: <?php 
echo $year . '-' . $month;
echo '  ' . $get_start_hour['hour'], ':', $get_start_hour['minute'], ' ', $get_start_hour['time'], ' - ';
echo '  ' . $get_end_hour['hour'], ':', $get_end_hour['minute'], ' ', $get_end_hour['time'];
开发者ID:aaronfrey,项目名称:PepperLillie-GVCO,代码行数:31,代码来源:content-single-event.php


示例16: widget

    function widget($args, $instance)
    {
        extract($args);
        global $post;
        $id = '';
        ?>
            <?php 
        if ($post->post_type == 'game' || $post->post_type == 'review') {
            ?>
                <?php 
            if ($post->post_type == 'review') {
                $game_id = tfuse_page_options('game_select');
                $game_id = explode(',', $game_id);
                if (!empty($game_id)) {
                    $id = $game_id[0];
                    $title = get_the_title($id);
                }
            } else {
                $id = $post->ID;
            }
            if (!empty($id)) {
                $image = wp_get_attachment_url(get_post_thumbnail_id($id, 'post-thumbnails'));
                $published = tfuse_page_options('published', '', $id);
                $published_link = tfuse_page_options('published_link', '', $id);
                $developed = tfuse_page_options('developed', '', $id);
                $developed_link = tfuse_page_options('developed_link', '', $id);
                $description = tfuse_page_options('description', '', $id);
                $press_contact = tfuse_page_options('press_email', '', $id);
                $facebook_social = tfuse_page_options('facebook_social', '', $id);
                $twitter_social = tfuse_page_options('twitter_social', '', $id);
                $g_rating = tfuse_page_options('rating_type', '', $id);
                $esrb = tfuse_page_options('esrb', '', $id);
                $pegi = tfuse_page_options('pegi', '', $id);
                if ($g_rating == 'pegi') {
                    switch ($pegi) {
                        case '7':
                            $img_r = get_template_directory_uri() . '/images/7.png';
                            $content = __('Considered suitable for all age groups but contains some possibly frightening scenes or sounds.', 'tfuse');
                            break;
                        case '12':
                            $img_r = get_template_directory_uri() . '/images/12.png';
                            $content = __('Videogames that show violence as well as nudity of a slightly more graphic nature.', 'tfuse');
                            break;
                        case '16':
                            $img_r = get_template_directory_uri() . '/images/16.png';
                            $content = __('A video game where the depiction of violence (or sexual activity) reaches a stage that looks the same as would be expected in real life.', 'tfuse');
                            break;
                        case '18':
                            $img_r = get_template_directory_uri() . '/images/18.png';
                            $content = __('Any game where the level of violence reaches a stage where it becomes a depiction of gross violence.', 'tfuse');
                            break;
                        default:
                            $img_r = get_template_directory_uri() . '/images/3.png';
                            $content = __('The content of games given this rating is considered suitable for all age groups.', 'tfuse');
                            break;
                    }
                } else {
                    switch ($esrb) {
                        case 'e':
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_e.png';
                            $content = __('Content is generally suitable for all ages. May contain minimal cartoon, fantasy or mild violence and/or infrequent use of mild language.', 'tfuse');
                            break;
                        case 'et':
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_e10.png';
                            $content = __('Content is generally suitable for ages 10 and up. May contain more cartoon, fantasy or mild violence, mild language and/or minimal suggestive themes.', 'tfuse');
                            break;
                        case 't':
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_t.png';
                            $content = __('Content is generally suitable for ages 13 and up. May contain violence, suggestive themes, crude humor, minimal blood, simulated gambling and/or infrequent use of strong language.', 'tfuse');
                            break;
                        case 'm':
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_m.png';
                            $content = __('Content is generally suitable for ages 17 and up. May contain intense violence, blood and gore, sexual content and/or strong language.', 'tfuse');
                            break;
                        case 'a':
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_ao.png';
                            $content = __('Content suitable only for adults ages 18 and up. May include prolonged scenes of intense violence, graphic sexual content and/or gambling with real currency.', 'tfuse');
                            break;
                        case 'rp':
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_rp.png';
                            $content = __('Not yet assigned a final ESRB rating. Appears only in advertising, marketing and promotional materials related to a game that is expected to carry an ESRB rating, and should be replaced by a game\'s rating once it has been assigned.', 'tfuse');
                            break;
                        default:
                            $img_r = get_template_directory_uri() . '/images/ratingsymbol_ec.png';
                            $content = __('Content is intended for young children.', 'tfuse');
                            break;
                    }
                }
                ?>
                        <div class="widget widget_text widget-boxed">
                            <h3 class="widget-title"><?php 
                echo !empty($title) ? $title : get_the_title();
                ?>
</h3>
                            <div class="textwidget">
                                <div class="game-infobox">
                                    <?php 
                if (!empty($image)) {
                    ?>
                                        <img src="<?php 
//.........这里部分代码省略.........
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:101,代码来源:TFuse_Widget_Game_Info.php


示例17: tfuse_testimonials

/**
 * Testimonials
 *
 * 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:
 * order: RAND, ASC, DESC
 */
function tfuse_testimonials($atts, $content = null)
{
    global $testimonials_uniq;
    extract(shortcode_atts(array('title' => '', 'order' => 'RAND', 'type' => 'big_slider', 'subtitle' => false), $atts));
    $slide = $nav = $single = '';
    $testimonials_uniq = rand(800, 900);
    if (!empty($order) && ($order == 'ASC' || $order == 'DESC')) {
        $order = '&order=' . $order;
    } else {
        $order = '&orderby=rand';
    }
    $posts = get_posts('post_type=testimonials&posts_per_page=-1' . $order);
    $k = 0;
    if ($type == 'big_slider') {
        foreach ($posts as $item) {
            $k++;
            $slide .= '<li data-testimonial="1">
                <div class="testimonials-text"><p>' . $item->post_content . '</p></div>
                <div class="testimonials-author"><span>' . $item->post_title . '</span></div>';
            if (($from = tfuse_page_options('testimonials_from', '', $item->ID)) != '') {
                $slide .= '<div class="testimonials-organization"><span>' . __('review from', 'tfuse') . '</span> <a href="' . tfuse_page_options('testimonials_url', '#', $item->ID) . '">' . $from . '</a></div>';
            }
            $slide .= '</li>';
        }
        if ($k > 1) {
            $nav = '<a id="testimonials-prev' . $testimonials_uniq . '" class="prev" href="#"><i class="tficon-shevron-left"></i></a>
            <a id="testimonials-next' . $testimonials_uniq . '" class="next" href="#"><i class="tficon-shevron-right"></i></a>';
        } else {
            $single = ' style="display: block"';
        }
        $output = '<section class="testimonials testimonials' . $testimonials_uniq . ' ' . $single . '">
            <div class="container">
                <div class="row">
                    <div class="col-sm-8 col-sm-offset-2">
                        <h3 class="testimonials-title-before">' . $title . '</h3>
                        <h1 class="testimonials-title">' . $subtitle . '</h1>
                        <div class="testimonials-slider">
                            <span class="tficon-apostroufe"></span>
                            <ul id="testimonials' . $testimonials_uniq . '">
                                ' . $slide . '
                          

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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