Filter - Admin Panes

This is a filter for adding extra panes to the admin panel for adding extra functionality. For example, say we're creating a backup plugin, we might add a pane to hold a button for initiating backups.

The filter name is "adminPane".

The callback takes one parameter: "panelID". This is the ID of the container the content should go in.

The options object should contain one property: "panelTitle". This is the title displayed to the users in the admin panel.

Here's an example:

registerCallback(
'adminPane',
(panelID) => {
const panel = document.querySelector(`#${panelID}`)
panel.innerHTML = `<button class="button" id="js-backup">Backup DB</button>`
loadAnalytics()
}, {
'panelTitle': 'Analytics'
}
)
view raw example.js hosted with ❤ by GitHub