Changeset 3224
- Timestamp:
- 05/24/2016 02:20:04 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php
r3218 r3224 27 27 28 28 <?php foreach ( $sections as $section_slug => $section_title ) : 29 if ( false === ( $section_query = wp_cache_get( "{$section_slug}:front_page", 'wporg-plugins' ) ) ) : 30 $section_args = array( 31 'post_type' => 'plugin', 32 'posts_per_page' => 4, 33 'plugin_category' => $section_slug, 34 ); 29 $section_args = array( 30 'post_type' => 'plugin', 31 'posts_per_page' => 4, 32 'plugin_category' => $section_slug, 33 ); 35 34 36 37 38 39 40 35 if ( 'popular' === $section_slug ) : 36 $section_args['meta_key'] = 'active_installs'; 37 $section_args['orderby'] = 'meta_value_num'; 38 unset( $section_args['plugin_category'] ); 39 endif; 41 40 42 $section_query = new \WP_Query( $section_args ); 43 wp_cache_set( "{$section_slug}:front_page", $section_query, 'wporg-plugins', DAY_IN_SECONDS ); 44 endif; 41 $section_query = new \WP_Query( $section_args ); 45 42 ?> 46 43
Note: See TracChangeset
for help on using the changeset viewer.