summaryrefslogtreecommitdiffstats
path: root/wp-admin
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin')
-rw-r--r--wp-admin/admin-header.php2
-rw-r--r--wp-admin/gears-manifest.php8
-rw-r--r--wp-admin/includes/media.php31
-rw-r--r--wp-admin/includes/misc.php2
-rw-r--r--wp-admin/includes/post.php3
-rw-r--r--wp-admin/includes/template.php3
-rw-r--r--wp-admin/js/editor.js4
-rw-r--r--wp-admin/js/media-upload.js3
-rw-r--r--wp-admin/plugins.php31
-rw-r--r--wp-admin/press-this.php27
-rw-r--r--wp-admin/setup-config.php3
11 files changed, 79 insertions, 38 deletions
diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php
index bfd0533..a65108a 100644
--- a/wp-admin/admin-header.php
+++ b/wp-admin/admin-header.php
@@ -70,7 +70,7 @@ unset($hook_suffixes, $hook_suffix);
<div id="wpwrap">
<div id="wpcontent">
<div id="wphead">
-<h1><?php if ( '' == get_bloginfo('name') ) echo '&nbsp;'; else echo get_bloginfo('name'); ?><span id="viewsite"><a href="<?php echo trailingslashit( get_option('home') ); ?>"><?php _e('Visit Site') ?></a></span></h1>
+<h1><?php if ( '' == get_bloginfo('name', 'display') ) echo '&nbsp;'; else echo get_bloginfo('name', 'display'); ?><span id="viewsite"><a href="<?php echo trailingslashit( get_option('home') ); ?>"><?php _e('Visit Site') ?></a></span></h1>
</div>
<?php
diff --git a/wp-admin/gears-manifest.php b/wp-admin/gears-manifest.php
index a6236f8..c8ea433 100644
--- a/wp-admin/gears-manifest.php
+++ b/wp-admin/gears-manifest.php
@@ -64,7 +64,7 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
?>
{
"betaManifestVersion" : 1,
-"version" : "<?php echo $man_version; ?>_20080626",
+"version" : "<?php echo $man_version; ?>_20080703",
"entries" : [
<?php echo $defaults; ?>
@@ -191,5 +191,9 @@ header( 'Content-Type: application/x-javascript; charset=UTF-8' );
{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/toolbars.gif" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/img/image.png" },
{ "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/img/delete.png" },
-{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/help.gif" }
+{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/help.gif" },
+{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/image.gif" },
+{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/media.gif" },
+{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/video.gif" },
+{ "url" : "../wp-includes/js/tinymce/plugins/wordpress/img/audio.gif" }
]}
diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 99f2bbd..a79944a 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -62,6 +62,25 @@ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = fal
return $html;
}
+function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) {
+
+ if ( empty($alt) ) return $html;
+ $id = ( 0 < (int) $id ) ? 'attachment_' . $id : '';
+
+ preg_match( '/width="([0-9]+)/', $html, $matches );
+ if ( ! isset($matches[1]) ) return $html;
+ $width = $matches[1];
+
+ $html = preg_replace( '/align[^\s\'"]+\s?/', '', $html );
+ if ( empty($align) ) $align = 'none';
+
+ $shcode = '[wp_caption id="' . $id . '" align="align' . $align
+ . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/wp_caption]';
+
+ return apply_filters( 'image_add_caption_shortcode', $shcode, $html );
+}
+add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 );
+
function media_send_to_editor($html) {
?>
<script type="text/javascript">
@@ -212,10 +231,10 @@ function media_buttons() {
$audio_title = __('Add Audio');
$out = <<<EOF
- <a href="{$image_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>
- <a href="{$video_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>
- <a href="{$audio_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>
- <a href="{$media_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
+ <a href="{$image_upload_iframe_src}&amp;TB_iframe=true" id="add_image" class="thickbox" title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>
+ <a href="{$video_upload_iframe_src}&amp;TB_iframe=true" id="add_video" class="thickbox" title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>
+ <a href="{$audio_upload_iframe_src}&amp;TB_iframe=true" id="add_audio" class="thickbox" title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>
+ <a href="{$media_upload_iframe_src}&amp;TB_iframe=true" id="add_media" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
EOF;
printf($context, $out);
@@ -321,10 +340,8 @@ function media_sideload_image($file, $post_id, $desc = null) {
$id = media_handle_sideload($file_array, $post_id, $desc);
$src = $id;
- unset($file_array);
-
if ( is_wp_error($id) ) {
- $errors['upload_error'] = $id;
+ @unlink($file_array['tmp_name']);
return $id;
}
}
diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php
index 1d81bf8..7e1e75f 100644
--- a/wp-admin/includes/misc.php
+++ b/wp-admin/includes/misc.php
@@ -68,7 +68,7 @@ function insert_with_markers( $filename, $marker, $insertion ) {
}
}
if (!$foundit) {
- fwrite( $f, "# BEGIN {$marker}\n" );
+ fwrite( $f, "\n# BEGIN {$marker}\n" );
foreach ( $insertion as $insertline )
fwrite( $f, "{$insertline}\n" );
fwrite( $f, "# END {$marker}\n" );
diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php
index f98b9de..a34aeab 100644
--- a/wp-admin/includes/post.php
+++ b/wp-admin/includes/post.php
@@ -93,7 +93,10 @@ function _wp_translate_postdata( $update = false ) {
$hh = $_POST['hh'];
$mn = $_POST['mn'];
$ss = $_POST['ss'];
+ $aa = ($aa <= 0 ) ? date('Y') : $aa;
+ $mm = ($mm <= 0 ) ? date('n') : $mm;
$jj = ($jj > 31 ) ? 31 : $jj;
+ $jj = ($jj <= 0 ) ? date('j') : $jj;
$hh = ($hh > 23 ) ? $hh -24 : $hh;
$mn = ($mn > 59 ) ? $mn -60 : $mn;
$ss = ($ss > 59 ) ? $ss -60 : $ss;
diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php
index 346fe7e..bde13d0 100644
--- a/wp-admin/includes/template.php
+++ b/wp-admin/includes/template.php
@@ -767,6 +767,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
$actions = array();
+ if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';
@@ -779,9 +780,9 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true
unset($actions['approve']);
}
- if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1' title='" . __( 'Mark this comment as spam' ) . "'>" . __( 'Spam' ) . '</a> | ';
$actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID delete'>" . __('Delete') . '</a>';
+ $actions = apply_filters( 'comment_row_actions', $actions, $comment );
foreach ( $actions as $action => $link )
echo "<span class='$action'>$link</span>";
}
diff --git a/wp-admin/js/editor.js b/wp-admin/js/editor.js
index 50955c7..d2049e4 100644
--- a/wp-admin/js/editor.js
+++ b/wp-admin/js/editor.js
@@ -52,6 +52,7 @@ switchEditors = {
// Fix some block element newline issues
content = content.replace(new RegExp('\\s*<div', 'mg'), '\n<div');
content = content.replace(new RegExp('</div>\\s*', 'mg'), '</div>\n');
+ content = content.replace(new RegExp('\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*', 'gi'), '\n\n[wp_caption$1[/wp_caption]\n\n');
var blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
@@ -69,7 +70,7 @@ switchEditors = {
// Trim whitespace
content = content.replace(new RegExp('^\\s*', ''), '');
- content = content.replace(new RegExp('\\s*$', ''), '');
+ content = content.replace(new RegExp('[\\s\\u00a0]*$', ''), '');
// put back the line breaks in pre|script
content = content.replace(/<wp_temp>/g, '\n');
@@ -164,6 +165,7 @@ switchEditors = {
pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "<br />\n");
pee = pee.replace(new RegExp('(</?(?:'+blocklist+')[^>]*>)\\s*<br />', 'gi'), "$1");
pee = pee.replace(new RegExp('<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)', 'gi'), '$1');
+ pee = pee.replace(new RegExp('(?:<p>|<br ?/?>)*\\s*\\[wp_caption([^\\[]+)\\[/wp_caption\\]\\s*(?:</p>|<br ?/?>)*', 'gi'), '[wp_caption$1[/wp_caption]');
// pee = pee.replace(new RegExp('^((?:&nbsp;)*)\\s', 'mg'), '$1&nbsp;');
// Fix the pre|script tags
diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js
index 99acd26..3a034ac 100644
--- a/wp-admin/js/media-upload.js
+++ b/wp-admin/js/media-upload.js
@@ -5,6 +5,9 @@ function send_to_editor(h) {
if (tinymce.isIE)
ed.selection.moveToBookmark(tinymce.EditorManager.activeEditor.windowManager.bookmark);
+ if ( h.indexOf('[wp_caption') != -1 )
+ h = ed.plugins.wpeditimage._do_shcode(h);
+
ed.execCommand('mceInsertContent', false, h);
} else
edInsertContent(edCanvas, h);
diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php
index ee5d101..00742d1 100644
--- a/wp-admin/plugins.php
+++ b/wp-admin/plugins.php
@@ -9,7 +9,7 @@ if( $menu_perms[ 'plugins' ] != 1 )
return;
$action = '';
-foreach( array('activate-selected', 'deactivate-selected', 'delete-selected') as $action_key ) {
+foreach( array('activate-selected', 'deactivate-selected', 'delete-selected', 'clear-recent-list') as $action_key ) {
if( isset($_POST[$action_key]) ) {
$action = $action_key;
break;
@@ -156,11 +156,13 @@ if( !empty($action) ) {
<?php
require_once('admin-footer.php');
exit;
- }
- //$delete_result = delete_plugins($plugins);
+ } //Endif verify-delete
+ $delete_result = delete_plugins($plugins);
wp_cache_delete('plugins', 'plugins');
-
+ break;
+ case 'clear-recent-list':
+ update_option('recently_activated', array());
break;
}
}
@@ -204,8 +206,9 @@ validate_active_plugins();
<p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p>
<?php
+$all_plugins = apply_filters( 'all_plugins', get_plugins() );
$active_plugins = array();
-$available_plugins = array();
+$inactive_plugins = array();
$recent_plugins = array();
$recently_activated = (array)get_option('recently_activated');
@@ -216,8 +219,6 @@ foreach( $recently_activated as $key => $time )
if( $recently_activated != get_option('recently_activated') ) //If array changed, update it.
update_option('recently_activated', $recently_activated);
-$all_plugins = apply_filters( 'all_plugins', get_plugins() );
-
$plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
foreach( (array)$all_plugins as $plugin_file => $plugin_data) {
@@ -230,13 +231,14 @@ foreach( (array)$all_plugins as $plugin_file => $plugin_data) {
if( ! empty($plugin_data['Author']) )
$plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>';
+ //Filter into individual sections
if ( is_plugin_active($plugin_file) ) {
$active_plugins[ $plugin_file ] = $plugin_data;
} else {
if ( isset( $recently_activated[ $plugin_file ] ) ) //Was the plugin recently activated?
$recent_plugins[ $plugin_file ] = $plugin_data;
else
- $available_plugins[ $plugin_file ] = $plugin_data;
+ $inactive_plugins[ $plugin_file ] = $plugin_data;
}
}
@@ -296,6 +298,7 @@ function print_plugins_table($plugins, $context = '') {
} //End print_plugins_table()
?>
+<?php if ( ! empty($active_plugins) ) : ?>
<h3 id="currently-active"><?php _e('Currently Active Plugins') ?></h3>
<form method="post" action="<?php echo admin_url('plugins.php') ?>">
<?php wp_nonce_field('bulk-manage-plugins') ?>
@@ -310,9 +313,11 @@ function print_plugins_table($plugins, $context = '') {
</form>
<p><?php printf(__('If something goes wrong with a plugin and you can&#8217;t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), WP_PLUGIN_DIR); ?></p>
+<?php endif; ?>
<?php if ( ! empty($recent_plugins) ) : ?>
<h3 id="recent-plugins"><?php _e('Recently Active Plugins') ?></h3>
+<p><?php _e('The following plugins were recently active. When a plugin has been inactive for more than 7 days it will be moved to the Inactive plugin list.') ?></p>
<form method="post" action="<?php echo admin_url('plugins.php') ?>">
<?php wp_nonce_field('bulk-manage-plugins') ?>
@@ -326,20 +331,24 @@ function print_plugins_table($plugins, $context = '') {
</form>
<?php endif; ?>
-<h3 id="available-plugins"><?php _e('Available Plugins') ?></h3>
+<?php if ( ! empty($inactive_plugins) ) : ?>
+<h3 id="inactive-plugins"><?php _e('Inactive Plugins') ?></h3>
<form method="post" action="<?php echo admin_url('plugins.php') ?>">
<?php wp_nonce_field('bulk-manage-plugins') ?>
-<?php if ( ! empty($available_plugins) ) : ?>
<div class="tablenav">
<div class="alignleft">
<input type="submit" name="activate-selected" value="<?php _e('Activate') ?>" class="button-secondary" />
</div>
</div>
<br class="clear" />
-<?php print_plugins_table($available_plugins, 'available') ?>
+<?php print_plugins_table($inactive_plugins, 'inactive') ?>
</form>
<?php endif; ?>
+
+<?php if ( empty($all_plugins) ) : ?>
+<p><?php _e('You do not appear to have any plugins available at this time.') ?></p>
+<?php endif; ?>
<?php if( is_site_admin() ) { ?>
<p><?php printf(__('If something goes wrong with a plugin and you can&#8217;t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), PLUGINDIR); ?></p>
diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php
index 8365cfd..56d5a27 100644
--- a/wp-admin/press-this.php
+++ b/wp-admin/press-this.php
@@ -115,7 +115,7 @@ function aposfix($text) {
}
// Ajax Requests
-$title = wp_specialchars(stripslashes($_GET['t']));
+$title = wp_specialchars(aposfix(stripslashes($_GET['t'])));
$selection = str_replace("\n", "<br />", aposfix( stripslashes($_GET['s']) ) );
$url = clean_url($_GET['u']);
@@ -136,8 +136,8 @@ if($_REQUEST['ajax'] == 'thickbox') { ?>
<input id="this_photo_description" name="photo_description" class="text" onkeypress="if(event.keyCode==13) image_selector();" value="<?php echo attribute_escape($title);?>"/>
</div>
- <p><input type="hidden" name="this_photo" value="<?php echo $image; ?>" id="this_photo" />
- <a href="#" class="select"><img src="<?php echo $image; ?>" width="475" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
+ <p><input type="hidden" name="this_photo" value="<?php echo attribute_escape($image); ?>" id="this_photo" />
+ <a href="#" class="select"><img src="<?php echo clean_url($image); ?>" width="475" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
<p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
<?php die;
@@ -171,14 +171,14 @@ if($_REQUEST['ajax'] == 'thickbox_url') { ?>
if($_REQUEST['ajax'] == 'video') { ?>
<h2 id="embededcode"><label for="embed_code"><?php _e('Embed Code') ?></label></h2>
<div class="titlewrap" >
- <textarea name="embed_code" id="embed_code" rows="8" cols="40"><?php echo $selection; ?></textarea>
+ <textarea name="embed_code" id="embed_code" rows="8" cols="40"><?php echo format_to_edit($selection); ?></textarea>
</div>
<?php die;
}
if($_REQUEST['ajax'] == 'photo_images') {
function get_images_from_uri($uri) {
- if(preg_match('/\.(jpg|png|gif)/', $uri) && !strpos($uri,'blogger.com'))
+ if(preg_match('/\.(jpg|jpe|jpeg|png|gif)/', $uri) && !strpos($uri,'blogger.com'))
return "'".$uri."'";
$content = wp_remote_fopen($uri);
@@ -186,7 +186,7 @@ if($_REQUEST['ajax'] == 'photo_images') {
$host = parse_url($uri);
- $pattern = '/<img ([^>]*)src=(\"|\')(.+?)(\2)([^>\/]*)\/*>/is';
+ $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))(\2)([^>\/]*)\/*>/is';
preg_match_all($pattern, $content, $matches);
if ( empty($matches[1]) ) return '';
@@ -199,7 +199,7 @@ if($_REQUEST['ajax'] == 'photo_images') {
else
$src = 'http://'.str_replace('//','/', $host['host'].'/'.$host['path'].'/'.$src);
- $sources[] = $src;
+ $sources[] = clean_url($src);
}
return "'" . implode("','", $sources) . "'";
}
@@ -400,7 +400,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
case 'quote' :
set_menu('quote');
set_title('<?php _e('Quote') ?>');
- set_editor("<blockquote><p><?php echo $selection; ?> </p><p><cite><a href='<?php echo $url; ?>'><?php echo $title; ?> </a> </cite> </p></blockquote>");
+ set_editor("<blockquote><p><?php echo format_to_edit($selection); ?> </p><p><cite><a href='<?php echo $url; ?>'><?php echo $title; ?> </a> </cite> </p></blockquote>");
return false;
break;
case 'video' :
@@ -420,8 +420,9 @@ if($_REQUEST['ajax'] == 'photo') { ?>
list($domain, $video_id) = split(".com/", $url);
$content = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /> <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&amp;server=www.vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>';
- if(trim($selection) == '') $selection = '<a href="http://www.vimeo.com/' . $video_id . '?pg=embed&sec=' . $video_id . '">' . $title . '</a> on <a href="http://vimeo.com?pg=embed&sec=' . $video_id . '">Vimeo</a>';
- }else {
+ if ( trim($selection) == '' )
+ $selection = '<a href="http://www.vimeo.com/' . $video_id . '?pg=embed&sec=' . $video_id . '">' . $title . '</a> on <a href="http://vimeo.com?pg=embed&sec=' . $video_id . '">Vimeo</a>';
+ } else {
$content = $selection;
} ?>
jQuery('#embed_code').prepend('<?php echo htmlentities($content); ?>');
@@ -433,8 +434,8 @@ if($_REQUEST['ajax'] == 'photo') { ?>
case 'photo' :
set_menu('photo');
set_title('<?php _e('Post') ?>');
- <?php if($selection) { ?>
- set_editor("<?php echo $selection; ?>");
+ <?php if ($selection) { ?>
+ set_editor("<?php echo format_to_edit($selection); ?>");
<?php } ?>
jQuery('#extra_fields').show();
jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></h2>');
@@ -499,7 +500,7 @@ if($_REQUEST['ajax'] == 'photo') { ?>
<div class="editor_area">
<h2 id="content_type"><label for="content"><?php _e('Post') ?></label></h2>
<div class="editor-container">
- <textarea name="content" id="content" style="width:100%;" class="mceEditor"><?php if($selection) { ?><a href='<?php echo $url ?>'><?php echo $selection ?></a><?php } else { ?><a href='<?php echo $url ?>'><?php echo $title; ?></a><?php } ?></textarea>
+ <textarea name="content" id="content" style="width:100%;" class="mceEditor"><?php if ($selection) { ?><a href='<?php echo $url ?>'><?php echo format_to_edit($selection) ?></a><?php } else { ?><a href='<?php echo $url ?>'><?php echo $title; ?></a><?php } ?></textarea>
</div>
</div>
</div>
diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php
index a5c78c2..3b657c7 100644
--- a/wp-admin/setup-config.php
+++ b/wp-admin/setup-config.php
@@ -1,9 +1,10 @@
<?php
die();
define('WP_INSTALLING', true);
-//These two defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware
+//These three defines are required to allow us to use require_wp_db() to load the database class while being wp-content/wp-db.php aware
define('ABSPATH', dirname(dirname(__FILE__)).'/');
define('WPINC', 'wp-includes');
+define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
require_once('../wp-includes/compat.php');
require_once('../wp-includes/functions.php');