Make WordPress Core

Changeset 2062


Ignore:
Timestamp:
01/07/2005 01:11:51 AM (21 years ago)
Author:
saxmatt
Message:

http://mosquito.wordpress.org/view.php?id=521

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r1978 r2062  
    4545
    4646<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
    47 <input type="hidden" name="action" value='<?php echo $form_action ?>' />
     47<input type="hidden" name="action" value="<?php echo $form_action ?>" />
     48<input type="hidden" name="post_author" value="<?php echo $post_author ?>" />
     49
    4850<?php echo $form_extra ?>
    4951<?php if (isset($_GET['message']) && 2 > $_GET['message']) : ?>
     
    153155        <th scope="row"><?php _e('Post author'); ?>:</th>
    154156        <td>
    155         <select name="post_author" id="post_author">
     157        <select name="post_author_override" id="post_author_override">
    156158        <?php
    157159        foreach ($users as $o) :
  • trunk/wp-admin/post.php

    r2059 r2062  
    240240    $post_status = $_POST['post_status'];
    241241    $menu_order = (int) $_POST['menu_order'];
    242     if (! empty($_POST['post_author'])) {
     242    if (! empty($_POST['post_author_override'])) {
     243        $post_author = (int) $_POST['post_author_override'];
     244    } else if (! empty($_POST['post_author'])) {
    243245        $post_author = (int) $_POST['post_author'];
    244246    } else {
  • trunk/wp-includes/functions-post.php

    r2048 r2062  
    243243
    244244// Get author's preferred display name
    245 function get_author_name($auth_id) {
    246     $authordata = get_userdata($auth_id);
    247 
    248     switch($authordata["user_idmode"]) {
    249         case "nickname":
    250             $authorname = $authordata["user_nickname"];
    251 
    252         case "login":
    253             $authorname = $authordata["user_login"];
    254             break;
    255    
    256         case "firstname":
    257             $authorname = $authordata["user_firstname"];
    258             break;
    259 
    260         case "lastname":
    261             $authorname = $authordata["user_lastname"];
    262             break;
    263 
    264         case "namefl":
    265             $authorname = $authordata["user_firstname"]." ".$authordata["user_lastname"];
    266             break;
    267 
    268         case "namelf":
    269             $authorname = $authordata["user_lastname"]." ".$authordata["user_firstname"];
    270             break;
    271 
     245function get_author_name( $auth_id ) {
     246    $authordata = get_userdata( $auth_id );
     247
     248    switch( $authordata['user_idmode'] ) {
     249        case 'nickname':
     250            $authorname = $authordata['user_nickname'];
     251            break;
     252        case 'login':
     253            $authorname = $authordata['user_login'];
     254            break;
     255        case 'firstname':
     256            $authorname = $authordata['user_firstname'];
     257            break;
     258        case 'lastname':
     259            $authorname = $authordata['user_lastname'];
     260            break;
     261        case 'namefl':
     262            $authorname = $authordata['user_firstname'].' '.$authordata['user_lastname'];
     263            break;
     264        case 'namelf':
     265            $authorname = $authordata['user_lastname'].' '.$authordata['user_firstname'];
     266            break;
    272267        default:
    273             $authorname = $authordata["user_nickname"];
     268            $authorname = $authordata['user_nickname'];
    274269            break;
    275270    }
     
    280275// get extended entry info (<!--more-->)
    281276function get_extended($post) {
    282     list($main,$extended) = explode('<!--more-->',$post);
     277    list($main,$extended) = explode('<!--more-->', $post, 2);
    283278
    284279    // Strip leading and trailing whitespace
Note: See TracChangeset for help on using the changeset viewer.