• Fatal error: Cannot redeclare geoip_text_plugin_action_links() (previously declared in /homepages/16/d322789483/htdocs/<site>.com/wp-content/plugins/geoip-text/geoip-text.php:24) in /homepages/16/d322789483/htdocs/<site>.com/wp-content/plugins/geoip-text/geoip-text.php on line 30

    I’m creating a plugin and on activating it I’m receiving the error above. The function is not declared twice.

    add_filter( 'plugin_action_links', 'geoip_text_plugin_action_links', 10, 2 );
    
    function geoip_text_plugin_action_links( $links, $file ) {
    	if ( $file == plugin_basename( dirname(__FILE__).'/geoip-text.php' ) ) {
    		$links[] = '<a href="options-general.php?page=geoip-text">'.__('Settings').'</a>';
    	}
    
    	return $links;
    }

    The error appears only on one of my servers. On my local development server as well as another production server it works fine.

    Could this be some other plugin interfering with it? It only happens on activation…

    Thanks,
    Casey

  • The topic ‘Fatal error: Cannot redeclare xxxx_plugin_action_links() (previously declared’ is closed to new replies.