WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/27/2008 05:55:24 PM (14 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/upgrade.php

    r7936 r7999  
    11<?php
    22
    3 if ( file_exists(ABSPATH . 'wp-content/install.php') )
    4     require (ABSPATH . 'wp-content/install.php');
     3if ( file_exists(WP_CONTENT_DIR . '/install.php') )
     4    require (WP_CONTENT_DIR . '/install.php');
    55require_once(ABSPATH . 'wp-admin/includes/admin.php');
    66require_once(ABSPATH . 'wp-admin/includes/schema.php');
     
    10871087function make_site_theme_from_oldschool($theme_name, $template) {
    10881088    $home_path = get_home_path();
    1089     $site_dir = ABSPATH . "wp-content/themes/$template";
     1089    $site_dir = WP_CONTENT_DIR . "/themes/$template";
    10901090
    10911091    if (! file_exists("$home_path/index.php"))
     
    11061106            $index = implode('', file("$oldpath/$oldfile"));
    11071107            if (strpos($index, 'WP_USE_THEMES') !== false) {
    1108                 if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile"))
     1108                if (! @copy(WP_CONTENT_DIR . '/themes/default/index.php', "$site_dir/$newfile"))
    11091109                    return false;
    11101110                continue; // Don't copy anything
     
    11541154
    11551155function make_site_theme_from_default($theme_name, $template) {
    1156     $site_dir = ABSPATH . "wp-content/themes/$template";
    1157     $default_dir = ABSPATH . 'wp-content/themes/default';
     1156    $site_dir = WP_CONTENT_DIR . "/themes/$template";
     1157    $default_dir = WP_CONTENT_DIR . '/themes/default';
    11581158
    11591159    // Copy files from the default theme to the site theme.
     
    12121212    $theme_name = __get_option('blogname');
    12131213    $template = sanitize_title($theme_name);
    1214     $site_dir = ABSPATH . "wp-content/themes/$template";
     1214    $site_dir = WP_CONTENT_DIR . "/themes/$template";
    12151215
    12161216    // If the theme already exists, nothing to do.
     
    12201220
    12211221    // We must be able to write to the themes dir.
    1222     if (! is_writable(ABSPATH . "wp-content/themes")) {
     1222    if (! is_writable(WP_CONTENT_DIR . "/themes")) {
    12231223        return false;
    12241224    }
Note: See TracChangeset for help on using the changeset viewer.