WordPress.org

Make WordPress Core

Changeset 17806


Ignore:
Timestamp:
05/05/2011 05:24:15 AM (7 years ago)
Author:
dd32
Message:
  • Allow Pagination for Must-Use/Dropin plugins
  • Respect WP_CONTENT_DIR & WPMU_PLUGIN_DIR for help text
  • Move help text into WP_Plugins_List_Table

See #17327

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-plugins-list-table.php

    r17771 r17806  
    196196    }
    197197
    198     function display_tablenav( $which ) {
    199         global $status;
    200 
    201         if ( !in_array( $status, array( 'mustuse', 'dropins' ) ) )
    202             parent::display_tablenav( $which );
    203     }
    204 
    205198    function get_views() {
    206199        global $totals, $status;
     
    287280        global $status;
    288281
    289         if ( 'recently_activated' == $status ) { ?>
    290             <div class="alignleft actions">
    291                 <?php submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false ); ?>
    292             </div>
    293         <?php }
     282        if ( ! in_array($status, array('recently_activated', 'mustuse', 'dropins') ) )
     283            return;
     284
     285        echo '<div class="alignleft actions">';
     286
     287        if ( 'recently_activated' == $status )
     288            submit_button( __( 'Clear List' ), 'secondary', 'clear-recent-list', false );
     289        elseif ( 'top' == $which && 'mustuse' == $status )
     290            echo '<p>' . sprintf( __( 'Files in the <code>%s</code> directory are executed automatically.' ), str_replace( ABSPATH, '/', WPMU_PLUGIN_DIR ) ) . '</p>';
     291        elseif ( 'top' == $which && 'dropins' == $status )
     292            echo '<p>' . sprintf( __( 'Drop-ins are advanced plugins in the <code>%s</code> directory that replace WordPress functionality when present.' ), str_replace( ABSPATH, '', WP_CONTENT_DIR ) ) . '</p>';
     293
     294        echo '</div>';
    294295    }
    295296
  • trunk/wp-admin/plugins.php

    r17800 r17806  
    406406<input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
    407407
    408 <?php
    409 if ( 'mustuse' == $status )
    410     echo '<br class="clear" /><p>' . __( 'Files in the <code>/wp-content/mu-plugins</code> directory are executed automatically.' ) . '</p>';
    411 elseif ( 'dropins' == $status )
    412     echo '<br class="clear" /><p>' . __( 'Drop-ins are advanced plugins in the <code>/wp-content</code> directory that replace WordPress functionality when present.' ) . '</p>';
    413 ?>
    414 
    415408<?php $wp_list_table->display(); ?>
    416409</form>
Note: See TracChangeset for help on using the changeset viewer.