I am using this one : fep_shortcode_message_to
The one you point to doesn’t seem to show for whatever reason.
I need to add custom parameters to this shortcode and then being able to have access to them in your hook ‘fep_action_message_after_send’
I could modify the core in your class form and inject a hidden field with a GET variable but it is still a core modif and I don’t like that..
Thank you very much for your insight!
for fep_shortcode_new_message_form Form will not show if current user can not send message to “to” user. So non logged in user or if logged in user and “to” user is same then no form will be shown.
For your case you can use fep_after_form_fields action hook to output a hidden field and access them using fep_action_message_after_send hook when message sent.
You are a life-saver!
About your other shortcode, I am logged in as Administrator.. And I made sure to check this role in “new message” sending access.
Not working :
echo do_shortcode('[fep_shortcode_new_message_form to="'. $post->post_author . '" subject="I am making an offer"]');
And the one I am using (working) :
echo do_shortcode('[fep_shortcode_message_to to="'. $post->post_author . '" subject="I am making an offer" text="Make an Offer" class="pm_offer"]');
Oh.. The primary step is kind of missing..
How can I append the new parameters to the shortcode?
Thanks!
Nevermind about the primary step, I could make it work by placing the
add_action('fep_after_form_fields', 'iv_pm_after_form_fields', 10,3);
right before the shortcode generation instead of in functions.php file.
It seems your suggested shortcode to display inline message form isn’t working with userIDs.. Only with usernames..
So.. Everything is fine now, thank you very much!