Wordpress++
This commit is contained in:
1 parent
790f1487a2
commit
3f49ab1747
610 files changed
+58979
-36562
No files matched your search
+9
-4
@@ -23,6 +23,11 @@ elseif ( isset( $_POST['post_ID'] ) )
|
||||
else
|
||||
$post_id = $post_ID = 0;
|
||||
|
||||
/**
|
||||
* @global string $post_type
|
||||
* @global object $post_type_object
|
||||
* @global WP_Post $post
|
||||
*/
|
||||
global $post_type, $post_type_object, $post;
|
||||
|
||||
if ( $post_id )
|
||||
@@ -54,7 +59,7 @@ function redirect_post($post_id = '') {
|
||||
$message = 6;
|
||||
}
|
||||
} else {
|
||||
$message = 'draft' == $status ? 10 : 1;
|
||||
$message = 'draft' == $status ? 10 : 1;
|
||||
}
|
||||
|
||||
$location = add_query_arg( 'message', $message, get_edit_post_link( $post_id, 'url' ) );
|
||||
@@ -125,8 +130,8 @@ case 'post-quickdraft-save':
|
||||
$post = get_post( $_REQUEST['post_ID'] );
|
||||
check_admin_referer( 'add-' . $post->post_type );
|
||||
|
||||
$_POST['comment_status'] = get_option( 'default_comment_status' );
|
||||
$_POST['ping_status'] = get_option( 'default_ping_status' );
|
||||
$_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();
|
||||
@@ -274,7 +279,7 @@ case 'untrash':
|
||||
wp_die( __( 'Unknown post type.' ) );
|
||||
|
||||
if ( ! current_user_can( 'delete_post', $post_id ) )
|
||||
wp_die( __( 'You are not allowed to move this item out of the Trash.' ) );
|
||||
wp_die( __( 'You are not allowed to restore this item from the Trash.' ) );
|
||||
|
||||
if ( ! wp_untrash_post( $post_id ) )
|
||||
wp_die( __( 'Error in restoring from Trash.' ) );
|
||||
|
||||
Reference in new issue
Block a user