Para fazer o que você deseja, você pode adicionar os campos que quiser e, em seguida, armazená-los no user_meta
...
(Também é possível armazená-los no $user_info
array / object, mas não tenho certeza qual seria o benefício ..)
// Render Form Fields
add_action('register_form','k99_register_form_add_theme_field');
// Checking
add_action('register_post','k99_check_fields',10,3);
// Insert Data
add_action('user_register', 'k99_register_new_register_fields');
// Render the form with the additional radio field
function k99_register_form_add_theme_field(){
?>
<p>
<label>Theme<br />
<?php $themes=wp_get_themes();
foreach ($themes as $theme ) {
$theme['Name'] = sanitize_title_with_dashes($theme['Name']);
$checked = checked( $_POST['custom_theme'], 1 );
echo '<input id="custom_theme'.$theme['Name'] .'" type="radio" name="custom_theme" value="'. $theme['Name'] .'" '.$checked.'> '. $theme['Name'].'<br />';
$custom_theme = $_POST['custom_theme'];
} ?>
</label>
</p>
<?php
}
// checking , sanitation etc .. of course this is not done...
function k99_check_fields($login, $email, $errors) {
global $custom_theme;
if ($_POST['custom_theme'] == '') {
$errors->add('empty_theme', "<strong>Error:</strong> Please select theme.");
}
else {
$custom_theme = $_POST['custom_theme'];
}
}
// Write to DB ... if you will..
function k99_register_new_register_fields($user_id, $password="", $meta=array()) {
$custom_theme = $_POST['custom_theme']; //just in case ..
update_usermeta($user_id, 'user_custom_theme',$custom_theme);
}
depois de tudo isso, você pode recuperar o user_theme assim:
get_user_meta($user_id, 'user_custom_theme', true);
NOTA: Isto foi escrito On-The-Fly. Não foi verificado em multi-blog, mas em uma instalação wp simples, e embora não deva haver muita diferença - ainda assim esta não é uma função de produção, foi apenas para colocá-lo no caminho certo. Saneamento e verificação de variáveis, código de limpeza e FORM MARKUP são necessários, bem como adicionar o campo também a outras telas relacionadas ao usuário (criar usuário, editar usuário, editar perfil, etc.).
OBSERVAÇÃO II: você perguntou sobre formas de gravidade em seu uodate - eles têm um add-on para isso