I developed with 1.0 locally. Everything seemed to work fine. After uploading and activating on another site, I was greeted an error "unexpected T_PAAMAYIM_NEKUDOTAYIM" on line 501. This line is:
By manually replacing "$class_name" with "Post_Options_API_1_0", it fixed the error, although the same type of error popped up on line 512. I implemented the same fix for that error.
After some searching, I learned that this occurred because my dev server is running PHP 5.3.6, while the other server is on 5.2.14. PHP.net's article on scope resolution operator's states: "As of PHP 5.3.0, it's possible to reference the class using a variable." So, I guess this is only compatible with PHP 5.3+.
I think that either these functions should be altered, or there should be a note that the API will only work with 5.3+
Yeah PHP version is another thing we'll have to deal with. I wouldn't want this to work with 5.3+ only so I'll probably find a way, even If I have to do it through create_function :) Thanks for reporting this!
resolving issue #1, using call_user_func instead
There we go. Zack, I tested this with 5.2 seems to work fine, if you have some time would you please give it a spin as well? Should work fine since I'm now using call_user_func, thanks!
I can confirm that this is fixed. Nice work!