Skip to Content

full_address()

Get the full address from Nebula Options.

PHP November 2, 2018

Usage

PHP
nebula()->full_address($envoded)

Parameters

$encoded
(Optional) (Boolean) Whether to return encoded
Default: false

Request or provide clarification »

Additional Notes

This is useful so you don’t need to make multiple calls to nebula()->option() for each address component.

Source File

Located in /libs/Options/Options.php on line 99.

No Hooks

This function does not have any filters or actions available. Request one?
PHP
        public function full_address($encoded=false){
            $nebula_options = get_option('nebula_options');

            if ( !$nebula_options['street_address'] ){
                return false;
            }

            $full_address = $nebula_options['street_address'] . ', ' . $nebula_options['locality'] . ', ' . $nebula_options['region'] . ' ' . $nebula_options['postal_code'];
            if ( $encoded ){
                $full_address = str_replace(array(', ', ' '), '+', $full_address);
            }
            return $full_address;
        }

Override

This function can not be short-circuited with an override filter. Request one?