Skip to Content
Menu

update_data()

Update non-option data outside of the Nebula Options page

PHP June 20, 2017

Usage

PHP
nebula()->update_data($option, $value)

Parameters

$option
(Required) (String) The data to update
Default: None

$value
(Required) (String) The updated data
Default: None

Request or provide clarification »

Was this page helpful? Yes No


    A feedback message is required to submit this form.


    Please check that you have entered a valid email address.

    Enter your email address if you would like a response.

    Thank you for your feedback!

    Source File

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

    No Hooks

    This function does not have any filters or actions available. Request one?
    PHP
            public function update_data($option, $value){
                $nebula_data = get_option('nebula_data');
                if ( empty($nebula_data[$option]) || $nebula_data[$option] !== $value ){
                    $nebula_data[$option] = $value;
                    update_option('nebula_data', $nebula_data);
                }
            }
    

    Override

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