Example #1
0
/**
 * Output the QuickPress dashboard widget.
 *
 * @since 3.0.0
 * @deprecated 3.2.0
 * @deprecated Use wp_dashboard_quick_press()
 * @see wp_dashboard_quick_press()
 */
function wp_dashboard_quick_press_output()
{
    _deprecated_function(__FUNCTION__, '3.2', 'wp_dashboard_quick_press()');
    wp_dashboard_quick_press();
}
Example #2
0
     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.');
     }
     if (!current_user_can(get_post_type_object('post')->cap->create_posts)) {
         exit;
     }
     if ($error_msg) {
         return wp_dashboard_quick_press($error_msg);
     }
     $post = get_post($_REQUEST['post_ID']);
     check_admin_referer('add-' . $post->post_type);
     $_POST['comment_status'] = get_default_comment_status($post->post_type);
     $_POST['ping_status'] = get_default_comment_status($post->post_type, 'pingback');
     edit_post();
     wp_dashboard_quick_press();
     exit;
 case 'postajaxpost':
 case 'post':
     check_admin_referer('add-' . $post_type);
     $post_id = 'postajaxpost' == $action ? edit_post() : write_post();
     redirect_post($post_id);
     exit;
 case 'edit':
     $editing = true;
     if (empty($post_id)) {
         wp_redirect(admin_url('post.php'));
         exit;
     }
     if (!$post) {
         wp_die(__('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?'));