Skip to content

Commit 168d562

Browse files
committed
Remove function_exists check
1 parent 06379c6 commit 168d562

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/WP_CLI/CommandWithTranslation.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,12 @@ protected function get_formatter( &$assoc_args ) {
443443
/**
444444
* Clears the translation files cache for a given directory.
445445
*
446+
* As of WP 6.5, the presence of .mo and .l10n.php files is cached.
447+
*
446448
* @param string $dir The directory to clear the cache for.
447449
*/
448450
protected function clear_translation_files_cache( $dir ) {
449-
// As of WP 6.5, the presence of .mo and .l10n.php files is cached.
450-
if ( function_exists( 'wp_cache_delete' ) ) {
451-
$path = rtrim( $dir, '/' ) . '/';
452-
wp_cache_delete( md5( $path ), 'translation_files' );
453-
}
451+
$path = rtrim( $dir, '/' ) . '/';
452+
wp_cache_delete( md5( $path ), 'translation_files' );
454453
}
455454
}

0 commit comments

Comments
 (0)