Fix for bug in version 0.1
-
Hi there,
Great little plugin, but it threw a fatal error (I think with a buddy press filter)
I re-wrote the debug_bar_action_and_filters_addon_display_filters() function to fix this…
function debug_bar_action_and_filters_addon_display_filters() { global $wp_filter; $output = ""; $output .= "<div class='hooks_listing_container'>"; $output .= "<h2 style='width:100%;'>List of Filter Hooks (with functions)</h2>"; $output .= "<ul style='list-style-type: square !important; padding-left: 20px !important;'>"; foreach ($wp_filter as $filter_key => $filter_val){ $output .= " <li><strong>". $filter_key . "</strong>"; $output .= "<ul style='list-style-type: square !important; padding-left: 20px !important;'>"; ksort($filter_val); foreach ($filter_val as $priority => $functions) { $output .= "</li> <li>Priority: ". $priority . ""; $output .= "<ul style='list-style-type: square !important; padding-left: 20px !important;'>"; foreach( $functions as $i => $single_function ){ if( is_string( $single_function['function'] ) ) $output .= "</li> <li>". $single_function['function'] . "</li> "; elseif( is_array( $single_function['function'] ) && is_string( $single_function['function'][0] ) ) $output .= " <li>". $single_function['function'][0] . " -> " . $single_function['function'][1] . "</li> "; elseif( is_array( $single_function['function'] ) && is_object( $single_function['function'][0] ) ) $output .= " <li>(object) " . get_class( $single_function['function'][0] ) . " -> " . $single_function['function'][1] ."</li> "; else $output .= " <li> <pre>" . var_export($single_function, true) . "</pre> </li> "; } $output .= ""; $output .= ""; } $output .= ""; $output .= ""; } $output .= ""; $output .= "</div>"; return $output; }
https://www.ads-software.com/extend/plugins/debug-bar-actions-and-filters-addon/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Fix for bug in version 0.1’ is closed to new replies.