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..61273416 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(); |
124 | 128 | <?php endif; ?> |
125 | 129 | </div> |
126 | 130 | |
127 | | <?php the_title( '<h1 class="plugin-title"><a href="' . esc_url( get_permalink() ) . '">', '</a></h1>' ); ?> |
| 131 | <?php |
| 132 | apply_filters( 'the_title', function() { return ;} ); |
| 133 | the_title( '<h1 class="plugin-title"><a href="' . esc_url( get_permalink() ) . '">', '</a></h1>' ); ?> |
128 | 134 | |
129 | 135 | <span class="byline"><?php |
130 | 136 | $url = get_post_meta( get_the_ID(), 'header_author_uri', true ); |
… |
… |
$status = get_post_status(); |
149 | 155 | <ul class="tabs clear"> |
150 | 156 | <li id="tablink-description"><a href='#description'><?php _e( 'Details', 'wporg-plugins' ); ?></a></li> |
151 | 157 | <li id="tablink-reviews"><a href='#reviews'><?php _e( 'Reviews', 'wporg-plugins' ); ?></a></li> |
152 | | <?php if ( isset( $content[ 'installation' ] ) ) { ?> |
| 158 | <?php if ( isset( $content[ 'installation' ] ) && ! in_array( $status, array( 'closed', 'disabled' ) ) ) { ?> |
153 | 159 | <li id="tablink-installation"><a href='#installation'><?php _e( 'Installation', 'wporg-plugins' ); ?></a></li> |
154 | 160 | <?php } ?> |
155 | 161 | <li id="tablink-support"><a href='<?php echo Template::get_support_url(); ?>'><?php _e( 'Support', 'wporg-plugins' ); ?></a></li> |
… |
… |
$status = get_post_status(); |
168 | 174 | continue; |
169 | 175 | } |
170 | 176 | |
171 | | $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) ); |
| 177 | if ( 'description' === $section_slug && in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| 178 | // Don't show the description for closed plugins |
| 179 | $section_content = '<div class="plugin-notice notice notice-error notice-alt"><p>' . $message . '</p></div>'; |
| 180 | if ( get_current_user_id() == get_post()->post_author ) { |
| 181 | $section_content .= '<div class="plugin-notice notice notice-info notice-alt"><p>' . |
| 182 | sprintf( |
| 183 | /* translators: 1: plugins@wordpress.org */ |
| 184 | __( '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' ), |
| 185 | 'plugins@wordpress.org' |
| 186 | ) . '</p></div><!-- .plugin-notice -->'; |
| 187 | } |
| 188 | } |
| 189 | else if ( in_array( $section_slug, array( 'screenshots', 'installation', 'faq', 'changelog' ) ) && in_array( $status, array( 'closed', 'disabled' ) ) ) { |
| 190 | $section_content = ''; |
| 191 | } |
| 192 | else { |
| 193 | $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) ); |
| 194 | } |
| 195 | |
172 | 196 | if ( empty( $section_content ) ) { |
173 | 197 | continue; |
174 | 198 | } |
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..55b0c6e4 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> |