debugpress_store_object()

Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

Description

Store the object into the DebugPress Tracker, and display it inside the Store tab of the Debugger.

Definition
function debugpress_store_object( $object, string $title = “”, bool $sql = “” );
Arguments
Name
Type
Description
object
mixed
Object value to store, it can be any type
title
string
Optional title to associate with the stored object
sql
false
If the stored object SQL string, it will be rendered as formatted SQL

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.

Rate this reference
0
0
1152

You are not allowed to rate this post.

Leave a Comment