- Timestamp:
- 11/30/2020 02:29:42 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/tags-suggest.js
r49703 r49710 41 41 // Do not initialize if the element doesn't exist. 42 42 if ( ! $element.length ) { 43 return ;43 return this; 44 44 } 45 45 … … 157 157 158 158 // Ensure the autocomplete instance exists. 159 if ( $element.autocomplete( 'instance' ) ) { 160 $element.autocomplete( 'instance' )._renderItem = function( ul, item ) { 161 return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' ) 162 .text( item.name ) 163 .appendTo( ul ); 164 }; 159 if ( ! $element.autocomplete( 'instance' ) ) { 160 return this; 165 161 } 162 163 $element.autocomplete( 'instance' )._renderItem = function( ul, item ) { 164 return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' ) 165 .text( item.name ) 166 .appendTo( ul ); 167 }; 166 168 167 169 $element.attr( { … … 179 181 $element.autocomplete( 'search' ); 180 182 } 181 } ) 183 } ); 184 182 185 // Returns a jQuery object containing the menu element. 183 .autocomplete( 'widget' )186 $element.autocomplete( 'widget' ) 184 187 .addClass( 'wp-tags-autocomplete' ) 185 188 .attr( 'role', 'listbox' )
Note: See TracChangeset
for help on using the changeset viewer.