gabrielqf
Forum Replies Created
-
Thanks for the help!
I discovered that i needed to alter one more function for registered users input to be saved. Now everything is working quite fine.Now i have only one more request, and that would be to know wich function would i call to add a special booking to a user if, and only if, he submitted a file through another plugin ? If he submitted the file i have a script that e-mails him, i want to make this “e-mail script” book a place for him too. Is that possible ? ( if this needs another topic, please tell me )
I tried to add an action hook to em_booking_save and to em_booking_add, but it’s still not working for registered users.
function em_booking_save_plus() {
$_REQUEST[‘cracha’] = (!empty($_REQUEST[‘cracha’])) ? $_REQUEST[‘cracha’]:”;
$EM_Booking->booking_meta[‘booking’] = array(‘cracha’ => $_REQUEST[‘cracha’]);
}
add_action(’em_booking_add’,’em_booking_save_plus’);
add_action(’em_booking_save’,’em_booking_save_plus’);I’m at a loss as to why registered users aren’t getting the fields saved. The booking_meta column is only written as of a unregistered user creating a booking.
The solution was to change post.php to don’t allow pending and draft posts to not have a post name on line 2494. If there is a better solution without changing the wordpress core, please notify me.
The problem continues if i disable Edit-Flow, so it doesn’t seen to be their problem. No mentions for pending posts in wp-document-revisions. It may be an issue with wordpress and pending…
The issue is: WordPress isn’t writing post_name variable if post is pending or draft. I am looking for a way to change it either in document revisions or wordpress core.
Maybe using the post_title as opposed to the post_name for the creation of the permalink ?
I have done many trials and that’s what i came about :
If the Document is either a Draft or is Pending no one can access the file or download it, if any other state is set through Edit-Flow the document will work perfectly, even if returned to a pending or draft state.So how can i fix that ?