public function __construct( $theme_dir,
$theme_root,
$_child = null
) { global $wp_theme_directories;
// Initialize caching on first run.
if ( !
isset( self::
$persistently_cache ) ) { /** This action is documented in wp-includes/theme.php */
self::
$persistently_cache =
apply_filters( 'wp_cache_themes_persistently', false, 'WP_Theme'
);
if ( self::
$persistently_cache ) { wp_cache_add_global_groups( 'themes'
);
if ( is_int( self::
$persistently_cache ) ) { self::
$cache_expiration = self::
$persistently_cache;
} } else { wp_cache_add_non_persistent_groups( 'themes'
);
} } // Handle a numeric theme directory as a string.
$theme_dir =
(string) $theme_dir;