Skip to content

Commit

Permalink
Move debug tools to /debug
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Dec 18, 2024
1 parent 8fefe59 commit d9d0bbf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
1 change: 0 additions & 1 deletion debug/_somename

This file was deleted.

19 changes: 19 additions & 0 deletions debug/debug-filters.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

/*
* Insert this snippet before the end of innermost "foreach" loop in WP_Hook::apply_filters()
*
* wp-includes/class-wp-hook.php:328
*/

// Filtered value has changed.
global $wp_filter;
if (
// EDIT filter name here!
($wp_filter['template_redirect'] ?? null) === $this
&& $value !== $args[0]
) {
printf('<div>Value changed from %s to %s by<br><pre>', var_export($args[0], true), var_export($value, true));
var_dump($the_['function']);
echo '</pre><hr></div>';
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Plugin Name: Log memory usage
* Plugin Name: Log memory usage (DBG)
* Plugin URI: https://github.com/szepeviktor/wordpress-website-lifecycle
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* Plugin Name: Display page load time
* Plugin Name: Display page load time (DBG)
* Plugin URI: https://www.stevesouders.com/blog/2014/08/21/resource-timing-practical-tips/
*/

Expand Down

0 comments on commit d9d0bbf

Please sign in to comment.