[wp-trac] [WordPress Trac] #25248: Temporary core plugin hook needed for DASH plugin
WordPress Trac
noreply at wordpress.org
Sat Sep 7 03:33:17 UTC 2013
#25248: Temporary core plugin hook needed for DASH plugin
----------------------------+------------------
Reporter: lessbloat | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------
Comment (by nacin):
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.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25248#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list