Skip to content

Commit

Permalink
Merge pull request #60 from ConvertKit/hotfix-landing-pages
Browse files Browse the repository at this point in the history
Version 1.4.6. Fix landing pages. Fix #59.
  • Loading branch information
growdev authored Mar 29, 2017
2 parents 069099f + 5716f60 commit 8a76899
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 4 additions & 5 deletions lib/convertkit-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,11 @@ public function get_resource($url) {
}
}

// if the markup includes DOCTYPE this is probably a 404
if ( strpos( $html, 'DOCTYPE html' ) ){
$this->log('Error: URL (' . $url .') returning page content. ' . $html->save() );
$this->markup[$url] = $resource = '';
} else {
// check `status_code` for 200, otherwise log error
if ( '200' == $response['response']['code'] ) {
$this->markup[$url] = $resource = $html->save();
} else {
$this->log('Status Code (' . $response['response']['code'] . ') for URL (' . $url .'): ' . $html->save() );
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://convertkit.com
Tags: email, marketing, embed form, convertkit, capture
Requires at least: 3.6
Tested up to: 4.7.3
Stable tag: 1.4.5
Stable tag: 1.4.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -44,6 +44,10 @@ Yes, for it to work you must first have an account on ConvertKit.com

== Changelog ==

### 1.4.6 2017-03-29
* Fix for landing pages not appearing.
* Added code to API to not return status_code 404 content

### 1.4.5 2017-03-28
* Uncommented logging around api calls.
* Do not show 404 page content when shortcode is used with form ID that does not exist
Expand Down
4 changes: 2 additions & 2 deletions wp-convertkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP ConvertKit
* Plugin URI: http://convertkit.com/
* Description: Quickly and easily integrate ConvertKit forms into your site.
* Version: 1.4.5
* Version: 1.4.6
* Author: ConvertKit
* Author URI: http://convertkit.com/
* Text Domain: convertkit
Expand All @@ -20,7 +20,7 @@
*/
class WP_ConvertKit {

const VERSION = '1.4.5';
const VERSION = '1.4.6';

const POST_META_KEY = '_wp_convertkit_post_meta';

Expand Down

0 comments on commit 8a76899

Please sign in to comment.