Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript.

debugpress_store_object($object, $title = '', $sql = false)

Description

This function will store any object or value into the DebugPress Tracker, and it will be displayed in the Debugger pop-up window inside the ‘Store’ tab. You can give the stored value a title, and you can mark it as an SQL query. Right now, that is not used, but the next plugin version will attempt to render stored objects marked as SQL as an SQL formatted string for easier readability.

Parameters

  • $object: object or value to store. This can be anything: single value, array, or object.
  • $title: optional title to associate with the stored value.
  • $sql: boolean value marking the stored value as SQL query string.

Important

For this to work, the function has to be called after the Tracker object is first initialized. The tracker is loaded during ‘plugins_loaded’ action, and it has priority 0. So, to call this function, it has to be called inside the code happening after this moment.

0
0
805
Rate this reference

You are not allowed to rate this post.

Comments

Leave a Reply