Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 4 years ago

#8478 closed enhancement (fixed)

Do not retrieve Akismet key if Akismet is not loaded

Reported by: shawfactor Owned by: imath
Priority: low Milestone: 11.0.0
Component: Activity Version:
Severity: normal Keywords: has-patch
Cc:

Description

on line 69 is the check $akismet_key = bp_get_option( 'wordpress_api_key' );

this should come after the defined( 'AKISMET_VERSION' ) check that follows it

As right now it triggers an unneccesary database query if the option does not exist or is not set to autload. That query is not required at all if akismet is not active.

ore broadly I think akismet support should be removed entirely (it is rubbish) but if it must stay in then the small change is a small improvement.

Change History (6)

#1 @slaFFik
5 years ago

  • Milestone Awaiting ReviewUp Next
  • Type defect (bug)enhancement

#2 @slaFFik
5 years ago

  • Summary minor fix to bp-activity-component.phpDo not retrieve Akismet key if Akismet is not loaded

This ticket was mentioned in PR #18 on buddypress/buddypress by adiloztaser.


4 years ago
#3

  • Keywords has-patch added

#4 @oztaser
4 years ago

  • Milestone Up Next11.0.0

I've seen that too. It's small but worth to fix IMO. Let's fix in 11.0?

#5 @imath
4 years ago

  • Component CoreActivity

Thanks a lot for the patch @oztaser! Let's do this, I agree.

#6 @imath
4 years ago

  • Owner set to imath
  • Resolutionfixed
  • Status newclosed

In 13291:

Check Akismet is active before trying to get the WP API key

Doing so avoids a database query if Akismet is not active.

Props shawfactor, oztaser.

Closes https://github.com/buddypress/buddypress/pull/18
Fixes #8478 (trunk)

Note: See TracTickets for help on using tickets.