本文整理汇总了PHP中et_get_the_author_posts_link函数的典型用法代码示例。如果您正苦于以下问题:PHP et_get_the_author_posts_link函数的具体用法?PHP et_get_the_author_posts_link怎么用?PHP et_get_the_author_posts_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了et_get_the_author_posts_link函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: et_postinfo_meta
function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more)
{
global $themename;
$postinfo_meta = '';
if (in_array('author', $postinfo)) {
$postinfo_meta .= ' ' . esc_html__('by', $themename) . ' ' . et_get_the_author_posts_link() . ' | ';
}
if (in_array('date', $postinfo)) {
$postinfo_meta .= get_the_time($date_format) . ' | ';
}
if (in_array('categories', $postinfo)) {
$postinfo_meta .= get_the_category_list(', ') . ' | ';
}
if (in_array('comments', $postinfo)) {
$postinfo_meta .= et_get_comments_popup_link($comment_zero, $comment_one, $comment_more);
}
echo $postinfo_meta;
}
示例2: et_postinfo_meta
function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more)
{
global $themename;
$postinfo_meta = esc_html__('Posted', $themename);
if (in_array('author', $postinfo) && 'project' !== get_post_type()) {
$postinfo_meta .= ' ' . esc_html__('By', $themename) . ' ' . et_get_the_author_posts_link();
}
if (in_array('date', $postinfo)) {
$postinfo_meta .= ' ' . esc_html__('on', $themename) . ' ' . get_the_time($date_format);
}
if (in_array('categories', $postinfo) && 'project' !== get_post_type()) {
$postinfo_meta .= ' ' . esc_html__('in', $themename) . ' ' . get_the_category_list(', ');
}
if (in_array('comments', $postinfo)) {
$postinfo_meta .= ' | ' . et_get_comments_popup_link($comment_zero, $comment_one, $comment_more);
}
echo $postinfo_meta;
}
示例3: et_postinfo_meta
function et_postinfo_meta($postinfo, $date_format, $comment_zero, $comment_one, $comment_more, $project = false)
{
global $themename;
$postinfo_meta = '';
if (in_array('author', $postinfo)) {
$postinfo_meta .= ' ' . esc_html__('by', $themename) . ' ' . et_get_the_author_posts_link();
}
if (in_array('date', $postinfo)) {
$postinfo_meta .= ' ' . esc_html__('on', $themename) . ' ' . get_the_time($date_format);
}
if (in_array('categories', $postinfo)) {
$postinfo_meta .= ' ' . esc_html__('in', $themename) . ' ' . ($project ? get_the_term_list(get_the_ID(), 'project_category', '', ', ', '') : get_the_category_list(', '));
}
if (in_array('comments', $postinfo)) {
$postinfo_meta .= ' | ' . et_get_comments_popup_link($comment_zero, $comment_one, $comment_more);
}
if ('' != $postinfo_meta) {
$postinfo_meta = __('Posted', $themename) . ' ' . $postinfo_meta;
}
echo $postinfo_meta;
}
示例4: et_postinfo_meta
function et_postinfo_meta()
{
echo '<p class="meta-info">';
// Translators: 1 is author, 2 is category list.
printf(__('Posted by %1$s in %2$s', 'Serene'), et_get_the_author_posts_link(), get_the_category_list(', '));
echo '</p> <!-- .meta-info -->';
}
示例5: the_ID
<article id="post-<?php
the_ID();
?>
" <?php
post_class('clearfix entry entry-content');
?>
>
<h1 class="title"><?php
the_title();
?>
</h1>
<p class="meta-info">
<?php
printf(_x('Posted by %1$s in %2$s | %3$s', 'Meta information on single event page', 'Harmony'), et_get_the_author_posts_link(), get_the_term_list(get_the_ID(), 'event_category', '', ', '), et_get_comments_popup_link(__('0 comments', 'Harmony'), __('1 comment', 'Harmony'), '% ' . __('comments', 'Harmony')));
?>
</p>
<?php
$date_format = apply_filters('et_event_settings_date_format', 'D, M d, Y');
$default_time_format = get_option('time_format');
$et_event_startdate = get_post_meta(get_the_ID(), '_et_event_date', true);
$et_event_enddate = get_post_meta(get_the_ID(), '_et_event_enddate', true);
$et_event_location = get_post_meta(get_the_ID(), '_et_event_location', true);
$et_event_venue = get_post_meta(get_the_ID(), '_et_event_venue', true);
$et_event_price = get_post_meta(get_the_ID(), '_et_event_price', true);
$et_purchase_link = get_post_meta(get_the_ID(), '_et_purchase_link', true);
$event_startday = date($date_format, $et_event_startdate);
$event_endday = date($date_format, $et_event_enddate);
$event_starttime = date($default_time_format, $et_event_startdate);
示例6: the_permalink
</div>
<?php
}
?>
<h2><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h2>
<p class="post-meta">
<?php
printf(__('Posted by %s on %s in %s', 'Nexus'), et_get_the_author_posts_link(), get_the_time('n-d-y'), get_the_category_list(', '));
?>
</p>
<p><?php
truncate_post(200);
?>
</p>
</div> <!-- .popular-post -->
<?php
$i++;
}
wp_reset_postdata();
$et_popular_tabs_content = ob_get_clean();
}
?>
示例7: the_ID
the_ID();
?>
" <?php
post_class('clearfix entry entry-content');
?>
>
<h1 class="title"><?php
the_title();
?>
</h1>
<p class="meta-info">
<?php
$gallery_date = get_post_meta(get_the_ID(), '_et_gallery_date', true);
$et_gallery_date = '' != $gallery_date ? date_i18n(et_get_option('harmony_date_format', 'M j, Y'), $gallery_date) : et_get_option('harmony_date_format', 'M j, Y');
printf(_x('Posted by %1$s in %2$s on %3$s | %4$s', 'Meta information on single gallery page', 'Harmony'), et_get_the_author_posts_link(), get_the_term_list(get_the_ID(), 'gallery_category', '', ', '), esc_html($et_gallery_date), et_get_comments_popup_link(__('0 comments', 'Harmony'), __('1 comment', 'Harmony'), '% ' . __('comments', 'Harmony')));
?>
</p>
<?php
$i = 0;
$media = get_post_meta(get_the_ID(), '_et_used_images', true);
$width = (int) apply_filters('et_gallery_image_width', 170);
$height = (int) apply_filters('et_gallery_image_height', 170);
if ($media) {
?>
<div id="et-gallery-images" class="clearfix">
<?php
foreach ((array) $media as $et_media) {
$i++;
if (is_numeric($et_media)) {
示例8: et_pb_blog
function et_pb_blog($atts)
{
extract(shortcode_atts(array('module_id' => '', 'module_class' => '', 'fullwidth' => 'on', 'posts_number' => 10, 'include_categories' => '', 'meta_date' => 'M j, Y', 'show_thumbnail' => 'on', 'show_content' => 'off', 'show_author' => 'on', 'show_date' => 'on', 'show_categories' => 'on', 'show_pagination' => 'on', 'background_layout' => 'light', 'show_more' => 'off'), $atts));
global $paged;
$container_is_closed = false;
if ('on' !== $fullwidth) {
wp_enqueue_script('jquery-masonry-3');
}
$args = array('posts_per_page' => (int) $posts_number);
$et_paged = is_front_page() ? get_query_var('page') : get_query_var('paged');
if (is_front_page()) {
$paged = $et_paged;
}
if ('' !== $include_categories) {
$args['cat'] = $include_categories;
}
if (!is_search()) {
$args['paged'] = $et_paged;
}
ob_start();
query_posts($args);
if (have_posts()) {
while (have_posts()) {
the_post();
$post_format = get_post_format();
$thumb = '';
$width = 'on' === $fullwidth ? 1080 : 400;
$width = (int) apply_filters('et_pb_blog_image_width', $width);
$height = 'on' === $fullwidth ? 675 : 250;
$height = (int) apply_filters('et_pb_blog_image_height', $height);
$classtext = 'on' === $fullwidth ? 'et_pb_post_main_image' : '';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width, $height, $classtext, $titletext, $titletext, false, 'Blogimage');
$thumb = $thumbnail["thumb"];
$no_thumb_class = '' === $thumb || 'off' === $show_thumbnail ? ' et_pb_no_thumb' : '';
if (in_array($post_format, array('video', 'gallery'))) {
$no_thumb_class = '';
}
?>
<article id="post-<?php
the_ID();
?>
" <?php
post_class('et_pb_post' . $no_thumb_class);
?>
>
<?php
et_divi_post_format_content();
if (!in_array($post_format, array('link', 'audio', 'quote'))) {
if ('video' === $post_format && false !== ($first_video = et_get_first_video())) {
printf('<div class="et_main_video_container">
%1$s
</div>', $first_video);
} elseif ('gallery' === $post_format) {
et_gallery_images();
} elseif ('' !== $thumb && 'on' === $show_thumbnail) {
if ('on' !== $fullwidth) {
echo '<div class="et_pb_image_container">';
}
?>
<a href="<?php
the_permalink();
?>
">
<?php
print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height);
?>
</a>
<?php
if ('on' !== $fullwidth) {
echo '</div> <!-- .et_pb_image_container -->';
}
}
}
?>
<?php
if ('off' === $fullwidth || !in_array($post_format, array('link', 'audio', 'quote', 'gallery'))) {
?>
<?php
if (!in_array($post_format, array('link', 'audio'))) {
?>
<h2><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h2>
<?php
}
?>
<?php
if ('on' === $show_author || 'on' === $show_date || 'on' === $show_categories) {
printf('<p class="post-meta">%1$s %2$s %3$s %4$s %5$s</p>', 'on' === $show_author ? sprintf(__('by %s', 'Divi'), et_get_the_author_posts_link()) : '', 'on' === $show_author && 'on' === $show_date ? ' | ' : '', 'on' === $show_date ? sprintf(__('%s', 'Divi'), get_the_date($meta_date)) : '', ('on' === $show_author || 'on' === $show_date) && 'on' === $show_categories ? ' | ' : '', 'on' === $show_categories ? get_the_category_list(', ') : '');
}
if ('on' === $show_content) {
//.........这里部分代码省略.........
示例9: get_the_time
echo get_the_time('M');
?>
<strong><?php
echo get_the_time('d');
?>
</strong></span>
<h2><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h2>
<p class="meta-info"><?php
printf(__('Posted on %1$s by %2$s', 'Flexible'), get_the_time(apply_filters('et_home_post_date_format', 'M j')), et_get_the_author_posts_link());
?>
</p>
<p><?php
truncate_post(180);
?>
</p>
</article> <!-- end .blog-item -->
<?php
}
} else {
?>
<article id="post-0" class="post no-results not-found">
<h2 class="entry-title"><?php
_e('Nothing Found', 'Flexible');
?>
示例10: comments_number
comments_number('0', '1', '%');
?>
</span></span>
</div>
<div class="post-description">
<h2><a href="<?php
echo esc_url($more_link);
?>
"><?php
the_title();
?>
</a></h2>
<p class="post-meta">
<?php
printf(__('Posted by %s on %s', 'Nexus'), et_get_the_author_posts_link(), get_the_time(et_get_option('nexus_date_format', 'M j, Y')));
?>
</p>
</div>
<div class="post-excerpt">
<div class="excerpt-wrap">
<a href="<?php
echo esc_url($more_link);
?>
" class="post-title"><?php
the_title();
?>
</a>
<a href="<?php
echo esc_url($more_link);
示例11: the_permalink
<a href="<?php
the_permalink();
?>
">
<?php
print_thumbnail($thumb, $thumbnail["use_timthumb"], $title, $width, $height);
?>
</a>
</div>
<?php
}
?>
<div class="et-description">
<h2><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h2>
<p class="post-meta">
<?php
printf(__('<span>%s</span>Posted by %s in %s', 'Nexus'), get_the_time('M j'), et_get_the_author_posts_link(), get_the_category_list(', '));
?>
</p>
<p><?php
et_nexus_truncate_post(177);
?>
</p>
</div>
</div>