Code cleanup and remove errant wp_die()
Yikes.
This commit is contained in:
parent
627f2e90a2
commit
affc19f5b8
@ -1801,7 +1801,8 @@ if ( ! function_exists( 'fictioneer_check_comment_disallowed_list' ) ) {
|
||||
|
||||
// Skip empty lines.
|
||||
if ( empty( $word ) ) {
|
||||
continue; }
|
||||
continue;
|
||||
}
|
||||
|
||||
// Do some escaping magic so that '#' chars in the spam words don't break things:
|
||||
$word = preg_quote( $word, '#' );
|
||||
|
@ -329,9 +329,6 @@ function fictioneer_mobile_user_menu() {
|
||||
$bookmarks_link = fictioneer_get_assigned_page_link( 'fictioneer_bookmarks_page' );
|
||||
$bookshelf_link = fictioneer_get_assigned_page_link( 'fictioneer_bookshelf_page' );
|
||||
$discord_link = get_option( 'fictioneer_discord_invite_link' );
|
||||
$can_checkmarks = get_option( 'fictioneer_enable_checkmarks' );
|
||||
$can_follows = get_option( 'fictioneer_enable_follows' );
|
||||
$can_reminders = get_option( 'fictioneer_enable_reminders' );
|
||||
$profile_link = get_edit_profile_url();
|
||||
$profile_page_id = intval( get_option( 'fictioneer_user_profile_page', -1 ) ?: -1 );
|
||||
$output = [];
|
||||
@ -370,7 +367,15 @@ function fictioneer_mobile_user_menu() {
|
||||
);
|
||||
}
|
||||
|
||||
if ( $bookshelf_link && fictioneer_show_auth_content() && ( $can_checkmarks || $can_follows || $can_reminders ) ) {
|
||||
if (
|
||||
$bookshelf_link &&
|
||||
fictioneer_show_auth_content() &&
|
||||
(
|
||||
get_option( 'fictioneer_enable_checkmarks' ) ||
|
||||
get_option( 'fictioneer_enable_follows' ) ||
|
||||
get_option( 'fictioneer_enable_reminders' )
|
||||
)
|
||||
) {
|
||||
$output['bookshelf'] = sprintf(
|
||||
'<a href="%s" rel="noopener noreferrer nofollow"><i class="fa-solid fa-list mobile-menu__item-icon"></i> %s</a>',
|
||||
esc_url( $bookshelf_link ),
|
||||
|
@ -274,7 +274,10 @@ function fictioneer_ajax_get_finished_checkmarks_list() {
|
||||
|
||||
$navigation .= '</li>';
|
||||
} elseif ( $page > 1 ) {
|
||||
$navigation = '<li class="pagination bookshelf-pagination _checkmarks"><button class="page-numbers" data-page="1">' . __('First Page', 'fictioneer') . '</button></li>';
|
||||
$navigation = sprintf(
|
||||
'<li class="pagination bookshelf-pagination _checkmarks"><button class="page-numbers" data-page="1">%s</button></li>',
|
||||
__( 'First Page', 'fictioneer' )
|
||||
);
|
||||
}
|
||||
|
||||
// Send result
|
||||
|
@ -432,7 +432,10 @@ function fictioneer_ajax_get_follows_list() {
|
||||
|
||||
$navigation .= '</li>';
|
||||
} elseif ( $page > 1 ) {
|
||||
$navigation = '<li class="pagination bookshelf-pagination _follows"><button class="page-numbers" data-page="1">' . __('First Page', 'fictioneer') . '</button></li>';
|
||||
$navigation = sprintf(
|
||||
'<li class="pagination bookshelf-pagination _follows"><button class="page-numbers" data-page="1">%s</button></li>',
|
||||
__( 'First Page', 'fictioneer' )
|
||||
);
|
||||
}
|
||||
|
||||
// Send result
|
||||
|
@ -200,8 +200,10 @@ function fictioneer_ajax_get_reminders_list() {
|
||||
|
||||
$navigation .= '</li>';
|
||||
} elseif ( $page > 1 ) {
|
||||
wp_die();
|
||||
$navigation = '<li class="pagination bookshelf-pagination _reminders"><button class="page-numbers" data-page="1">' . __('First Page', 'fictioneer') . '</button></li>';
|
||||
$navigation = sprintf(
|
||||
'<li class="pagination bookshelf-pagination _reminders"><button class="page-numbers" data-page="1">%s</button></li>',
|
||||
__( 'First Page', 'fictioneer' )
|
||||
);
|
||||
}
|
||||
|
||||
// Send result
|
||||
|
Loading…
x
Reference in New Issue
Block a user