Make WordPress Core


Ignore:
Timestamp:
03/23/2007 05:45:40 PM (18 years ago)
Author:
ryan
Message:

Allow siteurl and home to be defined as constants in wp-config, bypassing the DB. Props filosofo and charleshooper. fixes #4003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r5087 r5093  
    994994    $installed = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'siteurl'");
    995995    $wpdb->show_errors();
    996     return $installed;
     996
     997    $install_status = !empty( $installed ) ? TRUE : FALSE;
     998    return $install_status;
    997999}
    9981000
     
    13501352<?php
    13511353    die();
     1354}
     1355
     1356function _config_wp_home($url = '') {
     1357    if ( defined( 'WP_HOME' ) )
     1358        return WP_HOME;
     1359    else return $url;
     1360}
     1361
     1362function _config_wp_siteurl($url = '') {
     1363    if ( defined( 'WP_SITEURL' ) )
     1364        return WP_SITEURL;
     1365    else return $url;
    13521366}
    13531367
Note: See TracChangeset for help on using the changeset viewer.