Shamim Hasan
Forum Replies Created
-
AuthorPosts
-
Shamim HasanKeymaster
What it shows?Does it shows any error? Does form showed up?
Shamim HasanKeymasterAs you not supplying any “to” argument with this shortcode, by default this will send message to page author where you added this shortcode.
Please not that if you are not logged in or same as “to” user, no form will show. So if you are that page author no form will show. Try create a test user account and log in with that account to see the form in action.Shamim HasanKeymasterShamim HasanKeymasterThat will not be practical because every field require individual type of validation and sanitize.
You can easily capture id from url and add that in post meta. Use code like
add_action( 'fep_action_message_after_send', function( $message_id, $message, $inserted_message ){ wp_parse_str( $_SERVER['HTTP_REFERER'], $referrer ); $id = !empty( $referrer['id'] ) ? absint($referrer['id']) : 0; //Change id with your parameter //here if require check some validation add_post_meta( $message_id, '_your_custom_meta_key', $id ); }, 10, 3 );
Shamim HasanKeymasterYou can use
$_SERVER['HTTP_REFERER']
to capture id or create a hidden field to provide that id. If you need more secure way you can create 2 hidden field, one for id and another for token created for that id. So that if anybody change that id, that will mismatch token so that you can reject that.Shamim HasanKeymasterIn PRO version Multiple recipient, email beautify etc feature included. But in extensions page those will not show as installed. Those are separate extensions.
Can you please check that your role is not blocked? Please go to Dashboard > Front End PM PRO > Settings > Security > Role to Role Block
Also can you send me your Front End PM PRO > Settings > Emails tab screenshot?
Shamim HasanKeymasterWhen you are getting your ID (from web app)? If you can capture your ID when message sent you can add like bellow code
add_action( 'fep_action_message_after_send', function( $message_id, $message, $inserted_message ){ add_post_meta( $message_id, '_your_custom_meta_key', $id_from_web_app ); }, 10, 3 );
Shamim HasanKeymasterPlease add following code in your theme’s (child theme’s if any) functions.php
add_action( 'fep_display_after_message', function(){ $authordata = get_userdata( get_the_author_meta('ID') ); if( in_array( 'administrator', $authordata->roles ) ){ echo '<a href="' . esc_url( home_url( 'business-directory/' ) ). get_the_author_meta('user_nicename') . '">' . get_the_author_meta('display_name') . '</a>'; } });
Change ‘administrator’ to whatever your user role is. For testing purpose i have used ‘administrator’ so that you can check that only ‘administrator’ role users link will show.
Shamim HasanKeymasterPlease let me know the role slug of those users (“business users” role slug) who have business listing.
Shamim HasanKeymasterYou want to display only if message user is given user role or who is seeing that user is given user role?
Which role you want to display?Shamim HasanKeymasterPlease add following code in your theme’s (child theme’s if any) functions.php
add_action( 'fep_display_after_message', function(){ echo '<a href="' . esc_url( home_url( 'business-directory/' ) ). get_the_author_meta('user_nicename') . '">' . get_the_author_meta('display_name') . '</a>'; });
It will add a link to user’s business directory in bottom of every message.
Shamim HasanKeymasterthree arguments are sent from fep_action_message_after_send action.
You can use fep_get_message_with_replies( $id ) to get message with replies of given id.
Please see functions.php of this plugin to see code.Shamim HasanKeymasterThank you again.
For clarification, If you do not update your license, the plugin will still works fine BUT you will not receive update. When you will go to update along with other plugin updates through WordPress you will see error for this plugin.
Shamim HasanKeymasterPlease add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_filter_message_before_send', 'fep_cus_send_url', 999 ); function fep_cus_send_url( $message ) { if( empty( $message['message_content'] ) || $message['post_parent'] ) return $message; $message['message_content'] .= '<div>'; $message['message_content'] .= esc_url( $_SERVER['HTTP_REFERER'] ); $message['message_content'] .= '</div>'; return $message; }
Let me know.
Shamim HasanKeymasterYou can use
fep_filter_message_before_send
filter to add$_SERVER['HTTP_REFERER']
to the message. -
AuthorPosts