
04-21-2009, 04:33 PM
|
|
|
Join Date: Sep 2008
Location: Texas
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Shinichi_bien
Hi,
I have problems with pending posts, so I came up with this filter in order not to lose the original author of the pending post when it's published. I don't know if it's only me who has this issue or not?
PHP Code:
add_filter('wp_dropdown_users', 'vb_post_author');
function vb_post_author($output) {
global $post;
$vb_post_author = get_userdata($post->post_author);
$output = str_replace('</select>','<option value="'.$post->post_author.'" selected>'.$vb_post_author->username.'</option></select>',$output);
echo $output;
}
|
Can you tell me where exactly you added this filter?
|