/** * Renders templates on bottom of screen. */ function wpcf_usermeta_add_user_templates() { ?> <script type="text/html" id="tpl-wpcf-usermeta-add-user"> <?php wpcf_admin_userprofile_init(-1); ?> </script> <script type="text/javascript"> jQuery(document).ready(function($) { $('#createuser .submit').prepend($('#tpl-wpcf-usermeta-add-user').html()); }); </script> <?php wpcf_form_render_js_validation('#createuser'); }
/** * Add fields to user profile */ function wpcf_admin_user_profile_load_hook($user) { if (!current_user_can('edit_user', $user->ID)) { return false; } require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php'; require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php'; require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php'; wpcf_admin_userprofile_init($user); }
/** * Add fields to user profile */ function wpcf_admin_user_profile_load_hook($user) { if (!current_user_can('edit_user', $user->ID)) { return false; } if (!wpcf_is_embedded()) { require_once WPCF_INC_ABSPATH . '/usermeta.php'; } require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields.php'; require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta.php'; require_once WPCF_EMBEDDED_INC_ABSPATH . '/fields-post.php'; require_once WPCF_EMBEDDED_INC_ABSPATH . '/usermeta-post.php'; add_action('admin_footer', 'wpcf_admin_fields_usermeta_styles'); wpcf_admin_userprofile_init($user); }