WordPress.org

Make WordPress Core

Changeset 15451


Ignore:
Timestamp:
07/21/10 17:27:37 (5 years ago)
Author:
ryan
Message:

Make posts per page filters consistent and back compat. Props wpmuguru. fixes #14135 for 3.0.1

Location:
branches/3.0/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-admin/edit.php

    r15132 r15451  
    4444if ( empty($pagenum) ) 
    4545    $pagenum = 1; 
    46 $per_page = 'edit_' . $post_type . '_per_page'; 
    47 $per_page = (int) get_user_option( $per_page ); 
     46$edit_per_page = 'edit_' . $post_type . '_per_page'; 
     47$per_page = (int) get_user_option( $edit_per_page ); 
    4848if ( empty( $per_page ) || $per_page < 1 ) 
    4949    $per_page = 20; 
    50 // @todo filter based on type 
    51 $per_page = apply_filters( 'edit_posts_per_page', $per_page ); 
     50 
     51$per_page = apply_filters( $edit_per_page, $per_page ); 
     52$per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type ); 
    5253 
    5354// Handle bulk actions 
  • branches/3.0/wp-admin/includes/post.php

    r15446 r15451  
    896896    if ( empty( $posts_per_page ) || $posts_per_page < 1 ) 
    897897        $posts_per_page = 20; 
     898 
    898899    $posts_per_page = apply_filters( $per_page, $posts_per_page ); 
    899  
     900    $posts_per_page = apply_filters( 'edit_posts_per_page', $posts_per_page, $post_type ); 
    900901 
    901902    $query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page'); 
Note: See TracChangeset for help on using the changeset viewer.