Clanbite JavaScript Since 1.6.3
wp.hooks.doAction( 'clanbite.playerMedia.dialog', Object context, string context.kind, HTMLElement context.dialog, HTMLElement context.extras, Function context.getPosition, Function context.setPosition )Fires when the avatar or cover popup opens, so add-ons can add their own controls to it.
Action JavaScript
Parameters
$context(Object)What is open.
$context.kind(string)avatarorcover.$context.dialog(HTMLElement)The popup element.
$context.extras(HTMLElement)An empty container for your controls.
$context.getPosition(Function)Returns the current
{ x, y, zoom }.$context.setPosition(Function)Sets the position (
{ x, y, zoom }) and redraws the preview.
Example
wp.hooks.addAction( 'clanbite.playerMedia.dialog', 'my-plugin/handler', function ( context, contextkind, contextdialog, contextextras, contextgetPosition, contextsetPosition ) {
} );Defined in assets/js/clanbite-player-media-editor.js
Changelog
| Version | Description |
|---|---|
| 1.6.3 | Introduced. |