Amazon_S3_And_CloudFront::pre_set_setting PHP Method

pre_set_setting() public method

Perform custom actions before the setting is saved
public pre_set_setting ( string $key, string $value )
$key string
$value string
    function pre_set_setting($key, $value)
    {
        if ('bucket' === $key && !$this->get_setting('bucket')) {
            // first time bucket select - enable main options by default
            $this->set_setting('copy-to-s3', '1');
            $this->set_setting('serve-from-s3', '1');
        }
    }
Amazon_S3_And_CloudFront