Rename Dashboard Item

PHOTO EMBED

Sat Jan 08 2022 03:55:05 GMT+0000 (UTC)

Saved by @rebukt #javascript

jQuery(document).ready(function ($) {

  var dashboardItem = '.menu_main li.menu-dashboard a'
  var newDashboardItem = '<span class="icon-main-dashboard"></span>Test Text Here'

  function changeHtml() {
      for (el of newHtml) {
      $(el.selector).html(el.changedTo);
      }
  }
  
  var newHtml = [

       {
    selector: dashboardItem,
    changedTo: newDashboardItem,
       },
  ];
  
  changeHtml();
  }); //end ready function
content_copyCOPY