Jetpack_JSON_API_Sync_Now_Endpoint

The WordPress Core Jetpack JSON API Sync Now Endpoint class.

Defined (1)

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

/json-endpoints/jetpack/class.jetpack-json-api-sync-endpoint.php  
  1. class Jetpack_JSON_API_Sync_Now_Endpoint extends Jetpack_JSON_API_Sync_Endpoint { 
  2. protected function result() { 
  3. $args = $this->input(); 
  4. $queue_name = $this->validate_queue( $args['queue'] ); 
  5.  
  6. if ( is_wp_error( $queue_name ) ) { 
  7. return $queue_name; 
  8.  
  9. require_once JETPACK__PLUGIN_DIR . 'sync/class.jetpack-sync-sender.php'; 
  10.  
  11. $sender = Jetpack_Sync_Sender::get_instance(); 
  12. $response = $sender->do_sync_for_queue( new Jetpack_Sync_Queue( $args['queue'] ) ); 
  13.  
  14. return array( 
  15. 'response' => $response 
  16. );