backend_settings_sidebar
Allows adding custom content to the auxiliary sidebar in the Settings section.
Teamwork
Input (passed by reference)
No specific parameters.
… your plugin code …
Output
{$backend_settings_sidebar.top_li}
HTML code of a custom
<li> element of the menu with the .menu class displayed at the top of the auxiliary sidebar.{$backend_settings_sidebar.section}
HTML code of a custom block at th bottom of the auxiliary sidebar.
Teamwork
Plugin code example
PHP
public function backendSettingsSidebar()
{
return [
'top_li' => sprintf(
'<li><a href="#/settings/myplugin/"><i class="fas fa-sun text-orange"></i><span>%s</span></a></li>',
_wp('My plugin’s settings')
),
'section' => sprintf(
'<h5 class="heading">%s</h5><div class="box custom-my-16 hint align-center"></div>',
_wp('Custom header'),
_wp('Custom hint for plugin users.')
),
];
}









