@@ -70,7 +70,7 @@ |
||
| 70 | 70 | * @uses api_request() |
| 71 | 71 | * |
| 72 | 72 | * @param array $_transient_data Update array build by WordPress. |
| 73 | - * @return array Modified update array with custom plugin data. |
|
| 73 | + * @return stdClass Modified update array with custom plugin data. |
|
| 74 | 74 | */ |
| 75 | 75 | public function check_update( $_transient_data ) { |
| 76 | 76 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | $this->slug = basename( $_plugin_file, '.php' ); |
| 41 | 41 | $this->version = $_api_data['version']; |
| 42 | 42 | |
| 43 | - $frm_edd_plugin_data[ $this->slug ] = $this->api_data; |
|
| 43 | + $frm_edd_plugin_data[$this->slug] = $this->api_data; |
|
| 44 | 44 | |
| 45 | 45 | // Set up hooks. |
| 46 | 46 | $this->init(); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $_transient_data = new stdClass; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - if ( empty( $_transient_data->response ) || empty( $_transient_data->response[ $this->name ] ) ) { |
|
| 83 | + if ( empty( $_transient_data->response ) || empty( $_transient_data->response[$this->name] ) ) { |
|
| 84 | 84 | |
| 85 | 85 | $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) ); |
| 86 | 86 | |
@@ -92,12 +92,12 @@ discard block |
||
| 92 | 92 | $version_info->plugin = $this->name; |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | - $_transient_data->response[ $this->name ] = $version_info; |
|
| 95 | + $_transient_data->response[$this->name] = $version_info; |
|
| 96 | 96 | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $_transient_data->last_checked = time(); |
| 100 | - $_transient_data->checked[ $this->name ] = $this->version; |
|
| 100 | + $_transient_data->checked[$this->name] = $this->version; |
|
| 101 | 101 | |
| 102 | 102 | } |
| 103 | 103 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | wp_die( __( 'You do not have permission to install plugin updates', 'formidable' ), __( 'Error', 'formidable' ), array( 'response' => 403 ) ); |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | - $data = $frm_edd_plugin_data[ $_REQUEST['slug'] ]; |
|
| 245 | + $data = $frm_edd_plugin_data[$_REQUEST['slug']]; |
|
| 246 | 246 | $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' ); |
| 247 | 247 | $version_info = get_transient( $cache_key ); |
| 248 | 248 | |