| 1 | *** wp-mail-orig.php 2008-05-26 00:50:15.000000000 +0900 |
|---|
| 2 | --- wp-mail.php 2008-07-05 09:16:30.000000000 +0900 |
|---|
| 3 | *************** |
|---|
| 4 | *** 9,14 **** |
|---|
| 5 | --- 9,23 ---- |
|---|
| 6 | /** Make sure that the WordPress bootstrap has ran before continuing. */ |
|---|
| 7 | require(dirname(__FILE__) . '/wp-load.php'); |
|---|
| 8 | |
|---|
| 9 | + /** Keep certain intervals to fetch mail messages. */ |
|---|
| 10 | + if (! defined('WP_MAIL_INTERVAL')) |
|---|
| 11 | + define('WP_MAIL_INTERVAL', 5); |
|---|
| 12 | + |
|---|
| 13 | + $last_checked = get_option('mailserver_last_checked'); |
|---|
| 14 | + $interval = intval(WP_MAIL_INTERVAL); |
|---|
| 15 | + if ($interval < 1 || $last_checked < 0 || $interval * 60 > (time() - $last_checked)) |
|---|
| 16 | + exit; |
|---|
| 17 | + |
|---|
| 18 | /** Get the POP3 class for which to access the mailbox. */ |
|---|
| 19 | require_once(ABSPATH.WPINC.'/class-pop3.php'); |
|---|
| 20 | |
|---|