File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ function cs_get_path_locate() {
24
24
25
25
$ dirname = wp_normalize_path ( dirname ( __FILE__ ) );
26
26
$ 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 ;
28
28
$ directory = ( $ located_plugin ) ? $ plugin_dir : get_template_directory ();
29
29
$ directory_uri = ( $ located_plugin ) ? WP_PLUGIN_URL : get_template_directory_uri ();
30
30
$ basename = str_replace ( wp_normalize_path ( $ directory ), '' , $ dirname );
@@ -68,7 +68,7 @@ function cs_locate_template( $template_name ) {
68
68
69
69
$ located = '' ;
70
70
$ override = apply_filters ( 'cs_framework_override ' , 'cs-framework-override ' );
71
- $ dir_plugin = WP_PLUGIN_DIR ;
71
+ $ dir_plugin = wp_normalize_path ( WP_PLUGIN_DIR ) ;
72
72
$ dir_theme = get_template_directory ();
73
73
$ dir_child = get_stylesheet_directory ();
74
74
$ dir_override = '/ ' . $ override .'/ ' . $ template_name ;
You can’t perform that action at this time.
0 commit comments