Closed grappler closed 8 years ago
Fixed by https://github.com/Rarst/fragment-cache/commit/f03a27978cad646f2bed6d025933d24c4c2f15d1
Careful with filter since it will fire twice "inside" and "outside" the cache. Not yet sure if it can be handled smoothly with arbitrary amount of things possibly hooked, but it should be pretty rare use case.
Thanks! I have implemented the update on https://wpzoo.ch/en/
Problem: I am currently adding the language switcher in the menu using
wp_nav_menu_items
. When I activate this plugin logically the URL stops changing.I was looking for a way I could hook in after the cache was fetched but I could not find a way.
WordPress 3.9 introduced a new filter
pre_wp_nav_menu
that can be used to short-circuit the menu process. https://generatewp.com/how-to-use-transients-to-speed-up-wordpress-menus/If you used the new filter then I could hook into it after the cache was fetched and add the language switcher.