Changeset 6284 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
- Timestamp:
- 12/18/2017 05:42:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
r6252 r6284 9 9 10 10 namespace WordPressdotorg\Plugin_Directory\Theme; 11 11 12 use WordPressdotorg\Plugin_Directory\Plugin_Directory; 12 13 use WordPressdotorg\Plugin_Directory\Template; … … 15 16 16 17 $content = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() ); 17 $is_closed = in_array( get_post_status(), [ 'closed', 'disabled'], true );18 $is_closed = in_array( get_post_status(), [ 'closed', 'disabled' ], true ); 18 19 ?> 19 20 … … 25 26 26 27 <div class="entry-thumbnail"> 27 <?php echo Template::get_plugin_icon( $post, 'html' ); ?> 28 <?php 29 // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped 30 echo Template::get_plugin_icon( $post, 'html' ); 31 ?> 28 32 </div> 29 33 … … 32 36 33 37 <?php if ( 'publish' === get_post_status() || current_user_can( 'plugin_admin_view', $post ) ) : ?> 34 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php _e( 'Download', 'wporg-plugins' ); ?></a>38 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php esc_html_e( 'Download', 'wporg-plugins' ); ?></a> 35 39 <?php endif; ?> 36 40 </div> 37 41 38 42 <?php $plugin_title = $is_closed ? $post->post_name : get_the_title(); ?> 39 <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo $plugin_title; ?></a></h1>43 <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo wp_kses_post( $plugin_title ); ?></a></h1> 40 44 41 45 <span class="byline"><?php the_author_byline(); ?></span> … … 48 52 <span id="developers"></span> 49 53 <ul class="tabs clear"> 50 <li id="tablink-description"><a href="#description"><?php _e( 'Details', 'wporg-plugins' ); ?></a></li>51 <li id="tablink-reviews"><a href="#reviews"><?php _e( 'Reviews', 'wporg-plugins' ); ?></a></li>54 <li id="tablink-description"><a href="#description"><?php esc_html_e( 'Details', 'wporg-plugins' ); ?></a></li> 55 <li id="tablink-reviews"><a href="#reviews"><?php esc_html_e( 'Reviews', 'wporg-plugins' ); ?></a></li> 52 56 <?php if ( isset( $content['installation'] ) && ! $is_closed ) : ?> 53 57 <li id="tablink-installation"> 54 <a href="#installation"><?php _e( 'Installation', 'wporg-plugins' ); ?></a>58 <a href="#installation"><?php esc_html_e( 'Installation', 'wporg-plugins' ); ?></a> 55 59 </li> 56 60 <?php endif; ?> 57 61 <li id="tablink-support"> 58 <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php _e( 'Support', 'wporg-plugins' ); ?></a>62 <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php esc_html_e( 'Support', 'wporg-plugins' ); ?></a> 59 63 </li> 60 <li id="tablink-developers"><a href="#developers"><?php _e( 'Development', 'wporg-plugins' ); ?></a></li>64 <li id="tablink-developers"><a href="#developers"><?php esc_html_e( 'Development', 'wporg-plugins' ); ?></a></li> 61 65 </ul> 62 66 <?php endif; ?> … … 80 84 $section_content = get_closed_plugin_notice(); 81 85 82 } else if ( ! in_array( $section_slug, ['screenshots', 'installation', 'faq', 'changelog'], true ) || ! $is_closed ) {86 } elseif ( ! in_array( $section_slug, [ 'screenshots', 'installation', 'faq', 'changelog' ], true ) || ! $is_closed ) { 83 87 $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) ); 84 88 } … … 97 101 } 98 102 99 $section_read_more = ! in_array( $section_slug, $section_no_read_mores );103 $section_read_more = ! in_array( $section_slug, $section_no_read_mores, true ); 100 104 101 105 get_template_part( 'template-parts/section' ); 102 106 endforeach; 103 endif; // plugin_advanced 107 endif; // plugin_advanced. 104 108 ?> 105 109 </div><!-- .entry-content -->
Note: See TracChangeset
for help on using the changeset viewer.