mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Use wp_normalize_path() in plugins_url().
props paulschreiber. fixes #29058. git-svn-id: https://develop.svn.wordpress.org/trunk@29375 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
587a0bc96d
commit
508bdec5bd
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user