├── readme.txt └── static-404.php /readme.txt: -------------------------------------------------------------------------------- 1 | === Static 404 === 2 | Contributors: bradparbs, surfboards 3 | Tags: performance, 404, errors 4 | Requires at least: 5.2 5 | Tested up to: 6.6 6 | Stable tag: 1.1.0 7 | License: GPLv2 or later 8 | Requires PHP: 5.6 9 | 10 | A WordPress plugin to quickly send a 404 for missing static files. 11 | 12 | == Description == 13 | 14 | Quickly output a 404 for static files that aren't found, rather than loading the normal 404 page. 15 | 16 | Any static files ( images, text, pdfs, etc ) that don't exist will 404 as soon as possible, rather than loading the entire WordPress application. 17 | 18 | == Availiable filters == 19 | 20 | By default, the list of extensions to check are the results of `wp_get_ext_types`, but can be filtered with `static_404_extensions`. 21 | 22 | The output is a static page with the text `404 Not Found`, this text can be edited by filtering `static_404_message`. 23 | 24 | A 404 status code will be used, but can be filtered with `static_404_response_code`. 25 | 26 | Passing true to `static_404_should_process_request` will short-circuit and skip processing the request. This filter gets passed the current request. 27 | 28 | 29 | == Installation == 30 | 31 | - Install the plugin. 32 | - Magically have faster and less expensive 404s! 33 | 34 | 35 | == Changelog == 36 | 37 | = 1.1.0 = 38 | * Added more filters 39 | 40 | = 1.0.3 = 41 | * Initial release 42 | -------------------------------------------------------------------------------- /static-404.php: -------------------------------------------------------------------------------- 1 |