Skip to content

Commit 6fba682

Browse files
committed
improves for windows server includes
1 parent e6e56e9 commit 6fba682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cs-framework-path.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function cs_get_path_locate() {
2424

2525
$dirname = wp_normalize_path( dirname( __FILE__ ) );
2626
$plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
27-
$located_plugin = ( preg_match( '#'. $plugin_dir .'#', $dirname ) ) ? true : false;
27+
$located_plugin = ( preg_match( '#'. sanitize_file_name( $plugin_dir ) .'#', sanitize_file_name( $dirname ) ) ) ? true : false;
2828
$directory = ( $located_plugin ) ? $plugin_dir : get_template_directory();
2929
$directory_uri = ( $located_plugin ) ? WP_PLUGIN_URL : get_template_directory_uri();
3030
$basename = str_replace( wp_normalize_path( $directory ), '', $dirname );
@@ -68,7 +68,7 @@ function cs_locate_template( $template_name ) {
6868

6969
$located = '';
7070
$override = apply_filters( 'cs_framework_override', 'cs-framework-override' );
71-
$dir_plugin = WP_PLUGIN_DIR;
71+
$dir_plugin = wp_normalize_path( WP_PLUGIN_DIR );
7272
$dir_theme = get_template_directory();
7373
$dir_child = get_stylesheet_directory();
7474
$dir_override = '/'. $override .'/'. $template_name;

0 commit comments

Comments
 (0)