Changeset 60072
- Timestamp:
- 03/24/2025 07:57:43 PM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-privacy-requests-table.php
r59865 r60072 117 117 } 118 118 119 $query = " 120 SELECT post_status, COUNT( * ) AS num_posts 121 FROM {$wpdb->posts} 122 WHERE post_type = %s 123 AND post_name = %s 124 GROUP BY post_status"; 125 126 $results = (array) $wpdb->get_results( $wpdb->prepare( $query, $this->post_type, $this->request_type ), ARRAY_A ); 127 $counts = array_fill_keys( get_post_stati(), 0 ); 119 $results = (array) $wpdb->get_results( 120 $wpdb->prepare( 121 "SELECT post_status, COUNT( * ) AS num_posts 122 FROM {$wpdb->posts} 123 WHERE post_type = %s 124 AND post_name = %s 125 GROUP BY post_status", 126 $this->post_type, 127 $this->request_type 128 ), 129 ARRAY_A 130 ); 131 132 $counts = array_fill_keys( get_post_stati(), 0 ); 128 133 129 134 foreach ( $results as $row ) {
Note: See TracChangeset
for help on using the changeset viewer.