本文整理汇总了PHP中ts_get_the_category函数的典型用法代码示例。如果您正苦于以下问题:PHP ts_get_the_category函数的具体用法?PHP ts_get_the_category怎么用?PHP ts_get_the_category使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ts_get_the_category函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: trim
echo $ts_show->media && trim($media) ? 'media-meta-wrap' : 'meta-wrap';
?>
">
<?php
if ($ts_show->media && trim($media)) {
$allow_gals = isset($atts['allow_galleries']) ? $atts['allow_galleries'] : '';
echo ts_escape($media);
}
if ($ts_show->meta) {
if ($post_type == 'portfolio') {
?>
<div class="entry-info portfolio-entry-info"><p class="small-size <?php
echo esc_attr($text_align);
?>
"><?php
echo ts_get_the_category('portfolio-category', 'text');
?>
</p></div>
<?php
} elseif ($post_type == 'page') {
?>
<div class="entry-info page-entry-info"><p class="small-size <?php
echo esc_attr($text_align);
?>
"><?php
_e('Page last modified:', 'ThemeStockyard');
?>
<?php
the_modified_date();
?>
</p></div>
开发者ID:estvmachine,项目名称:nicowp,代码行数:31,代码来源:loop.php
示例2: isset
$excerpt_length = isset($atts['excerpt_length']) && $atts['excerpt_length'] != '' ? $atts['excerpt_length'] : $exc_lnth;
$ts_show = ts_maybe_show_blog_elements($atts);
$show_excerpt = $excerpt_length == '0' || !$ts_show->excerpt ? false : true;
$title_size = ts_get_blog_loop_title_size($atts, 4);
$text_align = ts_get_blog_loop_text_align($atts);
$allow_vids = isset($atts['allow_videos']) ? $atts['allow_videos'] : '';
$allow_gals = isset($atts['allow_galleries']) ? $atts['allow_galleries'] : '';
if ($ts_query->have_posts()) {
while ($ts_query->have_posts()) {
$ts_query->the_post();
$atts['exclude_these_later'] = isset($atts['exclude_these_later']) ? $atts['exclude_these_later'] : '';
if (!ts_attr_is_false($atts['exclude_these_later'])) {
$ts_previous_posts[] = $ts_query->post->ID;
}
$post_type = get_post_type();
$category = ts_get_the_category(ts_get_the_display_taxonomy($atts), 'big_array:1', '', $ts_query->post->ID);
$media = ts_get_featured_media(array('media_width' => 480, 'media_height' => 0, 'gallery_width' => 480, 'gallery_height' => 320, 'allow_videos' => $allow_vids, 'allow_galleries' => $allow_gals));
?>
<div id="post-<?php
echo esc_attr($ts_query->post->ID);
?>
" class="hentry entry masonry-entry <?php
echo esc_attr($entry_class);
?>
">
<div class="post-content">
<div class="post-category post-category-heading mimic-small uppercase <?php
echo ts_loop_post_category_class($atts, $media);
?>
">
开发者ID:dqishmirian,项目名称:jrrny,代码行数:31,代码来源:loop-masonry.php
示例3: ts_get_blog_loop_title_size
$show_excerpt = $excerpt_length == '0' || !$ts_show->excerpt ? false : true;
$title_size = ts_get_blog_loop_title_size($atts, 4);
$text_align = ts_get_blog_loop_text_align($atts);
$allow_vids = isset($atts['allow_videos']) ? $atts['allow_videos'] : '';
$allow_gals = isset($atts['allow_galleries']) ? $atts['allow_galleries'] : '';
$mw = isset($atts['media_width']) && $atts['media_width'] !== false ? $atts['media_width'] : 510;
$mh = isset($atts['media_height']) && $atts['media_height'] !== false ? $atts['media_height'] : 340;
if ($ts_query->have_posts()) {
while ($ts_query->have_posts()) {
$ts_query->the_post();
$atts['exclude_these_later'] = isset($atts['exclude_these_later']) ? $atts['exclude_these_later'] : '';
if (!ts_attr_is_false($atts['exclude_these_later'])) {
$ts_previous_posts[] = $ts_query->post->ID;
}
$post_type = get_post_type();
$category = ts_get_the_category('category', 'big_array:1', '', $ts_query->post->ID);
$media = ts_get_featured_media(array('media_width' => $mw, 'media_height' => $mh, 'allow_videos' => $allow_vids, 'allow_galleries' => $allow_gals));
?>
<div id="post-<?php
the_ID();
?>
" class="hentry entry clearfix">
<div class="post-content clearfix">
<div class="post-category post-category-heading mimic-small uppercase">
<a href="<?php
echo get_category_link($category[0]['term_id']);
?>
"><strong><?php
echo esc_html($category[0]['name']);
?>
开发者ID:estvmachine,项目名称:nicowp,代码行数:31,代码来源:loop-medium-image.php
示例4: esc_attr
<div class="title-info">
<h4 class="<?php
echo esc_attr($atts['title_align']);
?>
"><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h4>
<p class="<?php
echo esc_attr($atts['meta_align']);
?>
small other"><?php
echo ts_get_the_category('portfolio-category', 'list', ' • ');
?>
</p>
</div>
</div>
<div class="read-more"><p class="<?php
echo esc_attr($atts['read_more_align']);
?>
uppercase mimic-small more-details"><a href="<?php
the_permalink();
?>
"><?php
_e('More Details', 'ThemeStockyard');
?>
</a></p></div>
</div>
开发者ID:sekane81,项目名称:ratoninquietoweb,代码行数:31,代码来源:loop-masonry-cards.php
示例5: trim
$cat_name = trim($alt_cat_name) ? $alt_cat_name : $cat_name;
$author = get_the_author();
if (ts_disqus_active()) {
$comments = '<span class="disqus-comment-count" data-disqus-url="' . esc_url(get_permalink()) . '">0</span>';
} else {
$comments = get_comments_number();
}
/* this will change per theme */
//$meta .= '<span class="small-size color-white stylized-meta">'.esc_html($author).'</span>';
$meta .= '<span class="small-size stylized-meta">' . __('By', 'ThemeStockyard') . ' <em class="color-white">' . esc_html($author) . '</em></span> ';
$meta .= '<span class="comment-bubble border-primary bg-primary bg-primary-text mimic-small">' . $comments . '</span>';
} elseif ($ts_slider_source == 'portfolio') {
$descr = has_excerpt() ? strip_tags(get_the_excerpt()) : ts_trim_text(apply_filters('the_content', get_the_content()), $descr_limit);
$url = get_permalink();
$read_more = __('Read More', 'ThemeStockyard');
$meta = ts_get_the_category('portfolio-category');
}
$link_begin = trim($url) ? '<a href="' . esc_url($url) . '" class="ts-item-link" target="' . esc_attr($target) . '">' : '';
$link_begin2 = trim($url) ? '<a href="' . esc_url($url) . '" class="ts-item-link ts-item-link-2" target="' . esc_attr($target) . '">' : '';
$link_end = trim($url) ? '</a>' : '';
}
if ($slider_allow_vids && in_array($content_type, array('video', 'youtube', 'vimeo', 'self_hosted', 'self_hosted_video')) && !$slider_preview_exists) {
$vimeo = get_post_meta($slider->post->ID, '_' . $prefix . '_vimeo_id', true);
$youtube = get_post_meta($slider->post->ID, '_' . $prefix . '_youtube_id', true);
$content_type .= $vimeo ? $vimeo : $youtube;
if ($vimeo || $youtube) {
$video_service = $vimeo ? 'vimeo' : ($youtube ? 'youtube' : '');
$video_id = $vimeo ? ts_get_video_id($vimeo) : ($youtube ? ts_get_video_id($youtube) : '');
$vdata = ts_get_and_save_video_data($video_id, $video_service);
//$info = maybe_serialize(ts_get_saved_video_data($video_id, $video_service)); // for testing
if ($ts_slider_type == 'carousel') {
开发者ID:sekane81,项目名称:ratoninquietoweb,代码行数:31,代码来源:carousel-flex-slider.php
注:本文中的ts_get_the_category函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论