BP_LearnDash_Admin_Integration_Tab::output_report_access_setting()

Dropdown options for report aceess setting

Description

Source

File: bp-integrations/learndash/bp-admin-learndash-tab.php

	public function output_report_access_setting() {
		$input_field = 'access';
		$input_value = $this->get_input_value($input_field, []);
		$input_name = $this->get_input_name($input_field);
		$input_options = [
			'admin' => __('Organizers', 'buddyboss'),
			'mod' => __('Moderators', 'buddyboss'),
			'member' => __('Members', 'buddyboss'),
		];

		foreach ($input_options as $key => $value) {
			$checked = in_array($key, $input_value) ? 'checked' : '';
			printf('
        		<p>
	        		<label>
	        			<input type="checkbox" name="%s[]" value="%s" %s>%s</option>
	        		</label>
	        	</p>
        	', $input_name, $key, $checked, $value);
		}

		echo $this->render_input_description(__('Select which roles can view reports', 'buddyboss'));
	}

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.