Changeset 3338 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php
- Timestamp:
- 06/12/2016 10:15:16 AM (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
r3300 r3338 26 26 <main id="main" class="site-main" role="main"> 27 27 28 <?php foreach ( $sections as $ section_slug=> $section_title ) :28 <?php foreach ( $sections as $browse => $section_title ) : 29 29 $section_args = array( 30 'post_type' 31 'posts_per_page' 32 ' plugin_section' => $section_slug,30 'post_type' => 'plugin', 31 'posts_per_page' => 4, 32 'browse' => $browse, 33 33 ); 34 34 35 if ( 'popular' === $ section_slug) :35 if ( 'popular' === $browse ) : 36 36 $section_args['meta_key'] = 'active_installs'; 37 37 $section_args['orderby'] = 'meta_value_num'; 38 unset( $section_args[' plugin_section'] );38 unset( $section_args['browse'] ); 39 39 endif; 40 40 41 41 $section_query = new \WP_Query( $section_args ); 42 ?>42 ?> 43 43 44 44 <section class="plugin-section"> 45 45 <header class="section-header"> 46 46 <h1 class="section-title"><?php echo esc_html( $section_title ); ?></h1> 47 <a class="section-link" href="<?php echo esc_url( home_url( "browse/$ section_slug/" ) ); ?>"><?php _ex( 'See all', 'plugins', 'wporg-plugins' ); ?></a>47 <a class="section-link" href="<?php echo esc_url( home_url( "browse/$browse/" ) ); ?>"><?php _ex( 'See all', 'plugins', 'wporg-plugins' ); ?></a> 48 48 </header> 49 49 50 50 <?php 51 52 51 while ( $section_query->have_posts() ) : 52 $section_query->the_post(); 53 53 54 55 54 get_template_part( 'template-parts/plugin', 'index' ); 55 endwhile; 56 56 ?> 57 57 </section> … … 63 63 <aside id="secondary" class="widget-area" role="complementary"> 64 64 <?php 65 66 67 68 65 the_widget( 'WP_Widget_Text', array( 66 'title' => 'Plugin Authors', 67 'text' => 'Now what are the possibilities of warp drive? Cmdr Riker\'s nervous system has been invaded by an unknown microorganism. The organisms fuse to the nerve, intertwining at the molecular level. That\'s why the transporter\'s biofilters couldn\'t extract it.', 68 ), $widget_args ); 69 69 70 71 72 73 70 the_widget( 'WP_Widget_Text', array( 71 'title' => 'Plugin Reviewers', 72 'text' => 'Shields up. I recommend we transfer power to phasers and arm the photon torpedoes. Something strange on the detector circuit. The weapons must have disrupted our communicators.', 73 ), $widget_args ); 74 74 75 76 77 78 75 the_widget( 'WP_Widget_Text', array( 76 'title' => 'Plugin Handbook', 77 'text' => 'Communication is not possible. The shuttle has no power. Using the gravitational pull of a star to slingshot back in time? We are going to Starbase Montgomery for Engineering consultations prompted by minor read-out anomalies.', 78 ), $widget_args ); 79 79 ?> 80 80 </aside><!-- #secondary --> 81 <?php81 <?php 82 82 get_footer();
Note: See TracChangeset
for help on using the changeset viewer.