'Trigger post submit button in wordpress post

i create a new post within a post with wp_insert_post and ajax - all working as expected

my workflow :

  • edit post#1
  • create a new post within post#1
  • open in new tab the new post (post #2)

so what i'm trying to achieve :

  • trigger submit button in post#1 (because if the user has made some changes before click the create post button -> post #2)

I think this action must take place in add_action('wp_ajax_save_post_details', 'save_form_action'); if there's no is_wp_error -> success

Hope i'm clear



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source