A WordPress install is a bunch of directories and files, but two of them are particular: the file wp-config.php and the directory wp-content/ are personal and don't get overwritten when you upgrade your blog. In WordPress 2.6, they get so personal that you can even move them out of the WordPress root. This must bring a major change to your coding habits.
Plugin coders sometimes need their script to guess the location of their own directory (for example to require() files), or to include wp-config.php to make a file live alone in a WordPressized environment.
Guessing the path of wp-content
WordPress 2.6 allows advanced users to specify the location (physical and URL) of this directory with a constant define, so the directory might not be where it used to be.
What you used to do:
$plugin_path = ABSPATH . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__));
$plugin_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__));
What you will have to do, now that this directory can hide anywhere:
// Pre-2.6 compatibility
if ( !defined('WP_CONTENT_URL') )
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
if ( !defined('WP_CONTENT_DIR') )
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
// Guess the location
$plugin_path = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__));
$plugin_url = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
In WordPress 2.6, constants WP_CONTENT_DIR and WP_CONTENT_URL are either user defined or set in wp-settings.php
Including wp-config.php
In WordPress 2.6 you can either leave wp-config.php in the blog root directory, or move it to the parent folder (which makes sense if this takes this critical file off of the webserver's document root)
What you used to do:
require_once('../../../wp-config.php');
What you must do now:
$root = dirname(dirname(dirname(dirname(__FILE__))));
if (file_exists($root.'/wp-load.php')) {
// WP 2.6
require_once($root.'/wp-load.php');
} else {
// Before 2.6
require_once($root.'/wp-config.php');
}
Basically in WordPress 2.6 the file responsible for loading the environment is, in first instance, wp-load.php in place of the good old wp-config.php.
However, as pointed out by GamerZ in the comments, this still may not work. Why? Because not only the config file may not be there anymore, but the relative path to it may have changed since wp-content might have been moved too.
At this point though, there is no way I can think of to guess the locations of both wp-config and wp-content. To be 100% foolproof, such a "standalone" file needing to include wp-config should be editable so that advanced users moving their wp-content directory could manually edit a location path (the $root variable in the previous example)
Summary
Coders, revisit your old plugins to make sure they won't eventually break on WordPress 2.6 :)