Ticket #1560: 1560.combo.diff
File 1560.combo.diff, 6.1 KB (added by , 5 years ago) |
---|
-
trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php
17 17 <div id="admin" class="section"> 18 18 <?php the_closed_plugin_notice(); ?> 19 19 20 <h2><?php esc_html_e( ' Plugin Stats', 'wporg-plugins' ); ?></h2>20 <h2><?php esc_html_e( 'Statistics', 'wporg-plugins' ); ?></h2> 21 21 22 22 <h4><?php esc_html_e( 'Active versions', 'wporg-plugins' ); ?></h4> 23 23 <div id="plugin-version-stats" class="chart version-stats"></div> … … 28 28 <h4><?php esc_html_e( 'Active Install Growth', 'wporg-plugins' ); ?></h4> 29 29 <div id="plugin-growth-stats" class="chart download-stats"></div> 30 30 31 <h 5><?php esc_html_e( 'Downloads history', 'wporg-plugins' ); ?></h5>31 <h4><?php esc_html_e( 'Downloads history', 'wporg-plugins' ); ?></h4> 32 32 <table id="plugin-download-history-stats" class="download-history-stats"> 33 33 <tbody></tbody> 34 34 </table> 35 35 36 <hr> 37 38 <h2><?php esc_html_e( 'Advanced Options', 'wporg-plugins' ); ?></h2> 39 40 <p><?php esc_html_e( 'This section is intended for advanced users and developers only. They are presented here for testing and educational purposes.', 'wporg-plugins' ); ?></p> 41 36 42 <?php the_previous_version_download(); ?> 37 43 44 <hr> 45 46 <h2><?php esc_html_e( 'The Danger Zone', 'wporg-plugins' ); ?></h2> 47 48 <p><?php esc_html_e( 'The following features are restricted to plugin committers only. They exist to allow plugin developers more control over their work.', 'wporg-plugins' ); ?></p> 49 50 <div class="plugin-notice notice notice-error notice-alt"><p><?php esc_html_e( 'These features often cannot be undone without intervention. Please do not attempt to use them unless you are absolutely certain. When in doubt, contact the plugins team for assistance.', 'wporg-plugins' ); ?><p></div> 51 38 52 <?php the_plugin_self_close_button(); ?> 39 53 </div> -
trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/inc/template-tags.php
283 283 // List Trunk, followed by the most recent non-stable release. 284 284 $tags = array_reverse( $tags ); 285 285 286 echo '<h5>' . esc_html__( 'Previous Versions', 'wporg-plugins' ) . '</h5>'; 287 echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . esc_html__( 'Previous versions of this plugin may not be secure or stable and are available for testing purposes only.', 'wporg-plugins' ) . '</p></div>'; 286 echo '<h4>' . esc_html__( 'Previous Versions', 'wporg-plugins' ) . '</h4>'; 288 287 288 echo '<p>' . esc_html__( 'Please select a specific version to download.', 'wporg-plugins' ) . '</p>'; 289 290 echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . esc_html__( 'Previous versions of plugins may not be secure or stable. They are not recommended for use on production websites.', 'wporg-plugins' ) . '</p></div>'; 291 289 292 echo '<select class="previous-versions" onchange="getElementById(\'download-previous-link\').href=this.value;">'; 290 293 foreach ( $tags as $version ) { 291 294 $text = ( 'trunk' === $version ? esc_html__( 'Development Version', 'wporg-plugins' ) : $version ); … … 302 305 303 306 /** 304 307 * Displays a form for plugin committers to self-close a plugin. Permanently. 308 * It is disabled for plugins with 20,000+ users. 305 309 */ 306 310 function the_plugin_self_close_button() { 307 $post = get_post(); 311 $post = get_post(); 312 $active_installs = (int) get_post_meta( $post->ID, 'active_installs', true ); 308 313 309 314 if ( ! current_user_can( 'plugin_admin_edit', $post ) || 'publish' != $post->post_status ) { 310 315 return; 311 316 } 312 317 313 $close_link = Template::get_self_close_link( $post ); 318 echo '<h4>' . esc_html__( 'Close This Plugin', 'wporg-plugins' ) . '</h4>'; 319 echo '<p>' . esc_html__( 'This plugin is currently open. All developers have the ability to close their own plugins at any time.', 'wporg-plugins' ) . '</p>'; 314 320 315 ?> 316 <h5><?php esc_html_e( 'Close This Plugin', 'wporg-plugins' ); ?></h5> 317 <div class="plugin-notice notice notice-warning notice-alt"><p><?php _e( '<strong>Warning:</strong> Closing your plugin is intended to be a permanent action. You will not be able to reopen it without contacting the plugins team.', 'wporg-plugins' ); ?></p></div> 321 echo '<div class="plugin-notice notice notice-warning notice-alt"><p>'; 322 if ( $active_installs >= '20000' ) { 323 // Translators: %s is the plugin team email address. 324 echo sprintf( esc_html__( '<strong>Notice:</strong> Due to the high volume of users for this plugin it cannot be closed without speaking directly to the plugins team. Please contact <a href="mailto:%1$s">%1$s</a> with a link to the plugin and explanation as to why it should be closed.', 'wporg-plugins' ), 'plugins@wordpress.org' ); 325 } else { 326 $close_link = Template::get_self_close_link( $post ); 327 echo esc_html__( '<strong>Warning:</strong> Closing a plugin is intended to be a <em>permanent</em> action. There is no way to reopen a plugin without contacting the plugins team.', 'wporg-plugins' ); 328 } 329 echo '</p></div>'; 318 330 319 <form method="POST" action="<?php echo esc_url( $close_link ); ?>"> 320 <p> 321 <input class="button" type="submit" value="<?php echo esc_attr( sprintf( __( 'I understand, please close %s.', 'wporg-plugins' ), get_the_title() ) ); ?>" /> 322 </p> 323 </form> 324 <?php 325 } 326 No newline at end of file 331 if ( isset( $close_link ) ) { 332 echo '<form method="POST" action="' . esc_url( $close_link ) . '">"'; 333 // Translators: $s is the plugin name, as defined by the plugin itself. 334 echo '<p><input class="button" type="submit" value="' . esc_attr( sprintf( __( 'I understand, please close %s.', 'wporg-plugins' ), get_the_title() ) ) . '" /></p>'; 335 echo '</form>'; 336 } 337 }