Fix debug notices for bulk edit, fixes #8707 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@10256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-12-26 22:35:08 +00:00
parent f9636f5b95
commit 1ff4349ee5
1 changed files with 2 additions and 2 deletions

View File

@ -228,7 +228,7 @@ function bulk_edit_posts( $post_data = null ) {
if ( empty($post_data) )
$post_data = &$_POST;
if ( 'page' == $post_data['post_type'] ) {
if ( isset($post_data['post_type']) && 'page' == $post_data['post_type'] ) {
if ( ! current_user_can( 'edit_pages' ) )
wp_die( __('You are not allowed to edit pages.') );
} else {
@ -236,7 +236,7 @@ function bulk_edit_posts( $post_data = null ) {
wp_die( __('You are not allowed to edit posts.') );
}
$post_IDs = array_map( intval, (array) $post_data['post'] );
$post_IDs = array_map( 'intval', (array) $post_data['post'] );
$reset = array( 'post_author', 'post_status', 'post_password', 'post_parent', 'page_template', 'comment_status', 'ping_status', 'keep_private', 'tags_input', 'post_category', 'sticky' );
foreach ( $reset as $field ) {