@@ -93,6 +93,9 @@ |
||
| 93 | 93 | wp_die(); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | + /** |
|
| 97 | + * @param string $url |
|
| 98 | + */ |
|
| 96 | 99 | private static function send_api_request( $url, $transient = array() ) { |
| 97 | 100 | $data = get_transient( $transient['name'] ); |
| 98 | 101 | if ( $data !== false ) { |
@@ -175,15 +175,15 @@ |
||
| 175 | 175 | } |
| 176 | 176 | $addon['link'] = FrmAppHelper::make_affiliate_url( $addon['link'] ); |
| 177 | 177 | |
| 178 | - $addons[ $slug ] = $addon; |
|
| 178 | + $addons[$slug] = $addon; |
|
| 179 | 179 | } |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | public static function get_licenses() { |
| 183 | - FrmAppHelper::permission_check('frm_change_settings'); |
|
| 183 | + FrmAppHelper::permission_check( 'frm_change_settings' ); |
|
| 184 | 184 | check_ajax_referer( 'frm_ajax', 'nonce' ); |
| 185 | 185 | |
| 186 | - $license = get_option('frmpro-credentials'); |
|
| 186 | + $license = get_option( 'frmpro-credentials' ); |
|
| 187 | 187 | if ( $license && is_array( $license ) && isset( $license['license'] ) ) { |
| 188 | 188 | $url = 'http://formidablepro.com/frm-edd-api/licenses?l=' . urlencode( base64_encode( $license['license'] ) ); |
| 189 | 189 | $licenses = self::send_api_request( $url, array( 'name' => 'frm_api_licence', 'expires' => 60 * 60 * 5 ) ); |