I am not a lawyer. This is not legal advice.
<cite>"If the program dynamically links plug-ins, but the communication between them is limited to invoking the 'main' function of the plug-in with some options and waiting for it to return, that is a borderline case." --> and this is exactly what happens in wordpress plugins</cite>
Most of the plugins I've written use the global $wpdb object, and vsrious WordPress functions (
get_currentuserdata() for example). That is a far cry from merely invoking the main function and returning some data. It is because of this that WordPress plugins are required to be GPL compliant. If you can make a plugin that does not use WordPress functions or data structures, then you are free to license it however you want.
WordPress themes are similar in many ways: they use the template functions, and the Loop, to make stuff happen. Without those template functions, and without the Loop, the theme isn't very useful.
Please note that the GPL says nothing about copyright. I retain the copyright on all my plugins. A theme author is encouraged to retain the copyright on their themes.
Also note that the GPL does not restrict you from selling your work. You may sell plugins and themes. But be advised that selling plugins (and arguably themes) grants to the purchaser all the privileges of the GPL, which means that they are free to use your work for any purpose, and that they are free to distribute your work to others.