In reply to Mark.

The plugin is open source, you can see and take any functions you like from there and use them for your needs.

Publishing copy&paste snippets is not advisable as then people without any clue about what is going on will copy them to some code snippets plugin or any other place where they might not work as expected or break their site. Been there, seen that, code copied to wp-includes/functions.php and similar...

The (very low) "hurdle" of knowing how to look into plugin source code is actually a protection for clueless (not in a negative way) people.