Site ignoring 'after_setup_theme' hook
-
I’m using WordPress 3.4-beta4-20778
Here is the code.
add_action('after_setup_theme', 'theme_activation'); function theme_activation(){ wp_schedule_event(time(), 'twicedaily', 'hourly_uploads_cleanup'); flush_rewrite_rules(); }
I haven’t used this hook before but I understand it is supposed to only fire when the theme is activated. But each time I refresh my site I see more cron jobs added..
(using Cron GUI)
May 15, 2012 @ 6:59 (1337065164) Twice Daily hourly_uploads_cleanup May 15, 2012 @ 6:59 (1337065181) Twice Daily hourly_uploads_cleanup May 15, 2012 @ 6:59 (1337065185) Twice Daily hourly_uploads_cleanup May 15, 2012 @ 6:59 (1337065186) Twice Daily hourly_uploads_cleanup May 15, 2012 @ 6:59 (1337065193) Twice Daily hourly_uploads_cleanup May 15, 2012 @ 7:02 (1337065330) Twice Daily hourly_uploads_cleanup
Is my code wrong or is this a bug?
Thank you.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Site ignoring 'after_setup_theme' hook’ is closed to new replies.