Bläddra i källkod

hook must be moved because include/constants.php is
loaded before plugins are initialized.

tokul 19 år sedan
förälder
incheckning
87e81b3e8f
2 ändrade filer med 7 tillägg och 6 borttagningar
  1. 0 6
      include/constants.php
  2. 7 0
      include/init.php

+ 0 - 6
include/constants.php

@@ -150,9 +150,3 @@ define('SQM_COL_INT_DATE', 8);
 define('SQM_COL_TO', 9);
 define('SQM_COL_CC', 10);
 define('SQM_COL_BCC', 11);
-
-/**
- * FIXME: error notice on direct load
- * @since 1.2.0
- */
-do_hook('loading_constants');

+ 7 - 0
include/init.php

@@ -284,6 +284,13 @@ if (isset($plugins) && is_array($plugins)) {
     }
 }
 
+/**
+ * Before 1.5.2 version hook was part of functions/constants.php.
+ * After init layout changes, hook had to be moved because include/constants.php is
+ * loaded before plugins are initialized.
+ * @since 1.2.0
+ */
+do_hook('loading_constants');
 
 switch ($sInitLocation) {
     case 'style': session_write_close(); sqsetcookieflush(); break;