Skip to content

Commit dee392b

Browse files
committed
UPD: avoid unnecessary includes in customizer module
1 parent 00ea223 commit dee392b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/cherry-customizer/cherry-customizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ public function read_font_file( $file ) {
988988
public function file_exists( $file ) {
989989

990990
if ( ! function_exists( 'WP_Filesystem' ) ) {
991-
include_once( ABSPATH . '/wp-admin/includes/file.php' );
991+
return file_exists( $file );
992992
}
993993

994994
WP_Filesystem();
@@ -1013,7 +1013,7 @@ public function file_exists( $file ) {
10131013
public function get_file( $file ) {
10141014

10151015
if ( ! function_exists( 'WP_Filesystem' ) ) {
1016-
include_once( ABSPATH . '/wp-admin/includes/file.php' );
1016+
return Cherry_Toolkit::get_file( $file );
10171017
}
10181018

10191019
WP_Filesystem();

0 commit comments

Comments
 (0)