Advertisement
chrishajer

Poll results performance from change_log.txt

Oct 6th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. Notes: The wp_cron job will take over the calculation of the results if 5 seconds is not long enough at the time of form submission/update.
  2. The default schedule is set to hourly to avoid heavy loads on the server but the frequency can be changed by using the gform_polls_cron_schedule filter.
  3. The format follows the same format required by the WordPress cron_schedules filter. http://codex.wordpress.org/Function_Reference/wp_get_schedules
  4.  
  5. ** Important: the Polls Add-On must be deactivated and reactivated in order to reschedule the task.
  6. Example usage:
  7. add_filter( 'gform_polls_cron_schedule', 'cron_add_twice_hourly' );
  8. function cron_add_twice_hourly() {
  9. // Adds once weekly to the existing schedules.
  10. $schedule['twicehourly'] = array(
  11. 'interval' => 1800, // number of seconds in the interval
  12. 'display' => __( 'Twice Hourly' )
  13. );
  14. return $schedule;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement