Home › Forums › Front End PM PRO › How to link the participants name to their profile?
- This topic has 21 replies, 3 voices, and was last updated 6 years, 5 months ago by c-alle.
- AuthorPosts
- October 22, 2018 at 7:47 pm #18455Utsav SarkarParticipant
Hi Shamim,
I wanted the toggle feature to be disabled by default so that users can see the messages at all times. Hence, I have the following code in my functions.php
add_action( ‘wp_enqueue_scripts’, function(){
wp_deregister_script( ‘fep-replies-show-hide’ );
});However, after the Version 10.1.4 upgrade, the messages are toggled off by default. how can I remove the toggle feature again so that users can see the messages
October 22, 2018 at 8:08 pm #18458Shamim HasanKeymasterJuly 2, 2019 at 3:56 am #26392c-alleParticipantI tried to insert this code:
add_filter( 'fep_filter_before_email_send', function( $content ){ $content['subject'] = strip_tags( $content['subject'] ); return $content; }, 99); add_filter( 'fep_filter_user_name', function( $name, $id ){ if( function_exists( 'um_fetch_user' ) ){ um_fetch_user( $id ); $name = '<a href="' . um_user_profile_url() . '">' . $name . '</a>'; } return $name; }, 10, 2);[MODERATOR]- please put code between backticks
and it works, but there is a problem, when I click on new message and choose the recipient name, before the name I get <a href = “etc … with the address of the recipient profile.
July 2, 2019 at 9:37 am #26417Shamim HasanKeymasterYou can check if it is view message page first.
So your code lineif( function_exists( 'um_fetch_user' ) ){will beif( function_exists( 'um_fetch_user' ) && isset( $_GET['fepaction'] ) && 'viewmessage' === $_GET['fepaction'] ){Let me know.
July 2, 2019 at 1:58 pm #26435c-alleParticipantThanks, so it doesn’t work in the messagebox, while in viewmessage it works, but if I switch from one message to another it loses the <ahfer of the participants and only gives me the name back.
July 2, 2019 at 4:49 pm #26441Shamim HasanKeymasterPlease use this code
add_filter( 'fep_filter_user_name', function( $name, $id ){ if ( $name && function_exists( 'um_fetch_user' ) && fep_get_the_id() ) { um_fetch_user( $id ); $name = '<a href="' . um_user_profile_url() . '">' . $name . '</a>'; } return $name; }, 10, 2);July 2, 2019 at 4:56 pm #26443c-alleParticipantWith this code it works perfectly. Thank you. 🙂
- AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.