- Timestamp:
- 09/19/2022 09:06:08 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-privacy-requests-table.php
r52239 r54215 154 154 $admin_url = $this->get_admin_url(); 155 155 156 $current_link_attributes = empty( $current_status ) ? ' class="current" aria-current="page"' : ''; 157 $status_label = sprintf( 156 $status_label = sprintf( 158 157 /* translators: %s: Number of requests. */ 159 158 _nx( … … 166 165 ); 167 166 168 $views['all'] = sprintf( 169 '<a href="%s"%s>%s</a>', 170 esc_url( $admin_url ), 171 $current_link_attributes, 172 $status_label 167 $views['all'] = array( 168 'url' => esc_url( $admin_url ), 169 'label' => $status_label, 170 'current' => empty( $current_status ), 173 171 ); 174 172 … … 179 177 } 180 178 181 $current_link_attributes = $status === $current_status ? ' class="current" aria-current="page"' : ''; 182 $total_status_requests = absint( $counts->{$status} ); 179 $total_status_requests = absint( $counts->{$status} ); 183 180 184 181 if ( ! $total_status_requests ) { … … 193 190 $status_link = add_query_arg( 'filter-status', $status, $admin_url ); 194 191 195 $views[ $status ] = sprintf( 196 '<a href="%s"%s>%s</a>', 197 esc_url( $status_link ), 198 $current_link_attributes, 199 $status_label 192 $views[ $status ] = array( 193 'url' => esc_url( $status_link ), 194 'label' => $status_label, 195 'current' => $status === $current_status, 200 196 ); 201 197 } 202 198 203 return $ views;199 return $this->get_views_links( $views ); 204 200 } 205 201
Note: See TracChangeset
for help on using the changeset viewer.