Which filter/action should I use to serve content for “virtual” files
I think the earliest actions you can hook are muplugins_loaded and plugins_loaded. muplugins_loaded will only fire for Must Use Plugins. Some plugins_loaded pseudo-code: add_action( ‘plugins_loaded’, ‘wpd_plugin_routes’ ); function wpd_plugin_routes() { if( is_a_virtual_file() ){ serve_file(); exit; } } If you want the full WordPress environment, plugins, theme, and authenticated user, right before WordPress parses the request, … Read more