This is the fist time by contributed a full function page on WordPress Codex and listed is on all function page too. I’m very very happy I was able to did it. The WP function wp_normalize_path()
was just introduced on WordPress 3.9
On windows systems, replaces backslashes with forward slashes and forces upper-case drive letters. Ensures that no duplicate slashes exist. Call the functions to normalize a filesystem path. This function is mainly for windows based server, to replaces backslashes with forward slashes, and ensures no duplicate slashes exist.
It’s will be a very useful WP function, without any doubt. Especially for windows local host user and those who have web server OS as Windows Seven
I have Used it on my new theme
Example for this wp function:
$bS_incl_path = get_template_directory() . '/inc'; /** * Define theme include path * * Normalize the include path to be safe on windows hosts * @return string Normalized path * require min WordPress version 3.9 * @since boot_Strap 1.0.1 * */ if(function_exists('wp_normalize_path')){ $bS_incl_path = wp_normalize_path($bS_incl_path); } define('THM_INC', $bS_incl_path); require_once (THM_INC. '/wp_bootstrap_navwalker.php');
The codex function page link is here