Changeset 11069
- Timestamp:
- 04/23/2009 08:16:06 AM (16 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r11062 r11069 1776 1776 function plugins_url($path = '', $plugin = '') { 1777 1777 $scheme = ( is_ssl() ? 'https' : 'http' ); 1778 $url = WP_PLUGIN_URL; 1778 1779 if ( $plugin !== '' && preg_match('#^' . preg_quote(WPMU_PLUGIN_DIR . DIRECTORY_SEPARATOR, '#') . '#', $plugin) ) { 1780 $url = WPMU_PLUGIN_URL; 1781 } else { 1782 $url = WP_PLUGIN_URL; 1783 } 1784 1779 1785 if ( 0 === strpos($url, 'http') ) { 1780 1786 if ( is_ssl() ) … … 1782 1788 } 1783 1789 1784 if ( !empty($plugin) && is_string($plugin) ) 1785 { 1790 if ( !empty($plugin) && is_string($plugin) ) { 1786 1791 $folder = dirname(plugin_basename($plugin)); 1787 1792 if ('.' != $folder) -
trunk/wp-includes/plugin.php
r10765 r11069 493 493 $plugin_dir = str_replace('\\','/',WP_PLUGIN_DIR); // sanitize for Win32 installs 494 494 $plugin_dir = preg_replace('|/+|','/', $plugin_dir); // remove any duplicate slash 495 $file = preg_replace('|^' . preg_quote($plugin_dir, '|') . '/|','',$file); // get relative path from plugins dir 495 $mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs 496 $mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash 497 $file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir 496 498 return $file; 497 499 }
Note: See TracChangeset
for help on using the changeset viewer.