Make WordPress Core

Ticket #9393: 9393-plugin-editor.diff

File 9393-plugin-editor.diff, 967 bytes (added by sivel, 16 years ago)

check if variable is set rather than counting it

  • wp-admin/plugin-editor.php

     
    174174                <input type="hidden" name="file" value="<?php echo $file ?>" />
    175175                <input type="hidden" name="plugin" value="<?php echo $plugin ?>" />
    176176                </div>
    177                 <?php if ( count( $functions ) ) : ?>
     177                <?php if ( isset( $functions ) ) : ?>
    178178                <div id="documentation"><label for="docs-list">Documentation:</label> <?php echo $docs_select ?> <input type="button" class="button" value=" <?php _e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div>
    179179                <?php endif; ?>
    180180<?php if ( is_writeable($real_file) ) : ?>