formless on "[Plugin: MW WP Form] how to retrieve postID of a form entry"

ساخت وبلاگ

formless
Member
Posted 14 hours ago #

Hi!

First of all, huge thanks to your plugin as usual!

This time, I wanna know how to retrieve postID of an entry to a form.

Using hook 'mwform_admin_mail_mw-wp-form-XXX',
I could retrieve 'form_key' somehow, but i cannot get the entry's postID.

Is there any way to to that?

Thanks in advance.

Best regards

https://wordpress.org/plugins/mw-wp-form/

formless
Member
Posted 6 minutes ago #

I solved it by myself.

Using hook 'mwform_admin_mail_mw-wp-form-XXX',
Cast $Mail Object to an array, and get protected values like below.

$copy_Mail = (array)$Mail;
$Mail_Parser = $copy_Mail["*Mail_Parser"];
$copy_Mail_Parser = (array)$Mail_Parser;
$saved_mail_id = $copy_Mail_Parser["*saved_mail_id"];

I know it's awfully unsmart way, so I wanna know better way to do that.

or

I wish there will be a method to retrieve 'saved_mail_id' and 'form_key' easily in a next version of your plugin.

Best regards

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 280 تاريخ : چهارشنبه 26 خرداد 1395 ساعت: 9:51