Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter('jnews_module_post_meta_1', function($output, $post){
- $output = '';
- $comment = jnews_get_comments_number($post->ID);
- // author detail
- $author = $post->post_author;
- $author_url = get_author_posts_url($author);
- $author_name = get_the_author_meta('display_name', $author);
- if( jnews_is_review($post->ID) )
- {
- $rating = jnews_generate_rating($post->ID, 'jeg_landing_review');
- $output .=
- "<div class=\"jeg_post_meta\">
- {$rating}
- <div class=\"jeg_meta_author\"><span class=\"by\">" . jnews_return_translation('by', 'jnews', 'by') . "</span> <a href=\"{$author_url}\">{$author_name}</a></div>
- </div>";
- } else {
- $output .=
- "<div class=\"jeg_post_meta\">
- <div class=\"jeg_meta_date\"><a href=\"" . get_the_permalink($post) . "\"><i class=\"fa fa-clock-o\"></i> " . \JNews\Module\Block\Block_1_View::getInstance()->format_date($post) . "</a></div>
- <div class=\"jeg_meta_comment\"><a href=\"" . jnews_get_respond_link($post->ID) . "\" ><i class=\"fa fa-comment-o\"></i> {$comment}</a></div>
- </div>";
- }
- return $output;
- }, null, 2);
- add_filter('jnews_module_post_meta_3', function($output, $post){
- $output = '';
- if(jnews_is_review($post->ID))
- {
- $rating = jnews_generate_rating($post->ID, 'jeg_landing_review');
- $output =
- "<div class=\"jeg_post_meta\">
- {$rating}
- <div class=\"jeg_meta_date\"><a href=\"" . get_the_permalink($post) . "\"><i class=\"fa fa-clock-o\"></i> " . \JNews\Module\Block\Block_1_View::getInstance()->format_date($post) . "</a></div>
- </div>";
- } else {
- // author detail
- $author = $post->post_author;
- $author_url = get_author_posts_url($author);
- $author_name = get_the_author_meta('display_name', $author);
- $output .=
- "<div class=\"jeg_post_meta\">
- <div class=\"jeg_meta_date\"><a href=\"" . get_the_permalink($post) . "\"><i class=\"fa fa-clock-o\"></i> " . \JNews\Module\Block\Block_1_View::getInstance()->format_date($post) . "</a></div>
- </div>";
- }
- return $output;
- }, null, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement