@@ 301-308 (lines=8) @@ | ||
298 | return $url; |
|
299 | } |
|
300 | ||
301 | function connect_url( $service_name ) { |
|
302 | return add_query_arg( array( |
|
303 | 'action' => 'request', |
|
304 | 'service' => $service_name, |
|
305 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
306 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
307 | ), menu_page_url( 'sharing', false ) ); |
|
308 | } |
|
309 | ||
310 | function refresh_url( $service_name ) { |
|
311 | return add_query_arg( array( |
|
@@ 321-329 (lines=9) @@ | ||
318 | ), admin_url( 'options-general.php?page=sharing' ) ); |
|
319 | } |
|
320 | ||
321 | function disconnect_url( $service_name, $id ) { |
|
322 | return add_query_arg( array ( |
|
323 | 'action' => 'delete', |
|
324 | 'service' => $service_name, |
|
325 | 'id' => $id, |
|
326 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
327 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
328 | ), menu_page_url( 'sharing', false ) ); |
|
329 | } |
|
330 | ||
331 | function get_services( $filter ) { |
|
332 | if ( !in_array( $filter, array( 'all', 'connected' ) ) ) |