[wp-hackers] How to exntend wp_xmlrpc_server in plugin
Ryan McCue
lists at rotorised.com
Fri Aug 3 12:32:41 UTC 2012
Otto wrote:
> function my_class($name) {
>
> class my_xmlrpc_class extends wp_xmlrpc_server {
> ... class stuff here ...
> }
>
> return 'my_xmlrpc_class';
> }
Correct me if I'm wrong, but wouldn't this have a huge performance
penalty, since you're declaring a class inside a function? (Which IIRC
can't be cached properly by an opcode cache)
(In this case, I'm assuming it's necessary since wp_xmlrpc_server won't
be declared when the plugin is loaded, but I'd like to make sure.)
--
Ryan McCue
<http://ryanmccue.info/>
More information about the wp-hackers
mailing list