PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | jetpack_vendor/automattic/jetpack-waf/src/class-rest-controller.php +11 -3 13.7.2 → 16.3-beta View file →
@@ -78,9 +78,9 @@
78 78
79 79 return rest_ensure_response(
80 80 array(
81 81 'success' => true,
82 - 'message' => __( 'Rules updated succesfully', 'jetpack-waf' ),
82 + 'message' => __( 'Rules updated successfully', 'jetpack-waf' ),
83 83 )
84 84 );
85 85 }
86 86
@@ -89,9 +89,17 @@
89 89 *
90 90 * @return WP_REST_Response
91 91 */
92 92 public static function waf() {
93 - return rest_ensure_response( Waf_Runner::get_config() );
93 + return rest_ensure_response(
94 + array_merge(
95 + Waf_Runner::get_config(),
96 + array(
97 + 'waf_supported' => Waf_Runner::is_supported_environment(),
98 + 'automatic_rules_last_updated' => Waf_Stats::get_automatic_rules_last_updated(),
99 + )
100 + )
101 + );
94 102 }
95 103
96 104 /**
97 105 * Update WAF Endpoint
@@ -108,9 +116,9 @@
108 116
109 117 /**
110 118 * IP Lists Enabled
111 119 *
112 - * @deprecated $next-version$ This is a legacy option maintained here for backwards compatibility.
120 + * @deprecated 0.17.0 This is a legacy option maintained here for backwards compatibility.
113 121 */
114 122 if ( isset( $request['jetpack_waf_ip_list'] ) ) {
115 123 update_option( Waf_Rules_Manager::IP_BLOCK_LIST_ENABLED_OPTION_NAME, $request['jetpack_waf_ip_list'] ? '1' : '' );
116 124 update_option( Waf_Rules_Manager::IP_ALLOW_LIST_ENABLED_OPTION_NAME, $request['jetpack_waf_ip_list'] ? '1' : '' );