I am writing a custom plugin. What I am looking for at the moment is a way to run a function to change the html of the page AFTER it has been fully build but BEFORE it is being sent to the browser. I want to make sure that my plugins function is the last thing that runs. No other plugin should run after my code. Can anyone help
maybe you can use the $priority arg of the add_filter/add_action function, and the 'plugins_loaded' hook ("Runs after all plugins have been loaded. ")
Just from a quick google, I stumbled across http://wordpress.org/support/topic/how-to-change-plugins-load-order There appears to be a way to specify the order in which the actions of plugins run. add_action( 'hook_name', 'callback_name' ); // Default third value of 10 ..or.. add_action( 'hook_name', 'callback_name', 100 ); ..or.. add_filter( 'hook_name', 'callback_name' ); // Default third value of 10 ..or.. add_filter( 'hook_name', 'callback_name', 100 ); Code (markup): Just read the thread and see if it is of any use. Generally, they will run after the content has been gained. So set the priority to a large number The specific comment is http://wordpress.org/support/topic/how-to-change-plugins-load-order#post-1564605