Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My client wants the New User admin page to be composed of a meta box.

add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );

But this seems to be for posts only ($post_type).
Is there an alternative for the User screen?

share|improve this question
1  
This article, wp.tutsplus.com/tutorials/… should help you. From member @Stephen Harris profile –  userabuser Sep 27 '12 at 19:19
add comment

1 Answer 1

Well, as you already know, meta boxes are for post types only...

What you can do is to customize the heck out of that screen.

What follows is the code I used on a client's custom theme.
Originally, it was used with the action hook admin_print_scripts-profile.php (which could also be added bellow).

/functions.php:

add_action( 'admin_print_scripts-user-new.php', 'wpse_66477_customize_profile' );

function wpse_66477_customize_profile() {
    wp_register_style( 'wpse_66477_css', get_template_directory_uri() . '/css/profile.css' );
    wp_enqueue_style( 'wpse_66477_css' );
    wp_register_script( 'wpse_66477_js', get_template_directory_uri() . '/js/profile.js' );
    wp_enqueue_script( 'wpse_66477_js' );
}

/css/profile.css:

#contextual-help-link-wrap { display: none !important; }

description,h2,h3,#icon-profile,#icon-users,#ozhmenu_wrap,.editform {
display:none
}

#your-profile {
width:485px;
padding:15px
}

body {
font-family:Verdana;
font-size:10px;
color:#ccc
}

#wpbody-content {
width:500px;
background-color:#fff;
border:1px solid #C3C3C3;
margin:20px 20%;
padding:0 30px 0 0
}

#wpwrap {
display:none;
background-color:#F6F6F6
}

.form-table th {
width:120px;
text-align:right
}

p.help,p.description,span.description,.form-wrap p {
font-size:9px;
font-family:Verdana
}

.description {
line-height:11px
}

input.button-primary,button.button-primary,a.button-primary {
border:0;
font-weight:normal;
color:black;
background:#6EAC51;
text-shadow:none;
height:17px
}

.form-table td {
margin-bottom:9px;
line-height:9px;
font-size:10px;
padding:0 10px
}

.submit {
border:0;
text-align:center;
margin:0 auto
}

.submit input,.button,input.button,.button-primary,input.button-primary,.button-secondary,input.button-secondary,.button-highlighted,input.button-highlighted,#postcustomstuff .submit input {
-webkit-border-radius:0!important;
border-radius:0!important;
padding:5px 25px
}

#pass-strength-result {
margin-top:3px
}

#pass1 {
margin-top:5px
}

/js/profile.js:

jQuery(document).ready( function($) {
    $("#wpwrap").fadeIn(1500);  
    $("#display_name").parents("tr").hide();
    $("#nickname").parents("tr").hide();
    $("#url").parents("tr").hide();
    $("#password .description").css("display","inline");    
    $('#wpbody-content').prepend('<div style="margin-left: 141px; padding-top: 20px;"><img src="http://example.com/img/logo.png" alt="Site logo, goes to main page" title="" width="240" height="80"></div>');
});
share|improve this answer
    
Nice answer, quick correction meta boxes are not for post types only. –  Bainternet Nov 11 '12 at 8:25
1  
@Bainternet, I doubted before writing that... thx for the feedback. –  brasofilo Nov 11 '12 at 10:46
1  
You can as well use the post.js file. That one enables nearly everything in the admin UI. –  kaiser Mar 3 '13 at 11:35
    
@kaiser, dankeschon, duly noted! –  brasofilo Mar 3 '13 at 11:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.