Introduce wp_get_user_contact_methods() as a public version of _wp_get_user_contactmethods.

props johnnyb.
fixes #24273.


git-svn-id: https://develop.svn.wordpress.org/trunk@25606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2013-09-24 18:13:18 +00:00
parent de89edd699
commit 34e9dc9f06
3 changed files with 30 additions and 12 deletions

View File

@@ -85,7 +85,7 @@ function edit_user( $user_id = 0 ) {
if ( isset( $_POST['description'] ) )
$user->description = trim( $_POST['description'] );
foreach ( _wp_get_user_contactmethods( $user ) as $method => $name ) {
foreach ( wp_get_user_contact_methods( $user ) as $method => $name ) {
if ( isset( $_POST[$method] ))
$user->$method = sanitize_text_field( $_POST[$method] );
}

View File

@@ -350,7 +350,7 @@ if ( is_multisite() && is_network_admin() && ! IS_PROFILE_PAGE && current_user_c
</tr>
<?php
foreach (_wp_get_user_contactmethods( $profileuser ) as $name => $desc) {
foreach ( wp_get_user_contact_methods( $profileuser ) as $name => $desc ) {
?>
<tr>
<th><label for="<?php echo $name; ?>"><?php echo apply_filters('user_'.$name.'_label', $desc); ?></label></th>