@@ -272,7 +272,7 @@ |
||
| 272 | 272 | return $message; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - function manually_queue_update(){ |
|
| 276 | - set_site_transient( 'update_plugins', null ); |
|
| 277 | - } |
|
| 275 | + function manually_queue_update(){ |
|
| 276 | + set_site_transient( 'update_plugins', null ); |
|
| 277 | + } |
|
| 278 | 278 | } |
@@ -38,15 +38,15 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | public function insert_installed_addon( $plugins ) { |
| 41 | - $plugins[ $this->plugin_slug ] = $this; |
|
| 41 | + $plugins[$this->plugin_slug] = $this; |
|
| 42 | 42 | return $plugins; |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public static function get_addon( $plugin_slug ) { |
| 46 | 46 | $plugins = apply_filters( 'frm_installed_addons', array() ); |
| 47 | 47 | $plugin = false; |
| 48 | - if ( isset( $plugins[ $plugin_slug ] ) ) { |
|
| 49 | - $plugin = $plugins[ $plugin_slug ]; |
|
| 48 | + if ( isset( $plugins[$plugin_slug] ) ) { |
|
| 49 | + $plugin = $plugins[$plugin_slug]; |
|
| 50 | 50 | } |
| 51 | 51 | return $plugin; |
| 52 | 52 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if ( empty( $license ) ) { |
| 59 | 59 | add_action( 'after_plugin_row_' . plugin_basename( $this->plugin_file ), array( $this, 'show_license_message' ), 10, 2 ); |
| 60 | 60 | } else { |
| 61 | - if ( ! class_exists('EDD_SL_Plugin_Updater') ) { |
|
| 61 | + if ( ! class_exists( 'EDD_SL_Plugin_Updater' ) ) { |
|
| 62 | 62 | include( dirname( __FILE__ ) . '/EDD_SL_Plugin_Updater.php' ); |
| 63 | 63 | } |
| 64 | 64 | |
@@ -98,32 +98,32 @@ discard block |
||
| 98 | 98 | public function show_license_message( $file, $plugin ) { |
| 99 | 99 | $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' ); |
| 100 | 100 | echo '<tr class="plugin-update-tr active"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">'; |
| 101 | - echo sprintf( __( 'Your %1$s license key is missing. Please add it on the %2$slicenses page%3$s.', 'formidable' ), $this->plugin_name, '<a href="' . esc_url( admin_url('admin.php?page=formidable-settings&t=licenses_settings' ) ) . '">', '</a>' ); |
|
| 101 | + echo sprintf( __( 'Your %1$s license key is missing. Please add it on the %2$slicenses page%3$s.', 'formidable' ), $this->plugin_name, '<a href="' . esc_url( admin_url( 'admin.php?page=formidable-settings&t=licenses_settings' ) ) . '">', '</a>' ); |
|
| 102 | 102 | $id = sanitize_title( $plugin['Name'] ); |
| 103 | 103 | echo '<script type="text/javascript">var d = document.getElementById("' . esc_attr( $id ) . '");if ( d !== null ){ d.className = d.className + " update"; }</script>'; |
| 104 | 104 | echo '</div></td></tr>'; |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | public function clear_expired_download( $transient ) { |
| 108 | - if ( ! is_object($transient) ) { |
|
| 108 | + if ( ! is_object( $transient ) ) { |
|
| 109 | 109 | return $transient; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | if ( $this->is_current_version( $transient ) ) { |
| 113 | 113 | //make sure it doesn't show there is an update if plugin is up-to-date |
| 114 | - if ( isset( $transient->response[ $this->plugin_folder ] ) ) { |
|
| 115 | - unset( $transient->response[ $this->plugin_folder ] ); |
|
| 114 | + if ( isset( $transient->response[$this->plugin_folder] ) ) { |
|
| 115 | + unset( $transient->response[$this->plugin_folder] ); |
|
| 116 | 116 | } |
| 117 | - } else if ( isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) ) { |
|
| 117 | + } else if ( isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) ) { |
|
| 118 | 118 | $cache_key = 'edd_plugin_' . md5( sanitize_key( $this->license . $this->version ) . '_get_version' ); |
| 119 | 119 | $version_info = get_transient( $cache_key ); |
| 120 | 120 | if ( $version_info !== false ) { |
| 121 | - $transient->response[ $this->plugin_folder ] = $version_info; |
|
| 121 | + $transient->response[$this->plugin_folder] = $version_info; |
|
| 122 | 122 | } else if ( ! $this->has_been_cleared() ) { |
| 123 | 123 | // if the transient has expired, clear the update and trigger it again |
| 124 | 124 | $this->cleared_plugins(); |
| 125 | 125 | $this->manually_queue_update(); |
| 126 | - unset( $transient->response[ $this->plugin_folder ] ); |
|
| 126 | + unset( $transient->response[$this->plugin_folder] ); |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | function is_current_version( $transient ) { |
| 134 | - if ( empty( $transient->checked ) || ! isset( $transient->checked[ $this->plugin_folder ] ) ) { |
|
| 134 | + if ( empty( $transient->checked ) || ! isset( $transient->checked[$this->plugin_folder] ) ) { |
|
| 135 | 135 | return false; |
| 136 | 136 | } |
| 137 | 137 | |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | return true; |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - return isset( $transient->response ) && isset( $transient->response[ $this->plugin_folder ] ) && $transient->checked[ $this->plugin_folder ] == $transient->response[ $this->plugin_folder ]->new_version; |
|
| 143 | + return isset( $transient->response ) && isset( $transient->response[$this->plugin_folder] ) && $transient->checked[$this->plugin_folder] == $transient->response[$this->plugin_folder]->new_version; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | function has_been_cleared() { |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | |
| 251 | 251 | $message = __( 'Your License Key was invalid', 'formidable' ); |
| 252 | 252 | if ( is_wp_error( $resp ) ) { |
| 253 | - $message = sprintf( __( 'You had an error communicating with Formidable Pro\'s API. %1$sClick here%2$s for more information.', 'formidable' ), '<a href="http://formidablepro.com/knowledgebase/why-cant-i-activate-formidable-pro/" target="_blank">', '</a>'); |
|
| 253 | + $message = sprintf( __( 'You had an error communicating with Formidable Pro\'s API. %1$sClick here%2$s for more information.', 'formidable' ), '<a href="http://formidablepro.com/knowledgebase/why-cant-i-activate-formidable-pro/" target="_blank">', '</a>' ); |
|
| 254 | 254 | if ( is_wp_error( $resp ) ) { |
| 255 | - $message .= ' '. $resp->get_error_message(); |
|
| 255 | + $message .= ' ' . $resp->get_error_message(); |
|
| 256 | 256 | } |
| 257 | 257 | } else if ( $body == 'error' || is_wp_error( $body ) ) { |
| 258 | 258 | $message = __( 'You had an HTTP error connecting to Formidable Pro\'s API', 'formidable' ); |
@@ -265,14 +265,14 @@ discard block |
||
| 265 | 265 | $message = $json_res; |
| 266 | 266 | } |
| 267 | 267 | } else if ( isset( $resp['response'] ) && isset( $resp['response']['code'] ) ) { |
| 268 | - $message = sprintf( __( 'There was a %1$s error: %2$s', 'formidable' ), $resp['response']['code'], $resp['response']['message'] .' '. $resp['body'] ); |
|
| 268 | + $message = sprintf( __( 'There was a %1$s error: %2$s', 'formidable' ), $resp['response']['code'], $resp['response']['message'] . ' ' . $resp['body'] ); |
|
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | return $message; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - function manually_queue_update(){ |
|
| 275 | + function manually_queue_update() { |
|
| 276 | 276 | set_site_transient( 'update_plugins', null ); |
| 277 | 277 | } |
| 278 | 278 | } |
@@ -272,7 +272,7 @@ |
||
| 272 | 272 | return $message; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - function manually_queue_update(){ |
|
| 275 | + function manually_queue_update() { |
|
| 276 | 276 | set_site_transient( 'update_plugins', null ); |
| 277 | 277 | } |
| 278 | 278 | } |