Random Post: 2. Iron Man - $31.8M
RSS .92| RSS 2.0| ATOM 0.3
  • Home
  • Contact Us
  • deviantART
  • Newsletter
  • Online Booking
  • Registration
  • Tell A Friend
  •  

    wordpress relative url

    edit wp-includes/functions.php

    --
    function get_option( $setting ) {
    	global $wpdb;
    
    	if (in_array($setting, array('siteurl', 'home'))) {
    		if (ereg('(wp-includes)', $_SERVER['PHP_SELF'], $r)) {
    			return (’http://’.$_SERVER['SERVER_NAME'].(
    				substr(
    					$_SERVER['PHP_SELF'], 0,
    					strpos($_SERVER['PHP_SELF'], $r[0])
    				)
    			));
    		} else if (ereg(’wp-admin’, $_SERVER['PHP_SELF'])) {
    			return ‘http://’.$_SERVER['SERVER_NAME']
    			. dirname(dirname($_SERVER['PHP_SELF']));
    		} else {
    			$_SERVER_PHP_SELF = $_SERVER['PHP_SELF'];
    			$_SERVER_SCRIPT_FILENAME = $_SERVER['SCRIPT_FILENAME'];
    			while ($_SERVER_SCRIPT_FILENAME = dirname($_SERVER_SCRIPT_FILENAME)) {
    				$_SERVER_PHP_SELF = dirname($_SERVER_PHP_SELF);
    				if (file_exists($_SERVER_SCRIPT_FILENAME.’/wp-content’)) {
    					break;
    				}
    				if ($_SERVER_SCRIPT_FILENAME == ‘.’) break;
    			}
    			return ‘http://’.$_SERVER['SERVER_NAME'].$_SERVER_PHP_SELF;
    		}
    	}
    –

    Comments are closed.

    Rudy Cahayadi is Digg proof thanks to caching by WP Super Cache!