Selaa lähdekoodia

add hook_house_keeping

Andrew Dolgov 10 vuotta sitten
vanhempi
commit
8e47022036
2 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. 1 0
      classes/pluginhost.php
  2. 5 0
      include/rssfuncs.php

+ 1 - 0
classes/pluginhost.php

@@ -38,6 +38,7 @@ class PluginHost {
 	const HOOK_PREFS_SAVE_FEED = 21;
 	const HOOK_FETCH_FEED = 22;
 	const HOOK_QUERY_HEADLINES = 23;
+	const HOOK_HOUSE_KEEPING = 24;
 
 	const KIND_ALL = 1;
 	const KIND_SYSTEM = 2;

+ 5 - 0
include/rssfuncs.php

@@ -1378,5 +1378,10 @@
 		$rc = cleanup_tags( 14, 50000);
 
 		_debug("Cleaned $rc cached tags.");
+
+		foreach ($pluginhost->get_hooks(PluginHost::HOOK_HOUSE_KEEPING) as $plugin) {
+			$plugin->hook_house_keeping();
+		}
+
 	}
 ?>