Avoid an undefined function due to `/wp-admin/includes/dashboard.php` being included too late. props obenland. fixes #27457.
Built from https://develop.svn.wordpress.org/trunk@27630 git-svn-id: http://core.svn.wordpress.org/trunk@27473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6a1f7ca4fe
commit
593bd2a495
|
@ -106,6 +106,10 @@ case 'post-quickdraft-save':
|
|||
// Check nonce and capabilities
|
||||
$nonce = $_REQUEST['_wpnonce'];
|
||||
$error_msg = false;
|
||||
|
||||
// For output of the quickdraft dashboard widget
|
||||
require_once ABSPATH . 'wp-admin/includes/dashboard.php';
|
||||
|
||||
if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
|
||||
$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
|
||||
|
||||
|
@ -122,8 +126,6 @@ case 'post-quickdraft-save':
|
|||
$_POST['ping_status'] = get_option( 'default_ping_status' );
|
||||
|
||||
edit_post();
|
||||
// output the quickdraft dashboard widget
|
||||
require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
|
||||
wp_dashboard_quick_press();
|
||||
exit;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue