Ticket #43058: 43058.patch
| File 43058.patch, 2.2 KB (added by , 8 years ago) |
|---|
-
wp-admin/js/theme-plugin-editor.js
73 73 } 74 74 return undefined; 75 75 } ); 76 77 $( document ).on('keyup', '#plugin-files-search, #theme-files-search', component._searchFile); 76 78 }; 77 79 78 80 /** 81 * Search file. 82 * 83 * @since 4.9.2 84 * @returns {void} 85 */ 86 component._searchFile = function() { 87 var parent = $('#templateside'); 88 var directories = parent.find('ul ul li'); 89 var files = parent.find('ul ul li a'); 90 91 // Expand all directories. 92 directories.attr('aria-expanded', true); 93 94 // Hide Directories. Becuase, Below we show those directories 95 // which have search term in the file name. 96 directories.hide(); 97 98 // Search file and ONLY show these directories which "contain" the file name. 99 var rex = new RegExp( $(this).val(), 'i'); 100 files.filter(function () { 101 var file_name = $.trim( $(this).text() ) || ''; 102 return rex.test( file_name ); 103 }).parents('li').show(); 104 }; 105 106 /** 79 107 * Set up and display the warning modal. 80 108 * 81 109 * @since 4.9.0 -
wp-admin/plugin-editor.php
232 232 233 233 <div id="templateside"> 234 234 <h2 id="plugin-files-label"><?php _e( 'Plugin Files' ); ?></h2> 235 <input id="plugin-files-search" type="text" placeholder="<?php _e( 'Search file..' ); ?>"> 235 236 236 237 <?php 237 238 $plugin_editable_files = array(); -
wp-admin/theme-editor.php
229 229 ?> 230 230 <div id="templateside"> 231 231 <h2 id="theme-files-label"><?php _e( 'Theme Files' ); ?></h2> 232 <input id="theme-files-search" type="text" placeholder="<?php _e( 'Search file..' ); ?>"> 232 233 <ul role="tree" aria-labelledby="theme-files-label"> 233 234 <?php if ( ( $has_templates || $theme->parent() ) && $theme->parent() ) : ?> 234 235 <li class="howto">