vendredi 12 février 2016

WordPress functions.php syntax

Looking to modify my child functions.php file to include some logic that ties together Gravity Forms and Ulitmate Member plugins. In that when a user comes to my site and fill out a form I need to capture a hidden field thats dynamically populated with their ultimate member role. I attempted to add the below into my functions.php file but it just ended up rendering my site with all blank pages.

add_filter('gform_field_value_um_role', 'getUM_userrole');
function getUM_userrole($value){
$umrole = echo um_user('role_name');
    return  $umrole;
}

Here's the resources I was using to come up with the above:
http://ift.tt/1KfPtex
http://ift.tt/1QwMpaC

And my hidden field settings: enter image description here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire