Making WordPress.org

Changeset 9591


Ignore:
Timestamp:
03/16/2020 05:16:58 AM (5 years ago)
Author:
tellyworth
Message:

Plugin dir: warn against closing popular plugins.

Props ipstenu.
Fixes #5086.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php

    r6287 r9591  
    9191        }
    9292
    93         $close_reasons = Template::get_close_reasons();
    94         $close_reason  = (string) get_post_meta( $post->ID, '_close_reason', true );
     93        $close_reasons   = Template::get_close_reasons();
     94        $close_reason    = (string) get_post_meta( $post->ID, '_close_reason', true );
     95        $active_installs = (int) get_post_meta( $post->ID, 'active_installs', true );
    9596
    9697        $reason_label   = Template::get_close_reason();
     
    108109
    109110                <p><?php printf( __( 'Disable Reason: %s', 'wporg-plugins' ), '<strong>' . $reason_label . '</strong>' ); ?></p>
     111
     112            <?php elseif ( 'publish' === $post->post_status ) : ?>
     113
     114                <?php if ( $active_installs >= '20000' ) : ?>
     115                    <p><strong><?php _e( 'Notice:', 'wporg-plugins' ); ?></strong> <?php _e( 'Due to the large volume of active users, the developers should be warned and their plugin remain open save under extreme circumstances.', 'wporg-plugins' ); ?>.</p>
     116                <?php endif; ?>
    110117
    111118            <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.