Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

i am creating a wrapper class for wordpress settings API to generate theme options page. i used singleton design pattern to avoid multiple instance. is it the right place to use the pattern ? because wrapper class acts like a helper here so i dont think multiple instances are required.

And when i am extending the wrapper class can i inherit the singleton in child class as well?

child class is basically for custom fields(text,checkbox,etc).

thanks.

share|improve this question
WP is still mostly coded in functional style so there are almost none class-based conventions for API access and such. Simply put - if it makes sense for you and from general PHP programming perspective then it's fine. – Rarst Oct 11 '12 at 18:12

closed as not constructive by Rarst Oct 11 '12 at 18:12

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.

Browse other questions tagged or ask your own question.