Use wp_normalize_path() in plugins_url().

props paulschreiber.
fixes #29058.
Built from https://develop.svn.wordpress.org/trunk@29375


git-svn-id: http://core.svn.wordpress.org/trunk@29153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-08-05 01:31:16 +00:00
parent c49eb0be05
commit e1eab74aa6
2 changed files with 4 additions and 7 deletions

View File

@ -2641,12 +2641,9 @@ function content_url($path = '') {
*/
function plugins_url( $path = '', $plugin = '' ) {
$path = str_replace( '\\' ,'/', $path ); // sanitize for Win32 installs
$path = preg_replace( '|/+|', '/', $path );
$plugin = str_replace( '\\' ,'/', $plugin ); // sanitize for Win32 installs
$plugin = preg_replace( '|/+|', '/', $plugin );
$mu_plugin_dir = str_replace( '\\' ,'/', WPMU_PLUGIN_DIR ); // sanitize for Win32 installs
$mu_plugin_dir = preg_replace( '|/+|', '/', $mu_plugin_dir );
$path = wp_normalize_path( $path );
$plugin = wp_normalize_path( $plugin );
$mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
if ( !empty($plugin) && 0 === strpos($plugin, $mu_plugin_dir) )
$url = WPMU_PLUGIN_URL;

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.0-beta2-20140804';
$wp_version = '4.0-beta2-20140805';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.