['fcn_story', 'fcn_chapter', 'fcn_recommendation', 'post'] ) ); $skip_author_keywords = count( $all_authors ) > FICTIONEER_AUTHOR_KEYWORD_SEARCH_LIMIT; $queried_authors_in = $_GET['authors'] ?? 0; $queried_authors_out = $_GET['ex_authors'] ?? 0; $author_name = $_GET['author_name'] ?? 0; // Simple text field $all_tags = get_tags(); $all_genres = get_tags( ['taxonomy' => 'fcn_genre'] ); $all_fandoms = get_tags( ['taxonomy' => 'fcn_fandom'] ); $all_characters = get_tags( ['taxonomy' => 'fcn_character'] ); $all_warnings = get_tags( ['taxonomy' => 'fcn_content_warning'] ); $queried_genres = $_GET['genres'] ?? 0; $queried_fandoms = $_GET['fandoms'] ?? 0; $queried_characters = $_GET['characters'] ?? 0; $queried_warnings = $_GET['warnings'] ?? 0; $queried_tags = $_GET['tags'] ?? 0; $queried_ex_genres = $_GET['ex_genres'] ?? 0; $queried_ex_fandoms = $_GET['ex_fandoms'] ?? 0; $queried_ex_characters = $_GET['ex_characters'] ?? 0; $queried_ex_warnings = $_GET['ex_warnings'] ?? 0; $queried_ex_tags = $_GET['ex_tags'] ?? 0; $is_advanced_search = $post_type != 'any' || $sentence != '0' || $order != 'desc' || $orderby != 'modified'; $is_advanced_search = $is_advanced_search || $queried_tags || $queried_genres || $queried_fandoms || $queried_characters || $queried_warnings; $is_advanced_search = $is_advanced_search || $queried_ex_tags || $queried_ex_genres || $queried_ex_fandoms || $queried_ex_characters || $queried_ex_warnings; $is_advanced_search = $is_advanced_search || $queried_authors_in || $queried_authors_out || $author_name; // Prime author cache if ( function_exists( 'update_post_author_caches' ) ) { update_post_author_caches( $all_authors ); } // Prepare data JSONs $all_terms = array_merge( $all_tags, $all_genres, $all_fandoms, $all_characters, $all_warnings ); $allow_list = []; foreach ( $all_terms as $term ) { $allow_list[ rawurlencode( strtolower( $term->name ) ) ] = $term->term_id; } if ( ! $skip_author_keywords ) { foreach ( $all_authors as $author ) { $allow_list[ rawurlencode( strtolower( $author->display_name ) ) ] = $author->ID; } } } ?>