| @@ -31,9 +31,8 @@ | ||
| 31 | 31 | Jetpack::enable_module_configurable( $this->module ); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | public function is_active() { |
| 35 | - Jetpack::load_xml_rpc_client(); | |
| 36 | 35 | $xml = new Jetpack_IXR_Client( array( |
| 37 | 36 | 'user_id' => get_current_user_id() |
| 38 | 37 | ) ); |
| 39 | 38 | $xml->query( 'jetpack.monitor.isActive' ); |
| @@ -43,9 +42,8 @@ | ||
| 43 | 42 | return $xml->getResponse(); |
| 44 | 43 | } |
| 45 | 44 | |
| 46 | 45 | public function update_option_receive_jetpack_monitor_notification( $value ) { |
| 47 | - Jetpack::load_xml_rpc_client(); | |
| 48 | 46 | $xml = new Jetpack_IXR_Client( array( |
| 49 | 47 | 'user_id' => get_current_user_id() |
| 50 | 48 | ) ); |
| 51 | 49 | $xml->query( 'jetpack.monitor.setNotifications', (bool) $value ); |
| @@ -70,9 +68,8 @@ | ||
| 70 | 68 | * |
| 71 | 69 | * @return boolean|WP_Error |
| 72 | 70 | */ |
| 73 | 71 | static function user_receives_notifications( $die_on_error = true ) { |
| 74 | - Jetpack::load_xml_rpc_client(); | |
| 75 | 72 | $xml = new Jetpack_IXR_Client( array( |
| 76 | 73 | 'user_id' => get_current_user_id() |
| 77 | 74 | ) ); |
| 78 | 75 | $xml->query( 'jetpack.monitor.isUserInNotifications' ); |
| @@ -87,9 +84,8 @@ | ||
| 87 | 84 | return $xml->getResponse(); |
| 88 | 85 | } |
| 89 | 86 | |
| 90 | 87 | public function activate_monitor() { |
| 91 | - Jetpack::load_xml_rpc_client(); | |
| 92 | 88 | $xml = new Jetpack_IXR_Client( array( |
| 93 | 89 | 'user_id' => get_current_user_id() |
| 94 | 90 | ) ); |
| 95 | 91 | |
| @@ -101,9 +97,8 @@ | ||
| 101 | 97 | return true; |
| 102 | 98 | } |
| 103 | 99 | |
| 104 | 100 | public function deactivate_monitor() { |
| 105 | - Jetpack::load_xml_rpc_client(); | |
| 106 | 101 | $xml = new Jetpack_IXR_Client( array( |
| 107 | 102 | 'user_id' => get_current_user_id() |
| 108 | 103 | ) ); |
| 109 | 104 | |
| @@ -125,9 +120,8 @@ | ||
| 125 | 120 | // if ( $last_down = get_transient( 'monitor_last_downtime' ) ) { |
| 126 | 121 | // return $last_down; |
| 127 | 122 | // } |
| 128 | 123 | |
| 129 | - Jetpack::load_xml_rpc_client(); | |
| 130 | 124 | $xml = new Jetpack_IXR_Client( array( |
| 131 | 125 | 'user_id' => get_current_user_id() |
| 132 | 126 | ) ); |
| 133 | 127 | |