Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#25248 closed enhancement (invalid)

Temporary core plugin hook needed for DASH plugin

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

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
13 years ago

  • Component GeneralAdministration
  • Type defect (bug)enhancement

#2 @samuelsidler
13 years ago

  • Cc samuelsidler nacin ryan added

#3 @nacin
13 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
13 years ago

  • Milestone 3.7
  • Resolutioninvalid
  • Status newclosed

Looks like we're good for now.

Note: See TracTickets for help on using tickets.