WP_Interactivity_API::print_client_interactivity_data()
Deprecated from version 6.7.0. It is no longer supported and can be removed in future releases. See
script_module_data_{$module_id}"} filter
.Prints the serialized client-side interactivity data.
Encodes the config and initial state into JSON and prints them inside a script tag of type "application/json". Once in the browser, the state will be parsed and used to hydrate the client-side interactivity stores and the configuration will be available using a getConfig utility.
Method of the class: WP_Interactivity_API{}
No Hooks.
Returns
null
. Nothing (null).
Usage
$WP_Interactivity_API = new WP_Interactivity_API(); $WP_Interactivity_API->print_client_interactivity_data();
Changelog
Since 6.5.0 | Introduced. |
Deprecated since 6.7.0 | Client data passing is handled by the {@see "script_module_data_{$module_id}"} filter. |
WP_Interactivity_API::print_client_interactivity_data() WP Interactivity API::print client interactivity data code WP 6.8.1
public function print_client_interactivity_data() { _deprecated_function( __METHOD__, '6.7.0' ); }