bb_ld_group_archive_backend_slug_print( array $setting_option_fields, string $settings_section_key )

Filter to fix conflict between Learndash Plugin groups archive page and Platform Groups page.

Description

Show the proper archive page link on LD domain.com/wp-admin/admin.php?page=groups-options page.

Parameters

$setting_option_fields

(Required) Associative array of Setting field details like name,type,label,value.

$settings_section_key

(Required) Used within the Settings API to uniquely identify this section.

Return

(array) $setting_option_fields

Source

File: bp-integrations/learndash/bp-learndash-filters.php

function bb_ld_group_archive_backend_slug_print( $setting_option_fields, $settings_section_key) {

	if ( is_admin() && isset( $_REQUEST ) && isset( $_REQUEST['page'] ) && 'groups-options' === $_REQUEST['page'] && 'cpt_options' === $settings_section_key && is_array( $setting_option_fields ) && isset( $setting_option_fields['has_archive']['options']['yes'] ) ) {
		$setting_option_fields['has_archive']['options']['yes'] = sprintf(
		// translators: placeholder: URL for CPT Archive.
			esc_html_x( 'Archive URL: %s', 'placeholder: URL for CPT Archive', 'buddyboss' ),
			'<code><a target="blank" href="' . home_url( 'ld-groups' ) . '">' . home_url( 'ld-groups' ) . '</a></code>'
		);
	}

	return $setting_option_fields;

}

Changelog

Changelog
Version Description
BuddyBoss 1.4.7 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.