Skip to content

Instantly share code, notes, and snippets.

View 123xylem's full-sized avatar

Chris Cullen 123xylem

View GitHub Profile
@westonruter
westonruter / wp-42573.php
Last active June 14, 2024 18:17
WP Trac #42573: Fix for theme template caching. https://core.trac.wordpress.org/ticket/42573
<?php
/**
* Plugin name: WP Trac #42573: Fix for theme template file caching.
* Description: Flush the theme file cache each time the admin screens are loaded which uses the file list.
* Plugin URI: https://core.trac.wordpress.org/ticket/42573
* Author: Weston Ruter, XWP.
* Author URI: https://weston.ruter.net
*/
function wp_42573_fix_template_caching( WP_Screen $current_screen ) {