Change comments order query param to corder
This commit is contained in:
parent
fdab283909
commit
e38593981b
@ -21,7 +21,7 @@ if ( post_password_required() ) {
|
||||
$post_id = get_the_ID();
|
||||
$user = wp_get_current_user();
|
||||
$comments_count = get_comments_number();
|
||||
$order = array_intersect( [ strtolower( $_GET['comments-order'] ?? 0 ) ], ['desc', 'asc'] );
|
||||
$order = array_intersect( [ strtolower( $_GET['corder'] ?? 0 ) ], ['desc', 'asc'] );
|
||||
$order = reset( $order ) ?: get_option( 'comment_order' ); // Sanitized
|
||||
$logout_url = fictioneer_get_logout_url( get_permalink() );
|
||||
$is_ajax_comments = get_option( 'fictioneer_enable_ajax_comments' );
|
||||
|
@ -240,7 +240,7 @@ if ( ! function_exists( 'fictioneer_ajax_list_comments' ) ) {
|
||||
function fictioneer_comment_list_args( $parsed_args ) {
|
||||
// Setup
|
||||
$page = get_query_var( 'cpage', 1 );
|
||||
$order = array_intersect( [ strtolower( $_GET['comments-order'] ?? 0 ) ], ['desc', 'asc'] );
|
||||
$order = array_intersect( [ strtolower( $_GET['corder'] ?? 0 ) ], ['desc', 'asc'] );
|
||||
$order = reset( $order ) ?: get_option( 'comment_order' ); // Sanitized
|
||||
|
||||
// Build arguments
|
||||
|
@ -63,7 +63,7 @@ function fcn_getCommentSection(post_id = null, page = null, order = null, scroll
|
||||
'action': 'fictioneer_ajax_get_comment_section',
|
||||
'post_id': post_id ?? fcn_commentSection.dataset.postId,
|
||||
'page': parseInt(page),
|
||||
'order': order ?? fcn_commentSection.dataset.order ?? 0
|
||||
'corder': order ?? fcn_commentSection.dataset.order ?? 0
|
||||
};
|
||||
|
||||
if (fcn_urlParams.commentcode) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user