WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-admin/includes/template.php

    r15253 r15452  
    848848 */
    849849function inline_edit_row( $screen ) {
    850     global $current_user, $mode;
     850    global $mode;
    851851
    852852    if ( is_string($screen) ) {
     
    929929
    930930    if ( post_type_supports( $screen->post_type, 'author' ) ) :
    931         $authors = get_editable_user_ids( $current_user->id, true, $screen->post_type ); // TODO: ROLE SYSTEM
     931        $authors = get_editable_user_ids( get_current_user_id(), true, $screen->post_type ); // TODO: ROLE SYSTEM
    932932        $authors_dropdown = '';
    933933        if ( $authors && count( $authors ) > 1 ) :
     
    12701270 */
    12711271function _post_row($a_post, $pending_comments, $mode) {
    1272     global $post, $current_user, $current_screen;
     1272    global $post, $current_screen;
    12731273    static $rowclass;
    12741274
     
    12781278
    12791279    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    1280     $post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
     1280    $post_owner = ( get_current_user_id() == $post->post_author ? 'self' : 'other' );
    12811281    $edit_link = get_edit_post_link( $post->ID );
    12821282    $title = _draft_or_post_title();
     
    13911391                $out = array();
    13921392                foreach ( $categories as $c )
    1393                     $out[] = "<a href='edit.php?category_name=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
     1393                    $out[] = "<a href='edit.php?post_type={$post->post_type}&amp;category_name={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
    13941394                    echo join( ', ', $out );
    13951395            } else {
     
    14071407                $out = array();
    14081408                foreach ( $tags as $c )
    1409                     $out[] = "<a href='edit.php?tag=$c->slug'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
     1409                    $out[] = "<a href='edit.php?post_type={$post->post_type}&amp;tag={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
    14101410                echo join( ', ', $out );
    14111411            } else {
     
    17961796    global $wp_roles;
    17971797
    1798     $current_user = wp_get_current_user();
    1799 
    18001798    if ( !( is_object( $user_object) && is_a( $user_object, 'WP_User' ) ) )
    18011799        $user_object = new WP_User( (int) $user_object );
     
    18141812        // Set up the user editing link
    18151813        // TODO: make profile/user-edit determination a separate function
    1816         if ($current_user->ID == $user_object->ID) {
     1814        if ( get_current_user_id() == $user_object->ID) {
    18171815            $edit_link = 'profile.php';
    18181816        } else {
     
    18311829        }
    18321830
    1833         if ( !is_multisite() && $current_user->ID != $user_object->ID && current_user_can('delete_user', $user_object->ID) )
     1831        if ( !is_multisite() && get_current_user_id() != $user_object->ID && current_user_can('delete_user', $user_object->ID) )
    18341832            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
    1835         if ( is_multisite() && $current_user->ID != $user_object->ID && current_user_can('remove_user', $user_object->ID) )
     1833        if ( is_multisite() && get_current_user_id() != $user_object->ID && current_user_can('remove_user', $user_object->ID) )
    18361834            $actions['remove'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=remove&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Remove') . "</a>";
    18371835        $actions = apply_filters('user_row_actions', $actions, $user_object);
     
    22262224 */
    22272225function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) {
    2228     global $current_user;
    2229 
    22302226    // allow plugin to replace the popup content
    22312227    $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) );
     
    22792275    </p>
    22802276
    2281     <input type="hidden" name="user_ID" id="user_ID" value="<?php echo $current_user->ID; ?>" />
     2277    <input type="hidden" name="user_ID" id="user_ID" value="<?php echo get_current_user_id(); ?>" />
    22822278    <input type="hidden" name="action" id="action" value="" />
    22832279    <input type="hidden" name="comment_ID" id="comment_ID" value="" />
Note: See TracChangeset for help on using the changeset viewer.