WordPress.org

Ready to get started?Download WordPress

Forums

Redirection
Relocate admin menu item to custom menu (1 post)

  1. croakingtoad
    Member
    Posted 3 years ago #

    Howdy,

    This is an unusual request, but I'm having a bit of trouble. For various client reasons, I don't want the link to "Redirection" to be under the "Tools" menu but under a separate menu I have created. I have been able to get this to work for several other plugins, but when I try it on yours I keep getting an error:

    Fatal error: Cannot redeclare class Redirection in /home/foo/public_html/wp-content/plugins/redirection/redirection.php on line 405

    The code I am using is:

    if(in_array('redirection/redirection.php', apply_filters('active_plugins', get_option('active_plugins')))) {
    	add_action('admin_menu','redirection_hcc');
    }
    function redirection_hcc() {
    	add_submenu_page('hcc_misc', 'Redirection', 'Redirection', 'publish_pages', 'redirection/redirection.php');
    }

    Why would this be happening and how can I get it working? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic