'fcn_chapter', 'no_index' => get_post_meta( $post_id, 'fictioneer_chapter_hidden', true ) ? 1 : 0 ) ); ?>
post_password ) ? 'password' : ''; $title = fictioneer_get_safe_title( $post_id, 'single-chapter' ); $age_rating = get_post_meta( $post_id, 'fictioneer_chapter_rating', true ); $this_breadcrumb = [ $title, get_the_permalink() ]; $story_id = get_post_meta( $post_id, 'fictioneer_chapter_story', true ); $story_data = null; $story_post = null; if ( $story_id && in_array( get_post_status( $story_id ), ['publish', 'private'] ) ) { $story_post = empty( $story_id ) ? null : get_post( $story_id ); } // Story data if ( $story_post ) { $story_data = fictioneer_get_story_data( $story_id, false ); // Does not refresh comment count! $chapter_ids = $story_data['chapter_ids']; $indexed_chapters = $story_data['indexed_chapter_ids'] ?? $chapter_ids; if ( empty( $age_rating ) ) { $age_rating = $story_data['rating']; } } // Chapter navigation $current_index = array_search( $post_id, $indexed_chapters ); $prev_index = $current_index - 1; $next_index = $current_index + 1; // Arguments for hooks and templates/etc. and includes $hook_args = array( 'author' => get_userdata( $post->post_author ), 'story_post' => $story_post, 'story_data' => $story_data, 'chapter_id' => $post_id, 'chapter_title' => $title, 'chapter_password' => $post->post_password, 'password_required' => $password_required, 'chapter_ids' => $chapter_ids, 'indexed_chapter_ids' => $indexed_chapters, 'current_index' => $current_index, 'prev_index' => $prev_index >= 0 ? $prev_index : false, 'next_index' => isset( $indexed_chapters[ $next_index ] ) ? $next_index : false ); ?>
' . $password_note . '
'; } echo '
'; if ( $password_required && get_option( 'fictioneer_show_protected_excerpt' ) ) { echo '

' . fictioneer_get_forced_excerpt( $post_id, 512 ) . '

'; } fictioneer_the_static_content(); echo '
'; ?>
'fcn_chapter', 'post_id' => $post_id, 'breadcrumbs' => array( [fcntr( 'frontpage' ), get_home_url()] ) ); // Add stories list breadcrumb (if set) $stories_page_id = intval( get_option( 'fictioneer_stories_page', -1 ) ?: -1 ); if ( $stories_page_id > 0 ) { $stories_page_title = trim( get_the_title( $stories_page_id ) ); $stories_page_title = empty( $stories_page_title ) ? __( 'Stories', 'fictioneer' ) : $stories_page_title; $footer_args['breadcrumbs'][] = array( $stories_page_title, fictioneer_get_assigned_page_link( 'fictioneer_stories_page' ) ); } // Add story (if set) if ( $story_post ) { $footer_args['breadcrumbs'][] = array( $story_data['title'], get_the_permalink( $story_id ) ); } // Add current breadcrumb $footer_args['breadcrumbs'][] = $this_breadcrumb; // Get footer with breadcrumbs get_footer( null, $footer_args ); ?>