| @@ 128-139 (lines=12) @@ | ||
| 125 | return $url; |
|
| 126 | } |
|
| 127 | ||
| 128 | static function connect_url( $service_name, $for ) { |
|
| 129 | return add_query_arg( |
|
| 130 | array( |
|
| 131 | 'action' => 'request', |
|
| 132 | 'service' => $service_name, |
|
| 133 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
| 134 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
| 135 | 'for' => $for, |
|
| 136 | ), |
|
| 137 | admin_url( 'options-general.php?page=sharing' ) |
|
| 138 | ); |
|
| 139 | } |
|
| 140 | ||
| 141 | static function refresh_url( $service_name, $for ) { |
|
| 142 | return add_query_arg( |
|
| @@ 141-150 (lines=10) @@ | ||
| 138 | ); |
|
| 139 | } |
|
| 140 | ||
| 141 | static function refresh_url( $service_name, $for ) { |
|
| 142 | return add_query_arg( |
|
| 143 | array( |
|
| 144 | 'action' => 'request', |
|
| 145 | 'service' => $service_name, |
|
| 146 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
| 147 | 'refresh' => 1, |
|
| 148 | 'for' => $for, |
|
| 149 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
| 150 | ), |
|
| 151 | admin_url( 'options-general.php?page=sharing' ) |
|
| 152 | ); |
|
| 153 | } |
|
| @@ 155-166 (lines=12) @@ | ||
| 152 | ); |
|
| 153 | } |
|
| 154 | ||
| 155 | static function disconnect_url( $service_name, $id ) { |
|
| 156 | return add_query_arg( |
|
| 157 | array( |
|
| 158 | 'action' => 'delete', |
|
| 159 | 'service' => $service_name, |
|
| 160 | 'id' => $id, |
|
| 161 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
| 162 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
| 163 | ), |
|
| 164 | admin_url( 'options-general.php?page=sharing' ) |
|
| 165 | ); |
|
| 166 | } |
|
| 167 | ||
| 168 | static function admin_page_load() { |
|
| 169 | if ( isset( $_GET['action'] ) ) { |
|