if (is_user_logged_in()) { ?> <p class="edit-post"> <?php edit_post_link(__('Edit post', 'graphene'), ' ( ', ' )'); ?> </p> <?php } ?> <?php /* The comment link */ ?> <?php if (!is_singular() && graphene_should_show_comments()) { ?> <p class="comment-link"> <?php $comments_num = get_comments_number(); comments_popup_link(__('Leave comment', 'graphene'), sprintf(__('%s comment', 'graphene'), number_format_i18n($comments_num)), sprintf(_n('%s comment', "%s comments", $comments_num, 'graphene'), number_format_i18n($comments_num)), 'comments-link', __("Comments off", 'graphene')); ?> </p> <?php } ?> </div> <div class="entry-content clearfix"> <div class="post-format-thumbnail"> <?php if ($post_format == 'status') {
* The template for displaying Comments. * * The area of the page that contains both current comments * and the comment form. The actual display of comments is * handled by a callback to graphene_comment which is * located in the functions.php file. * * @package Graphene * @since Graphene 1.0 */ global $graphene_settings; ?> <?php /* Only show comments depending on the theme setting */ if (!graphene_should_show_comments()) { return; } ?> <?php if (post_password_required() && (comments_open() || have_comments())) { ?> <div id="comments"> <p class="nopassword message-block notice_block"><?php _e('This post is password protected. Enter the password to view any comments.', 'graphene'); ?> </p> <?php do_action('graphene_protected_comment');
/** * Localize scripts and add JavaScript data * * @package Graphene * @since 1.9 */ function graphene_localize_scripts() { global $graphene_settings, $wp_query; $posts_per_page = $wp_query->get('posts_per_page'); $comments_per_page = get_option('comments_per_page'); $js_object = array('templateUrl' => GRAPHENE_ROOTURI, 'isSingular' => is_singular(), 'shouldShowComments' => graphene_should_show_comments(), 'commentsOrder' => get_option('default_comments_page'), 'sliderDisable' => $graphene_settings['slider_disable'], 'sliderAnimation' => $graphene_settings['slider_animation'], 'sliderTransSpeed' => $graphene_settings['slider_trans_speed'], 'sliderInterval' => $graphene_settings['slider_speed'], 'sliderDisplay' => $graphene_settings['slider_display_style'], 'infScroll' => $graphene_settings['inf_scroll_enable'], 'infScrollClick' => $graphene_settings['inf_scroll_click'], 'infScrollComments' => $graphene_settings['inf_scroll_comments'], 'totalPosts' => $wp_query->found_posts, 'postsPerPage' => $posts_per_page, 'isPageNavi' => function_exists('wp_pagenavi'), 'infScrollMsgText' => sprintf(__('Fetching %1$s more item from %2$s left ...', 'graphene'), 'window.grapheneInfScrollItemsPerPage', 'window.grapheneInfScrollItemsLeft'), 'infScrollMsgTextPlural' => sprintf(_n('Fetching %1$s more item from %2$s left ...', 'Fetching %1$s more items from %2$s left ...', $posts_per_page, 'graphene'), 'window.grapheneInfScrollItemsPerPage', 'window.grapheneInfScrollItemsLeft'), 'infScrollFinishedText' => __('No more items to fetch', 'graphene'), 'commentsPerPage' => $comments_per_page, 'totalComments' => graphene_get_comment_count('comments', true, true), 'infScrollCommentsMsg' => sprintf(__('Fetching %1$s more top level comment from %2$s left ...', 'graphene'), 'window.grapheneInfScrollCommentsPerPage', 'window.grapheneInfScrollCommentsLeft'), 'infScrollCommentsMsgPlural' => sprintf(_n('Fetching %1$s more top level comment from %2$s left ...', 'Fetching %1$s more top level comments from %2$s left ...', $comments_per_page, 'graphene'), 'window.grapheneInfScrollCommentsPerPage', 'window.grapheneInfScrollCommentsLeft'), 'infScrollCommentsFinishedMsg' => __('No more comments to fetch', 'graphene')); wp_localize_script('graphene-js', 'grapheneJS', apply_filters('graphene_js_object', $js_object)); }
<?php /** * Display AddThis social sharing button if single post page, comments popup link otherwise. * See the graphene_addthis() function in functions.php */ ?> <?php if (is_single() || is_page()) { ?> <?php if (stripos($graphene_settings['addthis_location'], 'bottom') !== false) { graphene_addthis(get_the_ID()); } ?> <?php } elseif ($graphene_settings['hide_post_commentcount'] != true && comments_open() && graphene_should_show_comments()) { ?> <p class="comment-link"><?php comments_popup_link(__('Leave comment', 'graphene'), __('1 comment', 'graphene'), __("% comments", 'graphene')); ?> </p> <?php } ?> <?php do_action('graphene_post_footer'); ?> </div> </div> </div>