Last Updated: February 25, 2016
·
374
· styledev

Quick Select Authors during WP Import

jQuery('#authors li').each(function(){
  var strong = jQuery(this).find('strong').html(),
  strong_end = strong.indexOf(' ('),
  name = strong.substring(0,strong_end),
  select_field = jQuery(this).find('select');
select_field.find("option:contains('"+name+"')").prop("selected","selected");
})