Exemple #1
0
 /**
  * Get REST response for lightning maps.
  *
  * @access public
  *
  * @param WP_REST_Request $request Current request.
  * @return WP_REST_Response $response Response for /satellite endpoint.
  */
 public function lightning(\WP_REST_Request $request)
 {
     // Prepare response with meta data and an array of lightning maps items
     $data = array('name' => 'Слике муња', 'id' => 'lightning-maps', 'type' => 'thumbnails', 'thumbnails' => Optimizer::optimize(Data::lightning()));
     $response = new \WP_REST_Response($data);
     return $response;
 }