Don't use variable variables in plugins_url()
.
See #27881. git-svn-id: https://develop.svn.wordpress.org/trunk@28739 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ce8cff84aa
commit
35af75077b
@ -2637,11 +2637,12 @@ function content_url($path = '') {
|
|||||||
*/
|
*/
|
||||||
function plugins_url($path = '', $plugin = '') {
|
function plugins_url($path = '', $plugin = '') {
|
||||||
|
|
||||||
$mu_plugin_dir = WPMU_PLUGIN_DIR;
|
$path = str_replace( '\\' ,'/', $path ); // sanitize for Win32 installs
|
||||||
foreach ( array('path', 'plugin', 'mu_plugin_dir') as $var ) {
|
$path = preg_replace( '|/+|', '/', $path );
|
||||||
$$var = str_replace('\\' ,'/', $$var); // sanitize for Win32 installs
|
$plugin = str_replace( '\\' ,'/', $plugin ); // sanitize for Win32 installs
|
||||||
$$var = preg_replace('|/+|', '/', $$var);
|
$plugin = preg_replace( '|/+|', '/', $plugin );
|
||||||
}
|
$mu_plugin_dir = str_replace( '\\' ,'/', WPMU_PLUGIN_DIR ); // sanitize for Win32 installs
|
||||||
|
$mu_plugin_dir = preg_replace( '|/+|', '/', $mu_plugin_dir );
|
||||||
|
|
||||||
if ( !empty($plugin) && 0 === strpos($plugin, $mu_plugin_dir) )
|
if ( !empty($plugin) && 0 === strpos($plugin, $mu_plugin_dir) )
|
||||||
$url = WPMU_PLUGIN_URL;
|
$url = WPMU_PLUGIN_URL;
|
||||||
|
Loading…
Reference in New Issue
Block a user