Пример #1
0
/**
 * Page Navigation for Comments. This shows a numbered index or "Older Comments"/"Newer Comments" at the bottom of each page.
 * This file should not be loaded by itself, but should instead be included using get_template_part or locate_template.
 * Users can override this in a child theme.
 *
 * @since 3.8.3
 * @package Suffusion
 * @subpackage Custom
 */
global $suf_cpagination_type, $suf_cpagination_index, $suf_cpagination_prev_next, $suf_cpagination_show_all, $suf_show_track_ping, $suffusion_comment_types;
if ($suf_show_track_ping == 'show' || $suf_show_track_ping == 'hide') {
    $older = __("Older Comments", "suffusion");
    $newer = __("Newer Comments", "suffusion");
} else {
    $comment_type = suffusion_get_comment_type_from_request();
    $type = isset($suffusion_comment_types[$comment_type]) ? $suffusion_comment_types[$comment_type] : $suffusion_comment_types['comment'];
    $older = sprintf(__('Older %1$s', 'suffusion'), $type);
    $newer = sprintf(__('Newer %1$s', 'suffusion'), $type);
}
if ($suf_cpagination_type == 'old-new') {
    ?>
<div class="navigation fix">
	<div class="alignleft"><?php 
    previous_comments_link("&laquo; {$older}");
    ?>
</div>
	<div class="alignright"><?php 
    next_comments_link("{$newer} &raquo;");
    ?>
</div>
Пример #2
0
function suffusion_append_comment_type($link)
{
    global $suf_show_track_ping;
    if ($suf_show_track_ping != "separate") {
        return $link;
    }
    $comment_type = suffusion_get_comment_type_from_request();
    $link = add_query_arg("comment_type", $comment_type, $link);
    return $link;
}