| @@ -129,8 +129,19 @@ | ||
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | + * Reschedule preload action on plugin activation if page cache enabled. | |
| 134 | + * | |
| 135 | + * @return void | |
| 136 | + */ | |
| 137 | + public function maybe_reschedule_preload_on_activation() { | |
| 138 | + if ($this->get_cache_config('enable_page_caching')) { | |
| 139 | + $this->reschedule_preload(); | |
| 140 | + } | |
| 141 | + } | |
| 142 | + | |
| 143 | + /** | |
| 133 | 144 | * Check if scheduled preload enabled. |
| 134 | 145 | * |
| 135 | 146 | * @return bool |
| 136 | 147 | */ |