Explorar o código

Couple of hooks

Signed-off-by: Suki <[email protected]>
Suki %!s(int64=10) %!d(string=hai) anos
pai
achega
883184646f
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      Sources/Subs-Themes.php

+ 9 - 0
Sources/Subs-Themes.php

@@ -44,6 +44,9 @@ function get_single_theme($id)
 		'based_on',
 	);
 
+	// Make changes if you really want it.
+	call_integration_hook('integrate_get_single_theme', array(&$themeValues, $id));
+
 	$single = array(
 		'id' => (int) $id,
 	);
@@ -105,6 +108,9 @@ function get_all_themes($enable_only = false)
 		'based_on',
 	);
 
+	// Make changes if you really want it.
+	call_integration_hook('integrate_get_all_themes', array(&$themeValues, $enable_only));
+
 	// So, what is it going to be?
 	$query_where = $enable_only ? $enableThemes : $knownThemes;
 
@@ -387,6 +393,9 @@ function theme_install($to_install = array())
 	// This will be theme number...
 	$id_theme++;
 
+	// Last minute changes? although, the actual array is a context value you might want to use the new ID.
+	call_integration_hook('integrate_theme_install', array(&$context['to_install'], $id_theme));
+
 	$inserts = array();
 	foreach ($context['to_install'] as $var => $val)
 		$inserts[] = array($id_theme, $var, $val);