Revisão | 29b0763fb340df4b7ef74951c7447e8f456e572e (tree) |
---|---|
Hora | 2014-11-29 15:09:47 |
Autor | henoheno <henoheno> |
Commiter | umorigu |
BugTrack2/246: do_plugin_init(): KISS. $checked what => init $done
@@ -67,18 +67,18 @@ function exist_plugin_inline($name) { | ||
67 | 67 | function_exists('plugin_' . $name . '_inline') : FALSE; |
68 | 68 | } |
69 | 69 | |
70 | -// Do init the plugin | |
71 | -// NOTE: Returning FALSE from $func, means "an erorr occurerd" | |
70 | +// Call 'init' function for the plugin | |
71 | +// NOTE: Returning FALSE means "An erorr occurerd" | |
72 | 72 | function do_plugin_init($name) |
73 | 73 | { |
74 | - static $checked = array(); | |
74 | + static $done = array(); | |
75 | 75 | |
76 | - if (! isset($checked[$name])) { | |
76 | + if (! isset($done[$name])) { | |
77 | 77 | $func = 'plugin_' . $name . '_init'; |
78 | - $checked[$name] = (! function_exists($func) || call_user_func($func) !== FALSE); | |
78 | + $done[$name] = (! function_exists($func) || call_user_func($func) !== FALSE); | |
79 | 79 | } |
80 | 80 | |
81 | - return $checked[$name]; | |
81 | + return $done[$name]; | |
82 | 82 | } |
83 | 83 | |
84 | 84 | // Call API 'action' of the plugin |