Skip to content

Commit 0fd59bb

Browse files
committed
Remove method
1 parent 9b5092b commit 0fd59bb

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

‎src/Theme_Cache_Command.php‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function clear( $args, $assoc_args ) {
7272

7373
$cleared = 0;
7474
foreach ( $themes as $theme ) {
75-
$this->clear_theme_cache( $theme );
75+
$theme->cache_delete();
7676
++$cleared;
7777
}
7878

@@ -107,20 +107,11 @@ public function flush( $args, $assoc_args ) {
107107
if ( function_exists( 'wp_get_themes' ) ) {
108108
$all_themes = wp_get_themes();
109109
foreach ( $all_themes as $theme ) {
110-
$this->clear_theme_cache( $theme );
110+
$theme->cache_delete();
111111
}
112112
WP_CLI::success( 'The theme cache was flushed.' );
113113
} else {
114114
WP_CLI::warning( 'Your WordPress version does not support flushing the theme cache group.' );
115115
}
116116
}
117-
118-
/**
119-
* Clear cache for a specific theme.
120-
*
121-
* @param \WP_Theme $theme Theme object.
122-
*/
123-
private function clear_theme_cache( $theme ) {
124-
$theme->cache_delete();
125-
}
126117
}

0 commit comments

Comments
 (0)