BirdOPrey5
03-04-2012, 07:23 PM
OK so I'm stumped... :eek:
I have code I want to run on postbit_display_complete.
If I declare the function in the plugin or put the function in an external php file and use "require_once" it runs and works fine when i load the thread.
However if I do an ajax / quick-edit to the post and re-save it the code does not run. I assume the function isn't being declared or the file isn't being included.
However if I don't use a function and just put the code directly in the postbit_display_hook then the code runs just fine after saving a quick-edit.
It's like quick-edit runs only the postbit_display_complete hook when saving but it won't get external files or declare a function.
I tried putting the require_once code on ajax_complete hook and several edit_complete hooks with no luck.
Anyone understand what I'm saying and have any ideas? :confused:
I have code I want to run on postbit_display_complete.
If I declare the function in the plugin or put the function in an external php file and use "require_once" it runs and works fine when i load the thread.
However if I do an ajax / quick-edit to the post and re-save it the code does not run. I assume the function isn't being declared or the file isn't being included.
However if I don't use a function and just put the code directly in the postbit_display_hook then the code runs just fine after saving a quick-edit.
It's like quick-edit runs only the postbit_display_complete hook when saving but it won't get external files or declare a function.
I tried putting the require_once code on ajax_complete hook and several edit_complete hooks with no luck.
Anyone understand what I'm saying and have any ideas? :confused: