window.EasySvgPanel.subscribe
Calls a function whenever a tab or a collection provider is registered.
JavaScript hook · Easy SVG · Status: Internal · Defined in src/panel/registry.js
Internal: not part of the promised public surface. It may change without notice.
Usage
window.EasySvgPanel.subscribe( fn ): () => boolean
Example
wp_add_inline_script( 'easy-svg-panel', 'window.EasySvgPanel.subscribe( function () { console.log( window.EasySvgPanel.list().length ); } );' );
Description
Returns an unsubscribe function. A listener that throws is caught so registration continues.
Return value
returnfunction
Unsubscribe.
Related
Was this page helpful?