Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25248 closed enhancement (invalid)

Temporary core plugin hook needed for DASH plugin

Reported by: lessbloat's profile lessbloat Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: Cc:

Description

We're working on the dashboard redesign feature as a plugin. We need a temporary hook for the QuickPress/Recent drafts merging work that we're doing.

In https://core.svn.wordpress.org/trunk/wp-admin/post.php , r25216. After line 122, we would like to add:

do_action( 'after_ajax_post_save', $_POST );

Feel free to change the hook name. We couldn't think of anything better.

The purpose is to allow for the same kind of functionality that QuickPress currently has in line 116 of that file, to other dashboard widgets who might want to save posts (in our case, the new merged QuickPress and Recent Drafts widget).

Change History (4)

#1 @SergeyBiryukov
11 years ago

  • Component changed from General to Administration
  • Type changed from defect (bug) to enhancement

#2 @samuelsidler
11 years ago

  • Cc samuelsidler nacin ryan added

#3 @nacin
11 years ago

I would suggest avoiding this entirely, and having the new dashboard widget POST to wp-admin/admin-post.php. If action=new-quickpress-post is passed, the admin_post_new-quickpress-post hook will be fired. So, for example:

add_action( 'admin_post_new-quickpress-post', 'dashboard_plugin_quickpress_admin_post' );
function dashboard_plugin_quickpress_admin_post() {
     $post = get_post( $_REQUEST['post_id'] );
     check_admin_referer( 'add-' . $post->post_type );
     // edit_post();
     // wp_dashboard_quick_press();
     // whatever
     // redirect
     // exit
}

If the hook is still needed, let me know.

#4 @helen
11 years ago

  • Milestone 3.7 deleted
  • Resolution set to invalid
  • Status changed from new to closed

Looks like we're good for now.

Note: See TracTickets for help on using tickets.