| @@ 130-140 (lines=11) @@ | ||
| 127 | /** |
|
| 128 | * Remove a Publicize connection |
|
| 129 | */ |
|
| 130 | function disconnect( $service_name, $connection_id, $_blog_id = false, $_user_id = false, $force_delete = false ) { |
|
| 131 | Jetpack::load_xml_rpc_client(); |
|
| 132 | $xml = new Jetpack_IXR_Client(); |
|
| 133 | $xml->query( 'jetpack.deletePublicizeConnection', $connection_id ); |
|
| 134 | ||
| 135 | if ( ! $xml->isError() ) { |
|
| 136 | Jetpack_Options::update_option( 'publicize_connections', $xml->getResponse() ); |
|
| 137 | } else { |
|
| 138 | return false; |
|
| 139 | } |
|
| 140 | } |
|
| 141 | ||
| 142 | // Do we really need `admin_styles`? With the new admin UI, it's breaking some bits. |
|
| 143 | // Errors encountered on WordPress.com's end are passed back as a code |
|
| @@ 102-112 (lines=11) @@ | ||
| 99 | /** |
|
| 100 | * Remove a Publicize connection |
|
| 101 | */ |
|
| 102 | function disconnect( $service_name, $connection_id, $_blog_id = false, $_user_id = false, $force_delete = false ) { |
|
| 103 | Jetpack::load_xml_rpc_client(); |
|
| 104 | $xml = new Jetpack_IXR_Client(); |
|
| 105 | $xml->query( 'jetpack.deletePublicizeConnection', $connection_id ); |
|
| 106 | ||
| 107 | if ( ! $xml->isError() ) { |
|
| 108 | Jetpack_Options::update_option( 'publicize_connections', $xml->getResponse() ); |
|
| 109 | } else { |
|
| 110 | return false; |
|
| 111 | } |
|
| 112 | } |
|
| 113 | ||
| 114 | function receive_updated_publicize_connections( $publicize_connections ) { |
|
| 115 | Jetpack_Options::update_option( 'publicize_connections', $publicize_connections ); |
|