Commit c66a2254 authored by Rolf Forst's avatar Rolf Forst
Browse files

Add clear scheduled hook on deactivation.

parent cf27006c
......@@ -2,7 +2,7 @@
/*
Plugin Name: RRZE Post Expiration
Plugin URI: https://gitlab.rrze.fau.de/rrze-webteam/rrze-post-expiration
Version: 1.2.0
Version: 1.2.1
Description: Verfallsdatum für Beiträge und Seiten.
Author: RRZE-Webteam
License: GPLv2 or later
......@@ -29,6 +29,7 @@ load_plugin_textdomain('rrze-post-expiration', FALSE, dirname(plugin_basename(__
add_action('plugins_loaded', array('RRZE_Post_Expiration', 'instance'));
register_activation_hook(__FILE__, array('RRZE_Post_Expiration', 'activation'));
register_deactivation_hook(__FILE__, array('RRZE_Post_Expiration', 'deactivation'));
class RRZE_Post_Expiration {
......@@ -91,6 +92,10 @@ class RRZE_Post_Expiration {
self::verify_system_requirements();
}
public static function deactivation() {
wp_clear_scheduled_hook(self::$cron_hook);
}
private static function verify_system_requirements() {
$error = '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment