Changeset 3329
- Timestamp:
- 06/11/2016 10:26:40 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php
r3232 r3329 24 24 25 25 /** This filter is documented in wp-admin/includes/post.php */ 26 26 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $post_type ); 27 27 28 28 if ( $this->hierarchical_display ) { … … 381 381 } 382 382 383 $user_post_count = intval( $wpdb->get_var( $wpdb->prepare( " 384 SELECT COUNT( 1 ) 385 FROM $wpdb->posts 386 WHERE post_type = %s 387 AND ( post_author = %d OR post_name IN ( '" . implode( "','", $plugins ) . "' ) ) 388 ", $post_type, $current_user_id ) ) ); 383 if ( empty( $plugins ) ) { 384 $user_post_count = intval( $wpdb->get_var( $wpdb->prepare( " 385 SELECT COUNT( 1 ) 386 FROM $wpdb->posts 387 WHERE post_type = %s 388 AND post_author = %d 389 ", $post_type, $current_user_id ) ) ); 390 391 } else { 392 $user_post_count = intval( $wpdb->get_var( ($wpdb->prepare( " 393 SELECT COUNT( 1 ) 394 FROM $wpdb->posts 395 WHERE post_type = %s 396 AND ( post_author = %d OR post_name IN ( %s ) ) 397 ", $post_type, $current_user_id, implode( ', ', $plugins ) ) ) ) ); 398 } 389 399 390 400 // Subtract post types that are not included in the admin all list.
Note: See TracChangeset
for help on using the changeset viewer.