Skip to content

Commit

Permalink
Corrects the override of the Menu Item label when a content or media …
Browse files Browse the repository at this point in the history
…item is selected. If the label is empty then it will be automatically generated.
  • Loading branch information
esmeace committed Oct 31, 2023
1 parent cebbbd3 commit c2dfbd2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
closeRemoteModal();
input.value = title;
hidden.value = slug;
label.value = title;
label.value = label.value === "" ? title : label.value;
updateLabel( label );
typeIcon.classList.remove( 'btn-danger' );
typeIcon.classList.add( 'btn-primary' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
fileName = fileParts[ fileParts.length-1 ];
input.value = fileName;
hidden.value = sURL;
label.value = fileName;
label.value = label.value === "" ? fileName : label.value;
updateLabel( label );
typeIcon.classList.remove( 'btn-danger' )
typeIcon.classList.add( 'btn-info' );
Expand Down

0 comments on commit c2dfbd2

Please sign in to comment.