Created
November 27, 2012 21:43
-
-
Save styledev/4157287 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function profile_save( $user_id ) { | |
$fields = self::$setup['theme']['profile']['fields']; | |
if ( !current_user_can( 'edit_user', $user_id ) ) return false; | |
foreach ($fields as $field => $attr) { | |
if ( isset($_POST[$field]) || isset($_FILES[$field]) ) { | |
$value = $_POST[$field]; | |
if ( $value ) update_user_meta( $user_id, $field, $value ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment