diff --git a/src/js/_enqueues/wp/theme-plugin-editor.js b/src/js/_enqueues/wp/theme-plugin-editor.js index 78a824f12e..6127b2cf7a 100644 --- a/src/js/_enqueues/wp/theme-plugin-editor.js +++ b/src/js/_enqueues/wp/theme-plugin-editor.js @@ -53,6 +53,8 @@ wp.themePluginEditor = (function( $ ) { component.textarea = component.form.find( '#newcontent' ); component.textarea.on( 'change', component.onChange ); component.warning = $( '.file-editor-warning' ); + component.docsLookUpButton = component.form.find( '#docs-lookup' ); + component.docsLookUpList = component.form.find( '#docs-list' ); if ( component.warning.length > 0 ) { component.showWarning(); @@ -77,6 +79,15 @@ wp.themePluginEditor = (function( $ ) { } return undefined; } ); + + component.docsLookUpList.on( 'change', function() { + var option = $( this ).val(); + if ( '' === option ) { + component.docsLookUpButton.prop( 'disabled', true ); + } else { + component.docsLookUpButton.prop( 'disabled', false ); + } + } ); }; /** diff --git a/src/wp-admin/plugin-editor.php b/src/wp-admin/plugin-editor.php index 7b374bc038..6d93ea8ad1 100644 --- a/src/wp-admin/plugin-editor.php +++ b/src/wp-admin/plugin-editor.php @@ -265,7 +265,7 @@ foreach ( $plugins as $plugin_key => $a_plugin ) { -
+
diff --git a/src/wp-admin/theme-editor.php b/src/wp-admin/theme-editor.php index aaa5feb9e3..8135ddb90a 100644 --- a/src/wp-admin/theme-editor.php +++ b/src/wp-admin/theme-editor.php @@ -285,7 +285,7 @@ else :
- +