WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
[resolved] Hard coded plugin_options_url causing issues? (not sufficient permisssions) (3 posts)

  1. kennythered
    Member
    Posted 1 year ago #

    What I am seeing:

    The links to the specific settings on the dashboard all go to admin.php, as do the tabs.
    example:
    /wp-admin/admin.php?page=better-wp-security-systemtweaks

    But after navigating away from the plugin page and back the links on the dashboard are still the same, but the tab links are all now going to options-general.php
    example:
    /wp-admin/options-general.php?page=better-wp-security-systemtweaks

    Trying to access any of the settings by clicking on the tabs and the page displays this error: "You do not have sufficient permissions to access this page.

    The 'options-general.php' part of the url seems to be hardcoded here:

    better-wp-security\lib\bit51\bit51.php:111

    function plugin_options_url() {
    return admin_url('options-general.php?page=' . $this->hook);
    }

    Is this a bug? Or should I be able to access the options at both url?

    http://wordpress.org/extend/plugins/better-wp-security/

  2. kennythered
    Member
    Posted 1 year ago #

    This seems to have solved my issue

    add_filter( 'plugin_action_links_better-wp-security/better-wp-security.php', 'better_wp_security_plugin_action_links' );
    function better_wp_security_plugin_action_links( $links ) {
    	$links[0] = str_replace('/options-general.php', '/admin.php' , $links[0]);
    	return $links;
    }
  3. kennythered
    Member
    Posted 1 year ago #

    solved

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.