Преглед на файлове

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

tokul преди 19 години
родител
ревизия
87e81b3e8f
променени са 2 файла, в които са добавени 7 реда и са изтрити 6 реда
  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_TO', 9);
 define('SQM_COL_CC', 10);
 define('SQM_COL_CC', 10);
 define('SQM_COL_BCC', 11);
 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) {
 switch ($sInitLocation) {
     case 'style': session_write_close(); sqsetcookieflush(); break;
     case 'style': session_write_close(); sqsetcookieflush(); break;