Skip to content

Commit 8b5f80f

Browse files
committed
Moved clearMedia function to admin theme js
1 parent 959bc77 commit 8b5f80f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

public/js/admin/functions.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,7 @@ function removeRow(element, elementName = false) {
4444
return row.remove();
4545
}
4646

47-
48-
function clearMedia(id = "featured-image") {
49-
document.getElementById(id + "-input").value = "";
50-
document.getElementById(id + "-thumb").setAttribute("src","img/placeholder.svg");
51-
}
52-
53-
const slugify = (str) => {
47+
function slugify(str) {
5448
if (str) {
5549
return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '') // Remove accents
5650
.replace(/([^\w]+|\s+)/g, '-') // Replace space and other characters by hyphen

0 commit comments

Comments
 (0)