diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-12-07 10:17:25 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-12-07 10:17:25 +0000 |
commit | e7b243973132b555e66a0517e25232ba213bc35e (patch) | |
tree | ff9d04034493cc544d1064e56a1c8b8265d63b3f /wp-admin/admin-functions.php | |
parent | f57c5009b529dcc2494fc719f605ef64b7f9b4c7 (diff) | |
download | wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.tar.gz wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.tar.xz wordpress-mu-e7b243973132b555e66a0517e25232ba213bc35e.zip |
WP Merge
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@819 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/admin-functions.php')
-rw-r--r-- | wp-admin/admin-functions.php | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 624b693..160dcc7 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -722,6 +722,7 @@ function cat_rows( $parent = 0, $level = 0, $categories = 0 ) { $categories = get_categories( 'hide_empty=0' ); if ( $categories ) { + ob_start(); foreach ( $categories as $category ) { if ( $category->cat_ID == 0 ) { // HACK, added 2006-05-13 $wpdb->query("DELETE FROM $wpdb->categories WHERE cat_ID = 0"); @@ -732,6 +733,12 @@ function cat_rows( $parent = 0, $level = 0, $categories = 0 ) { cat_rows( $category->cat_ID, $level +1, $categories ); } } + $output = ob_get_contents(); + ob_end_clean(); + + $output = apply_filters('cat_rows', $output); + + echo $output; } else { return false; } @@ -826,11 +833,13 @@ function user_row( $user_object, $style = '' ) { if ( $numposts > 0 ) { $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts )); + $r .= '</a>'; } $r .= "</td>\n\t\t<td>"; - $edit_link = add_query_arg( 'wp_http_referer', wp_specialchars( urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" ); - if ( ( is_site_admin() || $current_user->ID == $user_object->ID ) && current_user_can('edit_user', $user_object->ID) ) + if ( ( is_site_admin() || $current_user->ID == $user_object->ID ) && current_user_can( 'edit_user', $user_object->ID ) ) { + $edit_link = wp_specialchars( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) ); $r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>"; + } $r .= "</td>\n\t</tr>"; return $r; } @@ -1296,8 +1305,8 @@ function get_page_templates() { if ( is_array( $templates ) ) { foreach ( $templates as $template ) { $template_data = implode( '', file( ABSPATH.$template )); - preg_match( "|Template Name:(.* )|i", $template_data, $name ); - preg_match( "|Description:(.* )|i", $template_data, $description ); + preg_match( "|Template Name:(.*)|i", $template_data, $name ); + preg_match( "|Description:(.*)|i", $template_data, $description ); $name = $name[1]; $description = $description[1]; @@ -2020,7 +2029,7 @@ function the_attachment_links( $id = false ) { return false; $icon = get_attachment_icon( $post->ID ); - $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); + $attachment_data = wp_get_attachment_metadata( $id ); $thumb = isset( $attachment_data['thumb'] ); ?> <form id="the-attachment-links"> @@ -2037,7 +2046,7 @@ function the_attachment_links( $id = false ) { <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo $post->guid; ?>"><?php echo $icon ?></a></textarea></td> </tr> <tr> - <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to file' ); ?></th> + <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th> <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ) ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon ?></a></textarea></td> </tr> <?php else : ?> |