🐞 fix: Update to correct year switch navigation bug

This commit is contained in:
Keith Solomon
2025-12-10 11:29:41 -06:00
parent 4ff839b10a
commit 41753acfe4
3 changed files with 80 additions and 33 deletions
+14
View File
@@ -63,6 +63,7 @@ final class AA_Events {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
// Ensure the active theme supports thumbnails for the event post type.
add_action( 'after_setup_theme', array( $this, 'ensure_post_thumbnails_support' ) );
add_filter( 'query_vars', array( $this, 'register_calendar_query_vars' ) );
}
/**
@@ -125,4 +126,17 @@ final class AA_Events {
}
// If theme support is boolean true (all types), nothing to do.
}
/**
* Allow custom AA Events calendar query vars to persist through canonical redirects.
*
* @param array $vars Public query vars.
* @return array
*/
public function register_calendar_query_vars( $vars ) {
$vars[] = 'aa_month';
$vars[] = 'aa_year';
return $vars;
}
}