@@ 112-120 (lines=9) @@ | ||
109 | return $url; |
|
110 | } |
|
111 | ||
112 | static function connect_url( $service_name, $for ) { |
|
113 | return add_query_arg( array( |
|
114 | 'action' => 'request', |
|
115 | 'service' => $service_name, |
|
116 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
117 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
118 | 'for' => $for, |
|
119 | ), menu_page_url( 'sharing', false ) ); |
|
120 | } |
|
121 | ||
122 | static function refresh_url( $service_name, $for ) { |
|
123 | return add_query_arg( array( |
|
@@ 122-131 (lines=10) @@ | ||
119 | ), menu_page_url( 'sharing', false ) ); |
|
120 | } |
|
121 | ||
122 | static function refresh_url( $service_name, $for ) { |
|
123 | return add_query_arg( array( |
|
124 | 'action' => 'request', |
|
125 | 'service' => $service_name, |
|
126 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
127 | 'refresh' => 1, |
|
128 | 'for' => $for, |
|
129 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
130 | ), admin_url( 'options-general.php?page=sharing' ) ); |
|
131 | } |
|
132 | ||
133 | static function disconnect_url( $service_name, $id ) { |
|
134 | return add_query_arg( array( |
|
@@ 133-141 (lines=9) @@ | ||
130 | ), admin_url( 'options-general.php?page=sharing' ) ); |
|
131 | } |
|
132 | ||
133 | static function disconnect_url( $service_name, $id ) { |
|
134 | return add_query_arg( array( |
|
135 | 'action' => 'delete', |
|
136 | 'service' => $service_name, |
|
137 | 'id' => $id, |
|
138 | 'kr_nonce' => wp_create_nonce( 'keyring-request' ), |
|
139 | 'nonce' => wp_create_nonce( "keyring-request-$service_name" ), |
|
140 | ), menu_page_url( 'sharing', false ) ); |
|
141 | } |
|
142 | ||
143 | static function admin_page_load() { |
|
144 | if ( isset( $_GET['action'] ) ) { |