Amazon_S3_And_CloudFront::set_setting PHP Method

set_setting() public method

Setter for a plugin setting with custom hooks
public set_setting ( string $key, mixed $value )
$key string
$value mixed
    function set_setting($key, $value)
    {
        // Run class specific hooks before the setting is saved
        $this->pre_set_setting($key, $value);
        $value = apply_filters('as3cf_set_setting_' . $key, $value);
        // Remove disallowed characters from custom domain
        if ('cloudfront' === $key) {
            $value = $this->sanitize_custom_domain($value);
        }
        parent::set_setting($key, $value);
    }

Usage Example

 /**
  * Complete the upgrade
  */
 function upgrade_finished()
 {
     $this->clear_session();
     $this->as3cf->set_setting($this->settings_key, $this->upgrade_id);
     $this->as3cf->save_settings();
     $this->as3cf->clear_scheduled_event($this->cron_hook);
 }
All Usage Examples Of Amazon_S3_And_CloudFront::set_setting
Amazon_S3_And_CloudFront