Fix unlisted chapters appearing in chapter index popup

This commit is contained in:
Tetrakern 2024-09-04 13:53:41 +02:00
parent ac15e58402
commit 4337659a31

View File

@ -1286,7 +1286,10 @@ if ( ! function_exists( 'fictioneer_get_chapter_list_items' ) ) {
// Loop chapters...
foreach ( $chapters as $chapter ) {
// Skip unpublished (in case of filtered query params)
if ( $chapter->post_status !== 'publish' ) {
if (
$chapter->post_status !== 'publish' ||
get_post_meta( $chapter->ID, 'fictioneer_chapter_hidden', true )
) {
continue;
}