customActionsTop #
The customActionsTop hook allows developers to add custom actions to the table actions shown at the top left corner.
Parameters #
- log: reference to WP Data Access logger
- table: reference to the table instance and state
Return value #
Template literal, DOM element or jQuery object
Examples #
Example of a customActionTop hook #
((log, table) => {
return `<div>
<button onclick="alert('My custom action')">My Custom Action</button>
</div>`
})
Example calling a function defined in the app global hook #
((log, table) => {
return myCustomAction()
})