Ejemplo n.º 1
0
 /**
  * Ajax Callback Function for the Settings Page
  */
 public function hub_action_callback()
 {
     $tls_hub_action = wp_strip_all_tags($_POST['tls_hub_action']);
     $message = '';
     if (strtolower($tls_hub_action) == 'subscribe') {
         $this->current_options['subscription_status'] = 'Subscribing';
         update_option(self::$option_name, $this->current_options);
         $HubSubscriber = new HubSubscriber(self::$option_name, $this->current_options);
         echo $HubSubscriber->subscribe();
     }
     wp_die();
     // this is required to terminate immediately and return a proper response
 }