Jetpack_JSON_API_Jetpack_Log_Endpoint

The WordPress Core Jetpack JSON API Log Endpoint class.

Defined (1)

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

/json-endpoints/jetpack/class.jetpack-json-api-log-endpoint.php  
  1. class Jetpack_JSON_API_Jetpack_Log_Endpoint extends Jetpack_JSON_API_Endpoint { 
  2. // GET /sites/%s/jetpack-log 
  3. protected $needed_capabilities = 'manage_options'; 
  4.  
  5. protected function result() { 
  6. $args = $this->input(); 
  7. $event = ( isset( $args['event'] ) && is_string( $args['event'] ) ) ? $code : false; 
  8. $num = ( isset( $args['num'] ) ) ? intval( $num ) : false; 
  9.  
  10. return array( 
  11. 'log' => Jetpack::get_log( $event, $num ) 
  12. );