Hi Support
We have a view containing cred_delete_post_link which seems not to work correctly after the last plugin update. Has something changed? I didn't see anything in the release notes regarding this.
Also I noticed that it is no longer in the documentation, nor is it available to choose from Fields and Views when one is creating a View.
1) Has this been deprecated?
2) Should it be replaced with cred-delete-post? If so,
-- is there any way to present the delete dialogue box using cred-delete-post? I liked this feature as it gives the user a chance to prevent a delete in case they hit the Delete button accidentally
-- can we still use WPML strings within the shortcode?
Below is what we had previously and does not seem to work.
OLD STYLE:
[cred_delete_post_link action='trash' message_after="[wpml-string context='loop-item-in-edit-my-job-ads-view' name='Deletion confirmed']Job Ad deleted[/wpml-string]" message="[wpml-string context='loop-item-in-edit-my-job-ads-view' name='Deletion confirmation']Are you sure you want to delete this Job Ad? This cannot be undone.[/wpml-string]" message_show='1' class='cred-refresh-after-delete'][wpml-string context='loop-item-in-edit-my-job-ads-view' name='Delete Job Ad']Delete Job Ad[/wpml-string][/cred_delete_post_link]
NEW STYLE:
[cred-delete-post action='trash'type='button' style='color: #ffffff; background-color: #a80000; padding: 8px 20px; text-align: center; font-size: 14px; border: none; border-radius: 3px; width: 100%;' onsuccess='self'][wpml-string context='loop-item-in-edit-my-nanny-ads-view' name='Delete Nanny Ad']Delete Nanny Ad[/wpml-string][/cred-delete-post]
I wanted to send you my Debug info as I usually do but when I go to toolset debug, it is empty!?
Thanks and best regards
Simon
Here's how it is appearing on the front end, either on hidden link or hidden link, previously just the red button appeared, the user got a full delete confirmation dialogue and the deletion worked beautifully, refreshing the page with a confirmation message to boot.
From what I understand, the shortcode for deleting post links with CRED/Forms was refactored in Forms 2.5.6 to facilitate changes that were needed for the new Blocks editor and preview. The new cred-delete-post shortcode was created to help with this transition. To answer your questions:
1) Has this been deprecated?
Yes, as of Forms 2.5.6 this has been deprecated.
2) Should it be replaced with cred-delete-post?
Yes, the new shortcode replaces the older version.
-- is there any way to present the delete dialogue box using cred-delete-post? I liked this feature as it gives the user a chance to prevent a delete in case they hit the Delete button accidentally
No, there's no confirmation dialog in the new system but you can set the shortcode to Trash instead of Delete, which would give the User the ability to undo their action in wp-admin if they made a mistake.
-- can we still use WPML strings within the shortcode?
You can still use WPML strings in the contents of the shortcode, but the previous shortcode attribute that was used to display some text after the deletion process is no longer available, so you cannot use WPML strings in shortcode attributes.
Let me know if you have further questions about this change.
My issue is resolved now. Thank you!