[resolved] Akismet Key Config No Longer Hidden When Using WPCOM_API_KEY (7 posts)

  1. Mike Burns
    Posted 2 years ago #

    We are in the process of upgrading our WordPress install from 3.1.4 -> 3.6.1, and updated Akismet from 2.5.6 to 2.5.9 in the process.

    We run a large multisite install, and as a result are relying on the WPCOM_API_KEY constant:

    /** If you hardcode a WP.com API key here, all key config screens will be hidden */
    if ( defined('WPCOM_API_KEY') )
    	$wpcom_api_key = constant('WPCOM_API_KEY');
    	$wpcom_api_key = '';

    It appears the comment above is no longer valid. We're noticing after this upgrade that the Key Configuration page is still displaying the "Akismet API Key" text field with an empty value.

    This is caused by new conditional logic within akismet_conf(), and a mixture of methods to retrieve the API key -- get_option( 'wordpress_api_key' ) vs. akismet_get_key().

    Any chance this function can be revisited? We don't want site admin seeing that field.


  2. Sadly, this has been a known and reported issue for a long time (several months). I've pointed it out to listed developers, and there are multiple forum posts about it.


  3. Alex Phelps
    Posted 2 years ago #

    Having the same problem here.

    Is there any update to this or a known work around?

  4. agreda
    Posted 2 years ago #

    Has anyone figured out where to hardcode in the Akismet key on a multisite install? Is it even possible anymore?

    I wonder if it goes here, in akismet/wrapper.php ...

    $wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : 'DOES-KEY-GO-HERE?';

    Any thoughts are greatly appreciated. Thank you!

  5. agreda
    Posted 2 years ago #

    PS: I ask because I read in another topic that this wp-config edit no longer works...

    /** Define WordPress.com API Key */


  6. This seems resolved / working in 3.0.2 - can anyone else confirm or say otherwise?

  7. Greg Stewart
    Plugin Author

    Posted 1 year ago #

    Marking as resolved, unless someone is still having issues.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Akismet
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic