Making WordPress.org


Ignore:
Timestamp:
04/28/2020 03:54:17 PM (7 years ago)
Author:
Otto42
Message:

Plugins: Reorg danger zone to separate functions, hide bits from users that don't need to see them. Fixes #5177

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php

    r9723 r9784  
    3434        </table>
    3535
    36         <hr>
     36        <?php
     37                // Display the advanced controls (only seen if the plugin is open).
     38                the_plugin_advanced_zone();
    3739
    38         <h2><?php esc_html_e( 'Advanced Options', 'wporg-plugins' ); ?></h2>
     40                // Display the danger zone (only shown to committers of the plugin).
     41                the_plugin_danger_zone();
     42        ?>
    3943
    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 
    42         <?php the_previous_version_download(); ?>
    43 
    44         <?php if ( current_user_can( 'plugin_admin_edit', $post ) && 'publish' == $post->post_status ) : ?>
    45                 <hr>
    46 
    47                 <h2><?php esc_html_e( 'The Danger Zone', 'wporg-plugins' ); ?></h2>
    48 
    49                 <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>
    50 
    51                 <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>
    52 
    53                 <?php the_plugin_self_transfer_form(); ?>
    54 
    55                 <?php the_plugin_self_close_button(); ?>
    56         <?php endif; // current_user_can ?>
    5744</div>
Note: See TracChangeset for help on using the changeset viewer.