I am trying to use the cred php template code, everything seems to be working up until the "$message.
https://toolset.com/forums/topic/cred-php-parameters/
This doesn't appear to be fixed, despite the post saying it would be fixed in the next release. This is a very important part of my project, please let me know what to do
cred_delete_post_link($post->ID, '<i class="fa fa-times-circle dash-breadcrumbs-icon"></i><span class="dash-nav-text">Delete</span>', 'delete', 'cred-refresh-after-delete rl-cred-delete', 'display: block;', 'Do you really want to delete this Project? There is no undo.', 'Project Deleted.', 1, '/clients')
//cred_delete_post_link($post_id = false, $text = '', $action = '', $class = '', $style = '', $message = '', $message_after = '', $message_show = 1, $redirect = '')
Hi there,
Thank you for contacting Toolset support.
I’ll escalate this ticket to our next level support. Please be patient, wait for a reply from them and they will get in touch with you as soon as possible.
In the meantime, could you please send the debug information to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/
Thanks
Hi, thanks I think this is a bug with the actual shortcode and not with my site - as documented in that last link.
I just don't think it was fixed, even tested on your support team's environment it didn't work. I'll wait for the reply from the dev, thanks a lot
Hello,
There is a bug indeed, I've forwarded the issue to our CRED development team. They will take care of this issue very soon. We will probably include a fix for this in the next release, no ETA yet.
Please let me know if you are satisfied with my reply and any other questions you may have.
Regards,
Adriano Ferreira
Thanks guys,
is it possible to provide a php workaround for this until the code is updated? I was really relying on cred for this
HI Josh, unfortunately we are still waiting for an update from our CRED developers.
As soon as we have an update from them I'll let you know.
Regards,
Yuri.
Hi Josh, I've just emailed to your registered forum email our latest CRED beta version since we don't have yet an estimate for the release of our next CRED version.
Let me know how it goes.
Regards,
Yuri.
Hi Yuri, I tried this but the redirect url still isn't working:
cred_delete_post_link(get_the_ID(), '<i class="fa fa-times-circle dash-breadcrumbs-icon"></i><span class="dash-nav-text">Delete</span>', 'delete', 'cred-refresh-after-delete rl-cred-delete', 'display: block;', 'Do you really want to delete this Project? There is no undo.', 'Project Deleted.', 1, '/client/')
There is now an alert asking whether the user wants to be directed to the homepage or not, instead of automatically redirecting to the url provided.
Can you see any errors in my code?
Hi Josh, there is no apparent error in your code.
I'm checking with our CRED developer what is going on with the redirect.
Regards,
Yuri.
Hi Josh, I've confirmed with our CRED developer and the php function does not accept an explicit redirect URL as the last parameter, only a boolean. You must change the "/client" from the end or your php call to "1" as this is a flag for redirecting or not. Then use a filter to force the redirect URL.
Here is a sample of this filter.
add_filter("cred_redirect_after_delete_action", "test");
function test($redurl, $post_id) {
return "/client/";
}
Let me know how it goes.
Regards,
Yuri.