Make WordPress Core


Ignore:
Timestamp:
02/10/2014 10:59:40 PM (11 years ago)
Author:
nacin
Message:

Detect and handle symlinking of plugins in plugin_basename().

props rmccue, MikeSchinkel, jdgrimes.
see #16953.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r27033 r27158  
    538538            wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error
    539539        ob_start();
    540         include_once(WP_PLUGIN_DIR . '/' . $plugin);
     540        wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
     541        include_once( WP_PLUGIN_DIR . '/' . $plugin );
    541542
    542543        if ( ! $silent ) {
     
    922923
    923924        define('WP_UNINSTALL_PLUGIN', $file);
     925        wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . dirname( $file ) );
    924926        include WP_PLUGIN_DIR . '/' . dirname($file) . '/uninstall.php';
    925927
     
    933935        unset($uninstallable_plugins);
    934936
     937        wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $file );
    935938        include WP_PLUGIN_DIR . '/' . $file;
    936939
Note: See TracChangeset for help on using the changeset viewer.