Changeset 7352
- Timestamp:
- 03/17/2008 10:18:32 PM (17 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-ajax.php
r7336 r7352 23 23 $id = isset($_POST['id'])? (int) $_POST['id'] : 0; 24 24 switch ( $action = $_POST['action'] ) : 25 case 'add-post' :26 check_ajax_referer( 'add-post' );27 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; $start += intval(trim($b[2])) - 1; return "LIMIT $start, 1";' ) );28 wp_edit_posts_query( $_POST );29 if ( !have_posts() )30 die('1');31 $posts_columns = wp_manage_posts_columns();32 ob_start();33 include( 'edit-post-rows.php' );34 $data = ob_get_contents();35 ob_end_clean();36 if ( !preg_match('|<tbody.+?>(.+)</tbody>|s', $data, $matches) )37 my_dump($data);38 $data = trim($matches[1]);39 $x = new WP_Ajax_Response( array( 'what' => 'post', 'id' => $id, 'data' => $data ) );40 $x->send();41 break;42 25 case 'delete-comment' : 43 26 check_ajax_referer( "delete-comment_$id" ); -
trunk/wp-admin/includes/post.php
r7338 r7352 548 548 } 549 549 550 wp("post_type=post&what_to_show=posts$post_status_q&posts_per_page= 20&order=$order&orderby=$orderby");550 wp("post_type=post&what_to_show=posts$post_status_q&posts_per_page=15&order=$order&orderby=$orderby"); 551 551 552 552 return array($post_stati, $avail_post_stati);
Note: See TracChangeset
for help on using the changeset viewer.