You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During debugging I have noticed that the options seem to be loaded many many times during admin init, and I think there is something fundamentally inefficient about the way I've written it. I just don't understand OOP/Classes enough to know how to fix it.
Since each host formats author options a different way, i suspect it may be a case of creating an abstract class in core, and extending it for each host. anyway Silvia if you get a chance, could you summarize for me the proper way to do this?
I think i can do it if you can explain the principle involved! :-)
The text was updated successfully, but these errors were encountered:
I was indeed thinking about creating an abstract class and including it into each of the other classes, but on reflection, it would be difficult to keep the state of the options synchronised. What if somebody else logs onto the site and changes the options while you have them cached and are working on a local copy? It's not simple to avoid re-reading the options all the time. It could be done by checking the timestamp of the last write to Options and if it hasn't changed, use an already cached version. But I'm not sure it makes much sense.
During debugging I have noticed that the options seem to be loaded many many times during admin init, and I think there is something fundamentally inefficient about the way I've written it. I just don't understand OOP/Classes enough to know how to fix it.
Since each host formats author options a different way, i suspect it may be a case of creating an abstract class in core, and extending it for each host. anyway Silvia if you get a chance, could you summarize for me the proper way to do this?
I think i can do it if you can explain the principle involved! :-)
The text was updated successfully, but these errors were encountered: