id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses
24972 wp_dropdown_roles() multiple pre-selected options PauloASilva "Hi,
I would like to suggest a patch to wp_dropdown_roles() to enable multiple pre-selected options.
Below you'll find the diff and the full featured function.
I'm not sure whether Trac is the right place to put this. If not, please let me know how to procede
{{{
diff -r e185f8cbbec5 wp-admin/includes/template.php
--- a/wp-admin/includes/template.php Tue Aug 06 11:50:50 2013 +0100
+++ b/wp-admin/includes/template.php Tue Aug 06 19:11:37 2013 +0100
@@ -751,9 +751,19 @@
/**
* Print out "";
+ if ( is_array($selected) AND in_array($role,$selected) ) // preselect specified role
+ $p .= ""\n\t"";
else
$r .= ""\n\t"";
}
}}}
{{{
/**
* Print out "";
else
$r .= ""\n\t"";
}
echo $p . $r;
}
}}}" enhancement new normal Awaiting Review Users 3.6 normal has-patch needs-refresh administration, template