审查wp_dropdown_users()
显然有一个\'selected\'
参数所以从理论上讲,你可以在这里传递张贴的价值。
// set to the posted value, but you might be able to do this differently, depending on how you are storing the data
$selected = isset($_POST[\'author\']) ? $_POST[\'author\'] : false;
$args = array( \'name\' => \'author\',
\'selected\' => $selected );
wp_dropdown_user( $args );