Avoid an undefined function due to /wp-admin/includes/dashboard.php
being included too late. props obenland. fixes #27457.
git-svn-id: https://develop.svn.wordpress.org/trunk@27630 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ae8cea0f82
commit
352e5c61cd
@ -106,6 +106,10 @@ case 'post-quickdraft-save':
|
|||||||
// Check nonce and capabilities
|
// Check nonce and capabilities
|
||||||
$nonce = $_REQUEST['_wpnonce'];
|
$nonce = $_REQUEST['_wpnonce'];
|
||||||
$error_msg = false;
|
$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' ) )
|
if ( ! wp_verify_nonce( $nonce, 'add-post' ) )
|
||||||
$error_msg = __( 'Unable to submit this form, please refresh and try again.' );
|
$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' );
|
$_POST['ping_status'] = get_option( 'default_ping_status' );
|
||||||
|
|
||||||
edit_post();
|
edit_post();
|
||||||
// output the quickdraft dashboard widget
|
|
||||||
require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
|
|
||||||
wp_dashboard_quick_press();
|
wp_dashboard_quick_press();
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user