bbp_get_form_option( string $option, string $default = '', bool $is_slug = false )

Return settings API option


Description Description


Parameters Parameters

$option

(Required)

$default

(Optional)

Default value: ''

$is_slug

(Optional)

Default value: false


Top ↑

Return Return

(mixed)


Top ↑

Source Source

File: includes/admin/settings.php

	function bbp_get_form_option( $option, $default = '', $is_slug = false ) {

		// Get the option and sanitize it
		$value = get_option( $option, $default );

		// Slug?
		if ( true === $is_slug ) {
			$value = esc_attr( apply_filters( 'editable_slug', $value ) );

		// Not a slug
		} else {
			$value = esc_attr( $value );
		}

		// Fallback to default
		if ( empty( $value ) ) {
			$value = $default;
		}

		// Filter & return
		return apply_filters( 'bbp_get_form_option', $value, $option, $default, $is_slug );
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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