diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
index d7ada14e..d5520828 100644
|
|
|
$content = Plugin_Directory::instance()->split_post_content_into_pages( get_the_ |
| 17 | 17 | $status = get_post_status(); |
| 18 | 18 | |
| 19 | 19 | ?><article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 20 | | <?php echo Template::get_plugin_banner( get_post(), 'html' ); ?> |
| | 20 | <?php |
| | 21 | // Don't show the plugin banner for closed plugins |
| | 22 | if ( ! in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| | 23 | echo Template::get_plugin_banner( get_post(), 'html' ); |
| | 24 | } |
| | 25 | ?> |
| 21 | 26 | |
| 22 | 27 | <header class="plugin-header"> |
| 23 | 28 | <?php if ( time() - get_post_modified_time() > 2 * YEAR_IN_SECONDS ) : ?> |
| 24 | 29 | <div class="plugin-notice notice notice-warning notice-alt"> |
| 25 | 30 | <p><?php _e( 'This plugin <strong>hasn’t been updated in over 2 years</strong>. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.', 'wporg-plugins' ); ?></p> |
| 26 | | </div><!-- .plugin-notice --> |
| | 31 | </div> |
| 27 | 32 | <?php endif; ?> |
| 28 | 33 | <?php if ( 'publish' !== $status ) : |
| 29 | 34 | $notice_type = 'notice-error'; |
| … |
… |
$status = get_post_status(); |
| 65 | 70 | $message .= sprintf( __( 'This plugin was closed on %s.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) ); |
| 66 | 71 | } |
| 67 | 72 | } |
| | 73 | |
| | 74 | if ( ! in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| | 75 | // the notice for closed and disabled is shown below the Description header, because we don't output the readme there |
| 68 | 76 | ?> |
| | 77 | <!-- .plugin-notice --> |
| 69 | 78 | <div class="plugin-notice notice <?php echo esc_attr( $notice_type ); ?> notice-alt"> |
| 70 | 79 | <p><?php echo $message; ?></p> |
| 71 | | </div><!-- .plugin-notice --> |
| 72 | | |
| 73 | | <?php if ( in_array( $status, array( 'closed', 'disabled' ) ) && get_current_user_id() == get_post()->post_author ) : ?> |
| 74 | | <div class="plugin-notice notice notice-info notice-alt"> |
| 75 | | <p><?php |
| 76 | | printf( |
| 77 | | /* translators: 1: plugins@wordpress.org */ |
| 78 | | __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ), |
| 79 | | 'plugins@wordpress.org' |
| 80 | | ); |
| 81 | | ?></p> |
| 82 | | </div><!-- .plugin-notice --> |
| 83 | | <?php endif; ?> |
| | 80 | </div> |
| | 81 | <!-- .plugin-notice --> |
| | 82 | <?php } ?> |
| 84 | 83 | <?php endif; ?> |
| 85 | 84 | |
| 86 | 85 | <div class="entry-thumbnail"> |
| 87 | | <?php echo Template::get_plugin_icon( get_post(), 'html' ); ?> |
| | 86 | <?php |
| | 87 | // Don't show the icon for closed plugins |
| | 88 | if ( ! in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| | 89 | echo Template::get_plugin_icon( get_post(), 'html' ); |
| | 90 | } |
| | 91 | ?> |
| 88 | 92 | </div> |
| 89 | 93 | |
| 90 | 94 | <div class="plugin-actions"> |
| … |
… |
$status = get_post_status(); |
| 168 | 172 | continue; |
| 169 | 173 | } |
| 170 | 174 | |
| | 175 | if ( 'description' === $section_slug && in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| | 176 | // Don't show the description for closed plugins |
| | 177 | $section_content = '<div class="plugin-notice notice notice-error notice-alt"><p>' . $message . '</p></div>'; |
| | 178 | if ( get_current_user_id() == get_post()->post_author ) { |
| | 179 | $section_content .= '<div class="plugin-notice notice notice-info notice-alt"><p>' . |
| | 180 | sprintf( |
| | 181 | /* translators: 1: plugins@wordpress.org */ |
| | 182 | __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ), |
| | 183 | 'plugins@wordpress.org' |
| | 184 | ) . '</p></div><!-- .plugin-notice -->'; |
| | 185 | } |
| | 186 | } else { |
| | 187 | $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) ); |
| | 188 | } |
| | 189 | |
| 171 | 190 | $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) ); |
| 172 | 191 | if ( empty( $section_content ) ) { |
| 173 | 192 | continue; |
diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php
index b3e28f44..3943927e 100644
|
|
|
use WordPressdotorg\Plugin_Directory\Template; |
| 13 | 13 | ?> |
| 14 | 14 | |
| 15 | 15 | <div id="admin" class="section"> |
| | 16 | <?php |
| | 17 | $status = get_post_status(); |
| | 18 | if ( in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| | 19 | echo '<div class="plugin-notice notice notice-error notice-alt"><p>' . __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' ); . '</p></div>'; |
| | 20 | if ( get_current_user_id() == get_post()->post_author ) { |
| | 21 | echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . |
| | 22 | sprintf( |
| | 23 | /* translators: 1: plugins@wordpress.org */ |
| | 24 | __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ), |
| | 25 | 'plugins@wordpress.org' |
| | 26 | ) . '</p></div><!-- .plugin-notice -->'; |
| | 27 | } |
| | 28 | } |
| | 29 | |
| | 30 | ?> |
| 16 | 31 | <h2><?php _e( 'Plugin Stats', 'wporg-plugins' ); ?></h2> |
| 17 | 32 | |
| 18 | 33 | <h4><?php _e( 'Active versions', 'wporg-plugins' ); ?></h4> |