92 reputation
19
bio website
location
age
visits member for 3 years, 3 months
seen Jun 11 at 23:21

Media Developer since 1990, working with web, print, audio, video, and music.


Jul
23
awarded  Scholar
Jul
23
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Thanks, that is exactly it. This works perfectly, and appears to use everything within the WP framework.
Jul
23
accepted Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Jul
13
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Hi, thanks, but that also isn't working. I tried that method before, but I did some checking and during both passes, it never sets the post_type to 'revision' when it is in the process function. Both times is registers the same post type, which seems odd. Did you try running this plugin to see if it works? It might be not working do to a bug in WP.
Jul
13
revised Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
added 42 characters in body
Jul
13
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
Sorry, that doesn't work. Feel free to install the plugin to test it. I see the only place that DOING_AUTOSAVE is defined is in wp-admin/admin-ajax.php [956]. It is used only in wp-includes/post.php [4400], but nowhere else that I can find. I also tried setting the hook priority to 20 and it still didn't take. The solution I posted in the comments section works in essence, but I would like to try and conform to the WP framework as close as possible.
Jul
12
awarded  Editor
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
I've posted an example.
Jul
12
revised Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
added 1219 characters in body
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
The limit was 5 minutes to edit, hitting enter submitted prematurely, blame Facebook for the silly enter = submit nonsense.
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
The sample code provided by Wordpress has this same problem: codex.wordpress.org/Function_Reference/add_meta_box The class version. I'll put a generalized version above.
Jul
12
comment Plugin Development: Wordpress processes twice on post update. How to skip process on the first?
I've stuck in simple code in the process function that works, but there must be a flag or something in the Wordpress framework: function process() {global $post, $wthtwice; if ($wthtwice) return; $wthtwice = true;
Jul
12
asked Plugin Development: Wordpress processes twice on post update. How to skip process on the first?