Changeset 49703
- Timestamp:
- 11/28/2020 12:44:44 PM (4 years ago)
- Location:
- trunk/src/js/_enqueues/admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/inline-edit-post.js
r49213 r49703 329 329 textarea = $('textarea.tax_input_' + taxname, editRow), 330 330 comma = wp.i18n._x( ',', 'tag delimiter' ).trim(); 331 332 // Ensure the textarea exists. 333 if ( ! textarea.length ) { 334 return; 335 } 331 336 332 337 terms.find( 'img' ).replaceWith( function() { return this.alt; } ); -
trunk/src/js/_enqueues/admin/tags-suggest.js
r48650 r49703 38 38 var last; 39 39 var $element = $( this ); 40 41 // Do not initialize if the element doesn't exist. 42 if ( ! $element.length ) { 43 return; 44 } 40 45 41 46 options = options || {}; … … 147 152 $element.on( 'keydown', function() { 148 153 $element.removeAttr( 'aria-activedescendant' ); 149 } ) 150 .autocomplete( options ) 151 .autocomplete( 'instance' )._renderItem = function( ul, item ) { 152 return $( '<li role="option" id="wp-tags-autocomplete-' + item.id + '">' ) 153 .text( item.name ) 154 .appendTo( ul ); 155 }; 154 } ); 155 156 $element.autocomplete( options ); 157 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 }; 165 } 156 166 157 167 $element.attr( {
Note: See TracChangeset
for help on using the changeset viewer.