Changeset 44617
- Timestamp:
- 01/16/2019 06:00:23 AM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/theme-plugin-editor.js
r43347 r44617 54 54 component.textarea.on( 'change', component.onChange ); 55 55 component.warning = $( '.file-editor-warning' ); 56 component.docsLookUpButton = component.form.find( '#docs-lookup' ); 57 component.docsLookUpList = component.form.find( '#docs-list' ); 56 58 57 59 if ( component.warning.length > 0 ) { … … 77 79 } 78 80 return undefined; 81 } ); 82 83 component.docsLookUpList.on( 'change', function() { 84 var option = $( this ).val(); 85 if ( '' === option ) { 86 component.docsLookUpButton.prop( 'disabled', true ); 87 } else { 88 component.docsLookUpButton.prop( 'disabled', false ); 89 } 79 90 } ); 80 91 }; -
trunk/src/wp-admin/plugin-editor.php
r44331 r44617 266 266 </div> 267 267 <?php if ( ! empty( $docs_select ) ) : ?> 268 <div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e( 'Documentation:' ); ?></label> <?php echo $docs_select; ?> <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() ) + '&locale=<?php echo urlencode( get_user_locale() ); ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&redirect=true'); }" /></div>268 <div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e( 'Documentation:' ); ?></label> <?php echo $docs_select; ?> <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() ) + '&locale=<?php echo urlencode( get_user_locale() ); ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&redirect=true'); }" /></div> 269 269 <?php endif; ?> 270 270 <?php if ( is_writeable( $real_file ) ) : ?> -
trunk/src/wp-admin/theme-editor.php
r43571 r44617 286 286 <label for="docs-list"><?php _e( 'Documentation:' ); ?></label> 287 287 <?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() ) + '&locale=<?php echo urlencode( get_user_locale() ); ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&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() ) + '&locale=<?php echo urlencode( get_user_locale() ); ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ); ?>&redirect=true'); }" /> 289 289 </div> 290 290 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.