bbp_engagements_strategy( bool $default = 'meta' )

How to interact with engagements


Description Description

There are 3 possible strategies:

  • ‘meta’ 2.6 and higher. Uses multiple postmeta keys.
  • ‘user’ Pre-2.6. Uses comma-separated string of IDs in usermeta.
  • ‘term’ Alternate. Uses taxonomy term relationships.

Parameters Parameters

$default

(Optional) Default value false

Default value: 'meta'


Top ↑

Return Return

(string) How to interact with engagements


Top ↑

Source Source

File: includes/core/options.php

function bbp_engagements_strategy( $default = 'meta' ) {

	// Get the option value
	$integration = get_option( '_bbp_engagements_strategy', $default );

	// Check that class exists, or fallback
	$class_name  = 'BBP_User_Engagements_' . ucwords( $integration );

	// Fallback to 'meta' if invalid
	if ( ! class_exists( $class_name ) ) {
		$integration = 'meta';
	}

	// Filter & return
	return apply_filters( 'bbp_engagements_strategy', $integration, $default );
}

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.