/* --- Existing WordPress customizations retained --- */

/* Search shortcode for BB */
function bb_search_shortcode() {
    ob_start();
    FLTheme::nav_search();
    return ob_get_clean();
}
add_shortcode('bb_search','bb_search_shortcode');

/* Custom excerpt length */
function wpdocs_custom_excerpt_length( $length ) {
    return 25;
}
add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );

/* Product back link */
function product_back() {
    global $post;
    $parent_title = get_the_title($post->post_parent);
    $parent_link = get_permalink($post->post_parent);
    echo '  
- ['. $parent_title .']('. $parent_link .')  
';
}
add_shortcode('wpb_products_new', 'product_back');

/* List child pages */
function wpb_list_child_pages() {
    global $post;
    if ( is_page() && $post->post_parent ) {
        $childpages = wp_list_pages(
            'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0'
        );
    } else {
        $childpages = wp_list_pages(
            'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0'
        );
    }

    if ( $childpages ) {
        $string = '  
- ['.get_the_title($post->post_parent).']('.get_permalink($post->post_parent).')  
' .$childpages. '  
 ';
    }

    return isset($string) ? $string : '';
}
add_shortcode('wpb_childpages', 'wpb_list_child_pages');

/* Archive title */
add_filter( 'get_the_archive_title', 'replaceCategoryName');
function replaceCategoryName ($title) {
    return single_cat_title('', false);
}

/* Enqueue scripts */
function enqueue_anaqua_scripts() {
    wp_enqueue_script(
        'anaqua',
        get_stylesheet_directory_uri() . '/js/anaqua.js',
        array('jquery'),
        '1.2.2',
        true
    );
}
add_action('wp_enqueue_scripts','enqueue_anaqua_scripts');

/* ACF options page */
if( function_exists('acf_add_options_page') ) {
    acf_add_options_page(array(
        'page_title' => 'Web Settings',
        'menu_title' => 'Web Settings',
        'menu_slug'  => 'web-settings',
        'capability' => 'edit_posts',
        'redirect'   => false
    ));
}

/* Register menus */
register_nav_menus(array(
    'footer-first'  => __('Footer Software Menu'),
    'footer-second' => __('Footer IP Services'),
    'footer-third'  => __('Footer About'),
    'compliance'    => __('Compliance'),
));

/* ACF JSON paths */
add_filter('acf/settings/save_json', function($path){
    return get_stylesheet_directory() . '/inc/acf-json';
});

add_filter('acf/settings/load_json', function($paths){
    unset($paths[0]);
    $paths[] = get_stylesheet_directory() . '/inc/acf-json';
    return $paths;
});

/* Allow SVG */
add_filter('upload_mimes', function($mimes){
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
});<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//www.anaqua.com/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc>https://www.anaqua.com/page-sitemap.xml</loc>
		<lastmod>2026-05-18T13:33:30+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/resource-sitemap.xml</loc>
		<lastmod>2026-06-02T12:14:52+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/resource-sitemap2.xml</loc>
		<lastmod>2026-06-02T12:14:52+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/testimonial-sitemap.xml</loc>
		<lastmod>2022-03-23T13:23:08+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/category-sitemap.xml</loc>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/post_tag-sitemap.xml</loc>
		<lastmod>2026-05-22T21:21:54+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/resource_organization_type-sitemap.xml</loc>
		<lastmod>2026-05-26T14:17:20+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/resource_topic-sitemap.xml</loc>
		<lastmod>2026-05-26T14:17:20+00:00</lastmod>
	</sitemap>
	<sitemap>
		<loc>https://www.anaqua.com/resource_type-sitemap.xml</loc>
		<lastmod>2026-05-26T14:17:20+00:00</lastmod>
	</sitemap>
</sitemapindex>
<!-- XML Sitemap generated by Yoast SEO -->