[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog
  • #
  • &
  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • J
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • [

WordPress action and filter tracing with oik-bwtrace v1.18.1219

Debugging your WordPress site with action and filter tracing is now a lot easier, thanks to improvements in the oik-bwtrace plugin.
  • Are you a WordPress plugin or theme developer?
  • Would you like to know what’s going on behind the scenes?
  • Do you want to find the best place to add your filter or action processing?
If your answer to any of these questions is Yes, then I suggest you read the rest of this article.

What problem determination methods are there?

Until I developed the action and filter trace functionality in oik-bwtrace (in April 2012), other than asking, I had four ways of finding out how WordPress worked.
  1. Read the code
  2. Read the codex or other documentation about WordPress
  3. Debug using a PHP debugger
  4. Trial and error with trace macros – using bw_trace2() and bw_backtrace()
and, of course, combinations of the above.

Action and filter tracing

In oik version 1.12, I added my first version of action and filter tracing.  By adding some action and filter hooks I was able to trace the invocation of filters and actions that had already been registered. This was an improvement, BUT it was still hit and miss. My routines would only get called if there was already a hook registered. So I developed Immediate action tracing.

Immediate action tracing

In order to implement Immediate action tracing I needed to make modifications to a WordPress core file ( wp-includes/plugin.php ). Although the Immediate action tracing code was present in oik version 1.17, the modified version of plugin.php was not available to the general public. In oik-bwtrace version 1.18.1219 I have now implemented a file switching routine that will replace wp-includes/plugin.php with the code that supports Immediate action tracing whenever it is enabled through the Dashboard. The file is switched back again when Immediate action tracing is disabled. This automatic solution is available for WordPress 3.4.2, WordPress 3.5 and the latest development version 3.5.1-alpha. Download oik-bwtrace from wordpress.org
Download oik-bwtrace-debug-trace-for-wordpress version 3.4.0

Further reading

Modifications to wp-includes/plugin.php Debug trace dependency on the oik base plugin Other debugging plugins

Published: December 19, 2012 | Last updated: December 4, 2020

Filed Under: 1.18, News, oik-bwtrace, plugins Tagged With: plugin.php

Information

Component:

Recent plugin updates

oik-weight-zone-shipping v0.2.6 oik-weight-zone-shipping v0.2.6 has been tested with WooCommerce 7.4.0. ...
sb-chart-block v1.2.3 SB Chart Block v1.2.3 contains a fix for an Uncaught Error: Call to undefined function bw_trace2()  ...
SB Chart Block v1.2.1 Update to SB Chart Block v1.2.0 for custom colors, font size options and multiple y-axis charts.  ...
oik-css v2.1.0 Update to oik-css v2.1.0 for the ability to style CSS and GeSHi output in documentation. ...
oik-types v2.3.0 Update to oik-types v2.3.0 for improved control over sort order on archives ...

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: oikplug@oik-plugins.com

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2023. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins
WordPress 6.2. PHP: 7.4.33. Memory limit: 768M