equal
deleted
inserted
replaced
286 if ( !in_array($dh, $restrict) ) |
286 if ( !in_array($dh, $restrict) ) |
287 continue; |
287 continue; |
288 |
288 |
289 // it's a PHP file, attempt to read metadata |
289 // it's a PHP file, attempt to read metadata |
290 $fullpath = ENANO_ROOT . "/plugins/$dh"; |
290 $fullpath = ENANO_ROOT . "/plugins/$dh"; |
291 $plugin_meta = $this->get_plugin_info($fullpath); |
291 $plugin_meta = $this->get_plugin_info($fullpath, $use_cache); |
292 |
292 |
293 if ( is_array($plugin_meta) ) |
293 if ( is_array($plugin_meta) ) |
294 { |
294 { |
295 // all checks passed |
295 // all checks passed |
296 $plugin_list[$dh] = $plugin_meta; |
296 $plugin_list[$dh] = $plugin_meta; |
335 * Retrieves the metadata block from a plugin file |
335 * Retrieves the metadata block from a plugin file |
336 * @param string Path to plugin file (full path) |
336 * @param string Path to plugin file (full path) |
337 * @return array |
337 * @return array |
338 */ |
338 */ |
339 |
339 |
340 function get_plugin_info($fullpath) |
340 function get_plugin_info($fullpath, $use_cache = true) |
341 { |
341 { |
342 global $plugins_cache; |
342 global $plugins_cache; |
343 $dh = basename($fullpath); |
343 $dh = basename($fullpath); |
344 |
344 |
345 // first can we use cached info? |
345 // first can we use cached info? |