Completed
Push — master ( 95de47...49ca71 )
by Stephanie
06:51
created
classes/controllers/FrmAddonsController.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -93,6 +93,9 @@
 block discarded – undo
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 ) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@  discard block
 block discarded – undo
3 3
 class FrmAddonsController {
4 4
 
5 5
 	public static function menu() {
6
-		add_submenu_page( 'formidable', 'Formidable | '. __( 'AddOns', 'formidable' ), __( 'AddOns', 'formidable' ), 'frm_view_forms', 'formidable-addons', 'FrmAddonsController::list_addons' );
6
+		add_submenu_page( 'formidable', 'Formidable | ' . __( 'AddOns', 'formidable' ), __( 'AddOns', 'formidable' ), 'frm_view_forms', 'formidable-addons', 'FrmAddonsController::list_addons' );
7 7
 
8 8
 		if ( FrmAppHelper::get_affiliate() ) {
9
-			add_submenu_page( 'formidable', 'Formidable | '. __( 'Upgrade to Pro', 'formidable' ), __( 'Upgrade to Pro', 'formidable' ), 'frm_view_forms', 'formidable-pro-upgrade', 'FrmAddonsController::upgrade_to_pro' );
9
+			add_submenu_page( 'formidable', 'Formidable | ' . __( 'Upgrade to Pro', 'formidable' ), __( 'Upgrade to Pro', 'formidable' ), 'frm_view_forms', 'formidable-pro-upgrade', 'FrmAddonsController::upgrade_to_pro' );
10 10
 		}
11 11
 	}
12 12
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 		$keyed_addons = array();
40 40
 		foreach ( $addons as $addon ) {
41
-			$keyed_addons[ $addon['info']['slug'] ] = $addon;
41
+			$keyed_addons[$addon['info']['slug']] = $addon;
42 42
 		}
43 43
 
44 44
 		$plugin_order = array(
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 		);
48 48
 		$ordered_addons = array();
49 49
 		foreach ( $plugin_order as $plugin ) {
50
-			if ( isset( $keyed_addons[ $plugin ] ) ) {
51
-				$ordered_addons[] = $keyed_addons[ $plugin ];
52
-				unset( $keyed_addons[ $plugin ] );
50
+			if ( isset( $keyed_addons[$plugin] ) ) {
51
+				$ordered_addons[] = $keyed_addons[$plugin];
52
+				unset( $keyed_addons[$plugin] );
53 53
 			}
54 54
 		}
55 55
 		$addons = $ordered_addons + $keyed_addons;
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 	}
85 85
 
86 86
 	public static function get_licenses() {
87
-		$license = get_option('frmpro-credentials');
87
+		$license = get_option( 'frmpro-credentials' );
88 88
 		if ( $license && is_array( $license ) && isset( $license['license'] ) ) {
89
-			$url = 'http://formidablepro.com/frm-edd-api/licenses?l='. urlencode( base64_encode( $license['license'] ) );
89
+			$url = 'http://formidablepro.com/frm-edd-api/licenses?l=' . urlencode( base64_encode( $license['license'] ) );
90 90
 			$licenses = self::send_api_request( $url, array( 'name' => 'frm_api_licence', 'expires' => 60 * 60 * 5 ) );
91 91
 			echo json_encode( $licenses );
92 92
 		}
Please login to merge, or discard this patch.
classes/views/addons/upgrade_to_pro.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 			<tr>
7 7
 				<th></th>
8 8
 			<?php foreach ( $pro['pricing'] as $name => $price ) {
9
-				$price_id++;
9
+				$price_id ++;
10 10
 				if ( $name == 'smallbusiness' ) {
11 11
 					$name = 'Small Business';
12 12
 				} ?>
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 			<tr>
51 51
 				<th>Included AddOns</th>
52 52
 				<td>None</td>
53
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidablepro.com/pricing/#addon-lists') ) ?>" target="_blank">Basic Addons</a></td>
54
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidablepro.com/pricing/#addon-lists') ) ?>" target="_blank">Advanced Addons</a></td>
55
-				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url('https://formidablepro.com/pricing/#addon-lists') ) ?>" target="_blank">Enterprise Addons</a></td>
53
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/pricing/#addon-lists' ) ) ?>" target="_blank">Basic Addons</a></td>
54
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/pricing/#addon-lists' ) ) ?>" target="_blank">Advanced Addons</a></td>
55
+				<td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidablepro.com/pricing/#addon-lists' ) ) ?>" target="_blank">Enterprise Addons</a></td>
56 56
 			</tr>
57 57
 		</tbody>
58 58
 	</table>
Please login to merge, or discard this patch.