summaryrefslogtreecommitdiffstats
path: root/wp-includes
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-16 14:40:34 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-16 14:40:34 +0000
commit85e815bf00f6a27fbe1ed1fb3e0d3e2a2a7fe040 (patch)
treea37c35e2f9836ec01d540b728dee70f4cb146d57 /wp-includes
parent20b08443b2a595369bf9be3b87c04685c9aad5e7 (diff)
downloadwordpress-mu-85e815bf00f6a27fbe1ed1fb3e0d3e2a2a7fe040.tar.gz
wordpress-mu-85e815bf00f6a27fbe1ed1fb3e0d3e2a2a7fe040.tar.xz
wordpress-mu-85e815bf00f6a27fbe1ed1fb3e0d3e2a2a7fe040.zip
Applied patch in #590 by momo360modena and fixed a minor bug with blog searching
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1237 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r--wp-includes/wpmu-functions.php35
1 files changed, 23 insertions, 12 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index e7f3fe0..7c72ba0 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1774,19 +1774,30 @@ add_filter( 'term_id_filter', 'global_terms', 10, 2 ); // taxonomy specific filt
function choose_primary_blog() {
global $current_user;
- echo __('Primary Blog:') . ' ';
- $all_blogs = get_blogs_of_user( $current_user->ID );
- if( count( $all_blogs ) > 1 ) {
- $primary_blog = get_usermeta($current_user->ID, 'primary_blog');
+ ?>
+ <table class="form-table">
+ <tr>
+ <th scope="row"><?php _e('Primary Blog:'); ?></th>
+ <td>
+ <?php
+ $all_blogs = get_blogs_of_user( $current_user->ID );
+ if( count( $all_blogs ) > 1 ) {
+ $primary_blog = get_usermeta($current_user->ID, 'primary_blog');
+ ?>
+ <select name="primary_blog">
+ <?php foreach( (array) $all_blogs as $blog ) { ?>
+ <option value='<?php echo $blog->userblog_id ?>'<?php if( $primary_blog == $blog->userblog_id ) echo ' selected="selected"' ?>>http://<?php echo $blog->domain.$blog->path ?></option>
+ <?php } ?>
+ </select>
+ <?php
+ } else {
+ echo $_SERVER['HTTP_HOST'];
+ }
?>
- <p><select name="primary_blog">
- <?php foreach( (array) $all_blogs as $blog ) { ?>
- <option value='<?php echo $blog->userblog_id ?>'<?php if( $primary_blog == $blog->userblog_id ) echo ' selected="selected"' ?>>http://<?php echo $blog->domain.$blog->path ?></option>
- <?php } ?>
- </select></p><?php
- } else {
- echo $_SERVER['HTTP_HOST'];
- }
+ </td>
+ </tr>
+ </table>
+ <?php
}
add_action( 'profile_personal_options', 'choose_primary_blog' );