Changeset 4283
- Timestamp:
- 10/21/2016 08:30:29 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php
r4223 r4283 14 14 'popular' => __( 'Popular Plugins', 'wporg-plugins' ), 15 15 'beta' => __( 'Beta Plugins', 'wporg-plugins' ), 16 'favorites' => __( 'My Favorites', 'wporg-plugins' ), 16 17 ); 17 18 … … 27 28 28 29 <?php foreach ( $sections as $browse => $section_title ) : 30 // Only logged in users can have favorites. 31 if ( 'favorites' === $browse && ! is_user_logged_in() ) { 32 continue; 33 } 34 29 35 $section_args = array( 30 36 'post_type' => 'plugin', … … 40 46 41 47 $section_query = new \WP_Query( $section_args ); 48 49 // If the user doesn't have any favorites, omit the section. 50 if ( 'favorites' === $browse && ! $section_query->have_posts() ) { 51 continue; 52 } 42 53 ?> 43 54
Note: See TracChangeset
for help on using the changeset viewer.