WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Publish 2 Ping.fm] Plugin uses bad add_menu_page arguments

[Plugin: Publish 2 Ping.fm] Plugin uses bad add_menu_page arguments

  • In the php/admin.php file is the following section:

    $page = add_submenu_page('options-general.php',
        'Publish 2 Ping.fm Settings',
        'Publish 2 Ping.fm', 9, basename(__FILE__),
        array(&$this, 'printAdminPage'));

    The “basename(__FILE__)” turns into “admin.php”. So, this section of code declares that the plugin’s admin menu page is located at domain.com/wp-admin/admin.php. Since most generic admin pages are accessed as domain.com/wp-admin/admin.php?page=pagename, this section of code is causing issues with some plugin and theme admin pages. Affected pages simply produce the following error:

    You do not have sufficient permissions to access this page.

    Changing “basename(__FILE__)” to “publish-2-pingfm” fixes the issue.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Publish 2 Ping.fm] Plugin uses bad add_menu_page arguments’ is closed to new replies.