admin管理员组文章数量:1336208
Problem is solved.
I have built a theme options class so i can build as many option pages as i want, an i implement a singleton design pattern to fetch options only once, and i have WPML plugin installed so i am trying to make options multilingual using the available hook wpml_multilingual_options
and every thing seems to be saved and also displayed correctly on frontend but unfortunately in the admin it keeps showing the none translated options, so i am guessing that the singleton object is called somehow before the init
hook where the wpml_multilingual_options
is hooked to. But i can't find where exactly that singleton object is. can i track an object of the same singleton to find out the path of where the first instantiation occurs.
Problem is solved.
I have built a theme options class so i can build as many option pages as i want, an i implement a singleton design pattern to fetch options only once, and i have WPML plugin installed so i am trying to make options multilingual using the available hook wpml_multilingual_options
and every thing seems to be saved and also displayed correctly on frontend but unfortunately in the admin it keeps showing the none translated options, so i am guessing that the singleton object is called somehow before the init
hook where the wpml_multilingual_options
is hooked to. But i can't find where exactly that singleton object is. can i track an object of the same singleton to find out the path of where the first instantiation occurs.
1 Answer
Reset to default 1I have found out how to track the object, by using the debug_print_backtrace()
within the constructor, and now my issue has been solved
本文标签: plugin developmentHow to find where an object first instantiatiation
版权声明:本文标题:plugin development - How to find where an object first instantiatiation 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742398674a2467441.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论