Alternative_Heap::fix_plugins_url PHP Метод

fix_plugins_url() публичный Метод

When symlinked, the plugins still think they are being run in their realpath. This may cause issues for plugins_url since plugin_basename will not work correctly. Since we can't hook directly there, we'll do it in here.
public fix_plugins_url ( $url, $path = "", $plugin = "" )
    public function fix_plugins_url($url, $path = "", $plugin = "")
    {
        $plugins_dir = WP_PLUGIN_DIR;
        $default_plugins_dir = preg_replace('#' . preg_quote(basename($plugins_dir)) . '#', 'plugins', $plugins_dir);
        $url = preg_replace('#' . preg_quote($plugins_dir) . '#', '', $url);
        $url = preg_replace('#' . preg_quote($default_plugins_dir) . '#', '', $url);
        return $url;
    }