TitanFramework::rememberAllOptions PHP Method

rememberAllOptions() public method

Action hook on tf_create_option to remember all the options, used to ensure that our serialized option does not get cluttered with unused options
Since: 1.2.1
public rememberAllOptions ( TitanFrameworkOption $option ) : void
$option TitanFrameworkOption The option that was just created.
return void
    public function rememberAllOptions($option)
    {
        if (!empty($option->settings['id'])) {
            if (is_admin() && isset($this->optionsUsed[$option->settings['id']])) {
                self::displayFrameworkError(sprintf(__('All option IDs per namespace must be unique. The id %s has been used multiple times.', TF_I18NDOMAIN), '<code>' . $option->settings['id'] . '</code>'));
            }
            $this->optionsUsed[$option->settings['id']] = $option;
        }
    }