WordPress.org

Make WordPress Core

Changeset 28739


Ignore:
Timestamp:
06/11/2014 06:17:52 PM (6 years ago)
Author:
wonderboymusic
Message:

Don't use variable variables in plugins_url().

See #27881.

File:
1 edited

Legend:

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

    r28654 r28739  
    26382638function plugins_url($path = '', $plugin = '') {
    26392639
    2640     $mu_plugin_dir = WPMU_PLUGIN_DIR;
    2641     foreach ( array('path', 'plugin', 'mu_plugin_dir') as $var ) {
    2642         $$var = str_replace('\\' ,'/', $$var); // sanitize for Win32 installs
    2643         $$var = preg_replace('|/+|', '/', $$var);
    2644     }
     2640    $path = str_replace( '\\' ,'/', $path ); // sanitize for Win32 installs
     2641    $path = preg_replace( '|/+|', '/', $path );
     2642    $plugin = str_replace( '\\' ,'/', $plugin ); // sanitize for Win32 installs
     2643    $plugin = preg_replace( '|/+|', '/', $plugin );
     2644    $mu_plugin_dir = str_replace( '\\' ,'/', WPMU_PLUGIN_DIR ); // sanitize for Win32 installs
     2645    $mu_plugin_dir = preg_replace( '|/+|', '/', $mu_plugin_dir );
    26452646
    26462647    if ( !empty($plugin) && 0 === strpos($plugin, $mu_plugin_dir) )
Note: See TracChangeset for help on using the changeset viewer.