bp_search_settings_callback_post_type_taxonomy( $args )

Allow Post Type Taxonomy search setting field

Description

Parameters

$args

(Required) array

Source

File: bp-search/bp-search-settings.php

function bp_search_settings_callback_post_type_taxonomy( $args ) {

	$post_type   = $args['post_type'];
	$taxonomy    = $args['taxonomy'];
	$option_name = "bp_search_{$post_type}_tax_{$taxonomy}";

	$taxonomy_obj  = get_taxonomy( $taxonomy );
	$post_type_obj = get_post_type_object( $post_type );
	?>
	<input
		name="<?php echo $option_name ?>"
		id="<?php echo $option_name ?>"
		type="checkbox"
		value="1"
		<?php checked( bp_is_search_post_type_taxonomy_enable( $taxonomy, $post_type ) ) ?>
	/>
	<label for="<?php echo $option_name ?>">
		<?php printf( esc_html__( '%s', 'buddyboss' ), $taxonomy_obj->labels->singular_name ) ?>
	</label>
	<?php
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 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.