WordPress.org

Make WordPress Core

Ticket #27440: 27440-changeset-29041.diff

File 27440-changeset-29041.diff, 851 bytes (added by michalzuber, 4 years ago)

Added braces and reuse the tab variable in if condition.

  • wp-admin/js/plugin-install.js

     
    5454                $( '#plugin-information-tabs a.current' ).removeClass( 'current' );
    5555                $( this ).addClass( 'current' );
    5656                //Only show the fyi box in the description section, on smaller screen, where it's otherwise always displayed at the top.
    57                 if ( 'description' != $( this ).attr( 'name' ) && $( 'body').width() < 830 )
     57                if ( 'description' != tab && $( 'body' ).width() < 830 ) {
    5858                        $( '#plugin-information-content div.fyi' ).hide();
    59                 else
     59                } else {
    6060                        $( '#plugin-information-content div.fyi' ).show();
     61                }
    6162                //Flip the content.
    6263                $( '#section-holder div.section' ).hide(); //Hide 'em all
    6364                $( '#section-' + tab ).show();