PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / v1.3
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel vv1.3
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
← All changes | includes/FlyApi.php +3 -3 0.3v1.3 View file →
@@ -19,13 +19,14 @@
19 19 * @param string $action
20 20 *
21 21 * @return array|false
22 22 */
23 - public function cache_toggle( $action = 'enable' ) {
23 + public function cache_toggle( $action = 'enable', $type = 'fastcgi' ) {
24 24 return $this->post(
25 25 '/cache-toggle',
26 26 [
27 27 'action' => $action,
28 + 'type' => $type,
28 29 ]
29 30 );
30 31 }
31 32
@@ -34,9 +35,9 @@
34 35 *
35 36 * @return string
36 37 */
37 38 protected function get_endpoint() {
38 - return apply_filters( 'flywp_api_endpoint', 'https://app.flywp.io/api/site-api' );
39 + return apply_filters( 'flywp_api_endpoint', 'https://app.flywp.com/api/site-api' );
39 40 }
40 41
41 42 /**
42 43 * Send a GET request to the API.
@@ -89,9 +90,8 @@
89 90 ]
90 91 );
91 92
92 93 if ( is_wp_error( $response ) ) {
93 - // Handle error if needed
94 94 return false;
95 95 }
96 96
97 97 $body = wp_remote_retrieve_body( $response );