I am looking to make it so a subscriber can login and view their profile but not change any of their settings. Only the admin can change the profile settings. Again, I am not looking to hide the profile completely, just to make it un-editable by the subscriber who's profile it is.
1 Answer
add_filter( 'wpmem_register_form_rows', 'prefix_profile', 9999, 2 );
function prefix_profile( $rows, $toggle ){
if( 'edit' == $toggle ){
foreach( $rows as $row_item ){
$rows[$row_item['meta']]['field'] = preg_replace( '/<input(.*) value="(.*)" class="textbox"(.*)\/>/', '<p class="noinput">$2 </p>', $row_item['field'] );
$rows[$row_item['meta']]['label'] = str_replace( '*', '', $row_item['label'] );
}
}
return $rows;
}