tareq1988/WP-User-Frontend — pull request #26 by hesfrap (2014-12-12 08:53:45+00:00)
Title: add function to set visibility of profile fields + translate from wordpress core

1. I added the variable args in wp-editprofile.php. It's an array with key of all the fields name, which could been show in the plugin and the value true of all the keys. With the hook "wp_user_frontend_activated_fields" you can manipulate the visibility of the fields if you want. Additionally you can hide the sections "Name", "Contact Info", "Description" and/or "User Profile". If you hide the section Name or Contact Info the fields Username, Nickname and E-Mail are only invisible => they're necessary for save the user profile.

//example for hidding the section "Name" and the field "url" of section "Contact Info"
add_filter('wp_user_frontend_activated_fields','set_profile_activated_fields',10,1);

function set_profile_activated_fields($args){
$args["showSectionName"] = false;
$args["url"] = false;
return $args;
}

2. I added the core translation file "wp-content/languages/admin-x_X.mo". The reason => in this plugin are fields from the core. They should translate the same way as the original fields. As example:
//get now the translation of adin-x_X.mo. x = language key, X = language key