W3TCCdn_RackSpaceCdn_AdminActions

The W3 Total Cache W3TC Cdn RackSpaceCdn AdminActions class.

Defined (1)

The class is defined in the following location(s).

/Cdn_RackSpaceCdn_AdminActions.php  
  1. class Cdn_RackSpaceCdn_AdminActions { 
  2. function w3tc_cdn_rackspace_cdn_domains_reload() { 
  3. $c = Dispatcher::config(); 
  4. $core = Dispatcher::component( 'Cdn_Core' ); 
  5. $cdn = $core->get_cdn(); 
  6.  
  7. try { 
  8. // try to obtain CNAMEs 
  9. $domains = $cdn->service_domains_get(); 
  10. } catch ( \Exception $ex ) { 
  11. Util_Admin::redirect_with_custom_messages2( array( 
  12. 'errors' => array( 'Failed to obtain CNAMEs: ' . $ex->getMessage() ) 
  13. ), true ); 
  14. return; 
  15.  
  16. $c->set( 'cdn.rackspace_cdn.domains', $domains ); 
  17. $c->save(); 
  18.  
  19. Util_Admin::redirect_with_custom_messages2( array( 
  20. 'notes' => array( 'CNAMEs are reloaded successfully' ) 
  21. ), true );