Making WordPress.org

Ticket #5086: active-installs.diff

File active-installs.diff, 1.5 KB (added by Ipstenu, 4 years ago)
  • trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-controls.php

     
    9090                        $statuses = Status_Transitions::get_allowed_transitions( $post->post_status );
    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();
    9798                $reason_unknown = ( _x( 'Unknown', 'unknown close reason', 'wporg-plugins' ) === $reason_label );
     
    108109
    109110                                <p><?php printf( __( 'Disable Reason: %s', 'wporg-plugins' ), '<strong>' . $reason_label . '</strong>' ); ?></p>
    110111
     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; ?>
     117
    111118                        <?php endif; ?>
    112119
    113120                        <?php