Skip to:
Content

BuddyPress.org

Opened 20 months ago

Closed 7 months ago

#8478 closed enhancement (fixed)

Do not retrieve Akismet key if Akismet is not loaded

Reported by: shawfactor's profile shawfactor Owned by: imath's profile imath
Milestone: 11.0.0 Priority: low
Severity: normal Version:
Component: Activity 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
20 months ago

  • Milestone changed from Awaiting Review to Up Next
  • Type changed from defect (bug) to enhancement

#2 @slaFFik
20 months ago

  • Summary changed from minor fix to bp-activity-component.php to Do not retrieve Akismet key if Akismet is not loaded

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


9 months ago
#3

  • Keywords has-patch added

#4 @oztaser
9 months ago

  • Milestone changed from Up Next to 11.0.0

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

#5 @imath
9 months ago

  • Component changed from Core to Activity

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

#6 @imath
7 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

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.