WordPress.org

Ready to get started?Download WordPress

Forums

Erident Custom Login and Dashboard
[resolved] Won't install with WP Firewall 2 (4 posts)

  1. tripro
    Member
    Posted 1 year ago #

    Looks like a great plugin, thanks! However, when installing it on a blog that is running WordPress Firewall 2, it generates a 'fatal error' and doesn't activate:

    Fatal error: Cannot redeclare add_settings_link() (previously declared in /home/x/public_html/wp-content/plugins/wordpress-firewall-2/wordpress-firewall-2.php:450) in /home/x/public_html/wp-content/plugins/erident-custom-login-and-dashboard/er-custom-login.php on line 48

    Can you help? Thanks!

    http://wordpress.org/extend/plugins/erident-custom-login-and-dashboard/

  2. Libin
    Member
    Plugin Author

    Posted 1 year ago #

    That plugin's Compatible was up to: 3.0.5. It was Last Updated on 2010-10-29. May be that will conflicting.

    Try deactivating the WordPress Firewall 2 plugin and then activate Erident Custom Login and Dashboard.

    After that, try activating WordPress Firewall 2

  3. tripro
    Member
    Posted 1 year ago #

    Thanks Libin, yes, tried both ways and get error on both, regardless of the order in which I activate them. You're right, it's most likely a version incompatibility since that's been a while. May need to find another solution for the custom login. Thanks again!

  4. Libin
    Member
    Plugin Author

    Posted 1 year ago #

    Hi tripro,

    I found a solution for this. Login to the WordPress dashboard -> Plugins.

    Now De-activate both WordPress Firewall 2 and Erident Custom Login and Dashboard.

    Now click Edit button of "Erident Custom Login and Dashboard" on plugin page.

    Now search for the below code.

    /**
     * Add Settings link to plugins
     */
     function add_settings_link($links, $file) {
    static $this_plugin;
    if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
    
    if ($file == $this_plugin){
    $settings_link = '<a href="options-general.php?page=erident-custom-login-and-dashboard">'.__("Settings", "erident-custom-login-and-dashboard").'</a>';
     array_unshift($links, $settings_link);
    }
    return $links;
     }
    add_filter('plugin_action_links', 'add_settings_link', 10, 2 );

    and replace it with:

    /**
     * Add Settings link to plugins
     */
     function er_add_settings_link($links, $file) {
    static $this_plugin;
    if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);
    
    if ($file == $this_plugin){
    $settings_link = '<a href="options-general.php?page=erident-custom-login-and-dashboard">'.__("Settings", "erident-custom-login-and-dashboard").'</a>';
     array_unshift($links, $settings_link);
    }
    return $links;
     }
    add_filter('plugin_action_links', 'er_add_settings_link', 10, 2 );

    Now activate both plugins. Thats all

    I will make this change in next version. So go and edit it.

    Cheers!!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic