WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/16/2019 06:00:23 AM (3 years ago)
Author:
pento
Message:

Plugin Editor: Disable the documentation look up button when no function is selected.

Props xkon.
Fixes #41143.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/theme-editor.php

    r43571 r44617  
    286286        <label for="docs-list"><?php _e( 'Documentation:' ); ?></label>
    287287        <?php echo $docs_select; ?>
    288         <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" />
     288        <input disabled id="docs-lookup" type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&amp;locale=<?php echo urlencode( get_user_locale() ); ?>&amp;version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&amp;redirect=true'); }" />
    289289        </div>
    290290    <?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.