Changeset 6287 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-query-plugins.php
- Timestamp:
- 12/19/2017 04:22:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-query-plugins.php
r5484 r6287 1 1 <?php 2 2 namespace WordPressdotorg\Plugin_Directory\API\Routes; 3 3 4 use WordPressdotorg\Plugin_Directory\API\Base; 4 5 use WP_REST_Server; … … 21 22 'author_name', 22 23 'installed_plugins', 23 'plugin_tags' 24 'plugin_tags', 24 25 ); 25 26 … … 41 42 42 43 $response = array( 43 'info' => array(44 'info' => array( 44 45 'page' => 0, 45 46 'pages' => 0, … … 69 70 70 71 $response['info']['page'] = (int) $wp_query->get( 'paged' ) ?: 1; 71 $response['info']['pages'] = (int) $wp_query->max_num_pages 72 $response['info']['results'] = (int) $wp_query->found_posts 72 $response['info']['pages'] = (int) $wp_query->max_num_pages ?: 0; 73 $response['info']['results'] = (int) $wp_query->found_posts ?: 0; 73 74 74 75 foreach ( $wp_query->posts as $post ) {
Note: See TracChangeset
for help on using the changeset viewer.