Make WordPress Core


Ignore:
Timestamp:
05/27/2008 05:55:24 PM (18 years ago)
Author:
ryan
Message:

Allow wp-content to exist outside of webroot. Props sambauers. see #6938

File:
1 edited

Legend:

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

    r7488 r7999  
    4040
    4141        $wp_plugins = array ();
    42         $plugin_root = ABSPATH . PLUGINDIR;
     42        $plugin_root = WP_PLUGIN_DIR;
    4343        if( !empty($plugin_folder) )
    4444                $plugin_root .= $plugin_folder;
    … …  
    105105                                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
    106106                        ob_start();
    107                         @include(ABSPATH . PLUGINDIR . '/' . $plugin);
     107                        @include(WP_PLUGIN_DIR . '/' . $plugin);
    108108                        $current[] = $plugin;
    109109                        sort($current);
    … …  
    180180        // plugins.
    181181        foreach ( $check_plugins as $check_plugin ) {
    182                 if ( !file_exists(ABSPATH . PLUGINDIR . '/' . $check_plugin) ) {
     182                if ( !file_exists(WP_PLUGIN_DIR . '/' . $check_plugin) ) {
    183183                        $current = get_option('active_plugins');
    184184                        $key = array_search($check_plugin, $current);
    … …  
    194194        if ( validate_file($plugin) )
    195195                return new WP_Error('plugin_invalid', __('Invalid plugin.'));
    196         if ( ! file_exists(ABSPATH . PLUGINDIR . '/' . $plugin) )
     196        if ( ! file_exists(WP_PLUGIN_DIR . '/' . $plugin) )
    197197                return new WP_Error('plugin_not_found', __('Plugin file does not exist.'));
    198198
Note: See TracChangeset for help on using the changeset viewer.