Hi Mukesh,
Thank you for contacting us and I'll be happy to assist.
Your observation is correct and by default, the [toolset-edit-post-link] shortcode, only generates the edit link based on actual/published URL, for the posts with "Publish" status posts.
Note: For the other built-in posts statuses ( e.g. 'future', 'draft', 'pending', 'private' ), it generates an edit link that uses the post's preview URL.
If any custom post status is registered, no edit link is generated for posts which have that status, unless "toolset_filter_edit_post_link_publish_statuses_allowed" or "toolset_filter_edit_post_link_extra_statuses_allowed" filter is used.
Examples:
1. For "Publish" type custom post status "closed":
function example_callback( $allowed_post_types, $form_id ) {
$allowed_post_types = array( 'publish', 'closed' );
return $allowed_post_types;
}
add_filter( 'toolset_filter_edit_post_link_publish_statuses_allowed', 'example_callback', 10, 2 );
2. For "non-Publish" like custom post status "closed":
function example_callback( $allowed_post_types, $form_id ) {
$allowed_post_types = array( 'future', 'draft', 'pending', 'private', 'closed' );
return $allowed_post_types;
}
add_filter( 'toolset_filter_edit_post_link_extra_statuses_allowed', 'example_callback', 10, 2 );
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar