WordPress.org

Make WordPress Core

Changeset 41915


Ignore:
Timestamp:
10/18/2017 05:58:00 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Plugins: After [41608], make the markup in WP_Plugin_Install_List_Table::no_items() a bit more readable.

See #37430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r41878 r41915  
    256256            if ( $upgrade_plugins ) {
    257257                $js_plugins['upgrade'] = array_values( $upgrade_plugins );
    258             }
     258    }
    259259
    260260            wp_localize_script( 'updates', '_wpUpdatesItemCounts', array(
     
    268268     */
    269269    public function no_items() {
    270         if ( isset( $this->error ) ) {
    271             echo '<div class="inline error"><p>' . $this->error->get_error_message() . '</p><p class="hide-if-no-js"><button class="button try-again">' . __( 'Try Again' ) . '</button></p></div>';
    272         } else {
    273             echo '<div class="no-plugin-results">' . __( 'No plugins found. Try a different search.' ) . '</div>';
     270        if ( isset( $this->error ) ) { ?>
     271            <div class="inline error"><p><?php echo $this->error->get_error_message(); ?></p>
     272                <p class="hide-if-no-js"><button class="button try-again"><?php _e( 'Try Again' ); ?></button></p>
     273            </div>
     274        <?php } else { ?>
     275            <div class="no-plugin-results"><?php _e( 'No plugins found. Try a different search.' ); ?></div>
     276        <?php
    274277        }
    275278    }
Note: See TracChangeset for help on using the changeset viewer.