-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Daren Welsh edited this page Sep 14, 2015
·
2 revisions
To generate a list of hooks, insert the following code into the "run" function in Hooks.php. Optionally, add "View" or "Edit" after "hooklog/" to make it easier to review.
//generate list of hooks
if ( true ) {
global $hookLogFile;
if ( ! isset( $hookLogFile ) ) {
//only do it if URI contains "wiki/index.php"
if ( strpos($_SERVER["REQUEST_URI"],'wiki/index.php') !== false ) {
$hookLogFile = __DIR__ . "/../hooklog/" . date( "Ymd_His", time() ) . "_" . rand() . ".txt";
file_put_contents( $hookLogFile, $_SERVER["REQUEST_URI"] . "\n", FILE_APPEND );
}
}
file_put_contents( $hookLogFile, "$event\n", FILE_APPEND );
// print to browser console
// echo "<script>console.log( 'Debug Objects: " . $event . "' );</script>";
}