PluginProbe
WPBot – ChatBot Conversational Forms / 1.4.7
WPBot – ChatBot Conversational Forms v1.4.7
1.5.0 1.4.8 1.4.7 trunk 0.9.2 0.9.3 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.6 1.1.7 1.1.8 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 All 36 releases
conversational-forms / classes / api / response.php

response.php in WPBot – ChatBot Conversational Forms 1.4.7, at classes/api/response.php

36 lines 820 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Response object all non-error REST API requests should return
5 *
6 * @package Caldera_Forms Modified by QuantumCloud
7 * @author Josh Pollock <Josh@CalderaWP.com>
8 * @license GPL-2.0+
9 * @link
10 * @copyright 2016 CalderaWP LLC
11 */
12 class Qcformbuilder_Forms_API_Response extends \WP_REST_Response {
13
14 /**
15 * @inheritdoc
16 *
17 * @since 1.4.4
18 */
19 public function __construct( $data = null, $status = 200, $headers = array() ) {
20 parent::__construct( $data, $status, $headers );
21 if ( empty( $data ) ) {
22 $this->set_status( 404 );
23 }
24
25 }
26
27 public function set_total_header( $total ){
28 $this->header( 'X-CF-API-TOTAL', (int) $total );
29 }
30
31 public function set_total_pages_header( $total_pages ){
32 $this->header( 'X-CF-API-TOTAL-PAGES', (int) $total_pages );
33 }
34
35
36 }