Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sidebar items always point to the page tab
I'm trying to define plugin wide settings and I'd like to add the setting to the... Settings tab.

Fine: there is the settings-sidebar add-action.

But: the entry in the settings sidebar, then, points to the pages tab.

By reading the the I18N Special Pages's code I've found a workaround:

PHP Code:
// hack to get the link from the settings sidebar to go to the settings tab
$lists_admin_tab 'pages';
if (
basename($_SERVER['PHP_SELF']) == 'load.php' && @$_GET['id'] == $lists_plugin_id) {
  if (
array_key_exists('lists_settings'$_REQUEST)) {
$lists_admin_tab 'settings';

# register plugin
$lists_admin_tab//page type - on which admin tab to display

But, hey, shouldn't automatically an entry in one of the sidebars point to the tab where it shows up?
I don't see a user case where it should not be that way...

I can try to write and propose a patch, if there is an agreement about this being a useful feature.


Messages In This Thread
Sidebar items always point to the page tab - by ale - 2013-01-24, 21:08:09

Users browsing this thread: 1 Guest(s)