Advertisement
simonwheatley

Add module paths filter for Broken Link Checker plugin

Apr 11th, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.81 KB | None | 0 0
  1. Index: wp-content/plugins/broken-link-checker/includes/module-manager.php
  2. ===================================================================
  3. --- wp-content/plugins/broken-link-checker/includes/module-manager.php  (revision 529773)
  4. +++ wp-content/plugins/broken-link-checker/includes/module-manager.php  (working copy)
  5. @@ -65,7 +65,13 @@
  6.                 //BUG: Potentional security flaw/bug. plugin.php is not meant to be loaded outside admin panel.
  7.                 require_once(ABSPATH . 'wp-admin/includes/plugin.php');
  8.             }
  9. -           $modules = get_plugins( $relative_path );
  10. +           $modules = array();
  11. +           $paths = apply_filters(
  12. +               'blc-module-paths',
  13. +               array( $relative_path )
  14. +           );
  15. +           foreach ( $paths as $path )
  16. +               $modules = array_merge( (array) get_plugins( $path ), $modules );
  17.            
  18.             $this->_module_cache = array();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement