Unexpected behavior with plugins and global variables
|Reported by:||PaulButler||Owned by:|
When a plugin is written as a class, if a class variable is modified in the 'content_save_pre', by the time WordPress calls the 'notices' action the class variable has the same value it did before 'content_save_pre'. I have attached a plugin called test.php to demonstrate this. Make and save a new post in the post editor to test it. This may be a symptom of a larger problem (or feature?) that global variables are not preserved between those two calls (as demonstrated in testglobal.php)
I am using WordPress 2.3.1 on PHP 5 (mod_php) on an Apache2 server.