Make WordPress Core

Changeset 29375


Ignore:
Timestamp:
08/05/2014 01:30:03 AM (11 years ago)
Author:
SergeyBiryukov
Message:

Use wp_normalize_path() in plugins_url().

props paulschreiber.
fixes #29058.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r29248 r29375  
    26422642function plugins_url( $path = '', $plugin = '' ) {
    26432643
    2644     $path = str_replace( '\\' ,'/', $path ); // sanitize for Win32 installs
    2645     $path = preg_replace( '|/+|', '/', $path );
    2646     $plugin = str_replace( '\\' ,'/', $plugin ); // sanitize for Win32 installs
    2647     $plugin = preg_replace( '|/+|', '/', $plugin );
    2648     $mu_plugin_dir = str_replace( '\\' ,'/', WPMU_PLUGIN_DIR ); // sanitize for Win32 installs
    2649     $mu_plugin_dir = preg_replace( '|/+|', '/', $mu_plugin_dir );
     2644    $path = wp_normalize_path( $path );
     2645    $plugin = wp_normalize_path( $plugin );
     2646    $mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
    26502647
    26512648    if ( !empty($plugin) && 0 === strpos($plugin, $mu_plugin_dir) )
Note: See TracChangeset for help on using the changeset viewer.