post_type == 'attachment' ) { if ( ! wp_delete_attachment($post_id_del) ) wp_die( __('Error in deleting...') ); } else { if ( !wp_delete_post($post_id_del) ) wp_die( __('Error in deleting...') ); } } $sendback = wp_get_referer(); if (strpos($sendback, 'post.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/post-new.php'; elseif (strpos($sendback, 'attachments.php') !== false) $sendback = get_option('siteurl') .'/wp-admin/attachments.php'; $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); wp_redirect($sendback); exit(); } $title = __('Posts'); $parent_file = 'edit.php'; wp_enqueue_script( 'admin-posts' ); wp_enqueue_script('admin-forms'); if ( 1 == $_GET['c'] ) wp_enqueue_script( 'admin-comments' ); require_once('admin-header.php'); add_filter( 'post_limits', $limit_filter = create_function( '$a', '$b = split(" ",$a); if ( !isset($b[2]) ) return $a; $start = intval(trim($b[1])) / 20 * 15; if ( !is_int($start) ) return $a; return "LIMIT $start, 20";' ) ); list($post_stati, $avail_post_stati) = wp_edit_posts_query(); $wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra ) if ( !isset( $_GET['paged'] ) ) $_GET['paged'] = 1; ?>