bp_media_get_form_option( string $option, string $default = '', bool $slug = false )

Return settings API option

Description

Parameters

$option

(Required)

$default

(Optional)

Default value: ''

$slug

(Optional)

Default value: false

Return

(mixed)

Source

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

328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
function bp_media_get_form_option( $option, $default = '', $slug = false ) {
 
    // Get the option and sanitize it
    $value = get_option( $option, $default );
 
    // Slug?
    if ( true === $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;
    }
 
    // Allow plugins to further filter the output
    return apply_filters( 'bp_media_get_form_option', $value, $option );
}

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.