ClickFunnels - Version 2.0.4

Version Description

Download this release

Release Info

Developer clickfunnels.com
Plugin Icon 128x128 ClickFunnels
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

Files changed (4) hide show
  1. CF_API.php +32 -8
  2. clickfunnels.php +5 -3
  3. footer.php +1 -1
  4. readme.txt +5 -0
CF_API.php CHANGED
@@ -41,12 +41,36 @@ public function get_page_html( $funnel_id, $pagekey = 0, $meta = "", $title = ""
41
  }
42
 
43
  if ($favicon_choice == 'default') {
44
- $favicon_url = '';
45
- $favicon_js = '$("link[rel=\'icon\']").remove();';
46
- }
47
- else {
48
- $favicon_url = '<link href="'.$favicon.'" rel="shortcut icon" type="image/x-icon" />';
49
- $favicon_js = '$("link[rel=\'icon\']").attr(\'href\',\''.$favicon.'\');';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
52
  $newHTML = '<!DOCTYPE html>
@@ -73,8 +97,8 @@ $newHTML = '<!DOCTYPE html>
73
  <style type="text/css">#IntercomDefaultWidget{display:none;}#Intercom{display:none;}</style>
74
  <link href="https://assets3.clickfunnels.com/assets/lander.css" media="screen" rel="stylesheet"/>
75
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
76
- <script type="text/javascript" src="https://static.clickfunnels.com/clickfunnels/landers/tmp/'.$pagekey.'.js"></script>
77
- <script type="text/javascript">
78
  // Clean up duplicate meta data
79
  '.$favicon_js.'
80
  $(".metaTagTop").remove();
41
  }
42
 
43
  if ($favicon_choice == 'default') {
44
+ $changed = false;
45
+
46
+ if($site_icon = get_option('site_icon')):
47
+ $favicon = wp_get_attachment_image_src($site_icon, 'full');
48
+ $favicon = $favicon[0];
49
+ $changed = true;
50
+ else:
51
+ preg_match_all('!<link(.*?)rel="(.*?)icon(.*?)"(.*?)href="(.*?)"(.*?)>!si', file_get_contents(home_url()), $res);
52
+ foreach($res as $row):
53
+ foreach($row as $item):
54
+ $img_res = @exif_imagetype($item);
55
+ if($img_res > 0 and $img_res < 18): // This is image
56
+ $favicon = $item;
57
+ $changed = true;
58
+ break;
59
+ endif;
60
+ endforeach;
61
+ endforeach;
62
+ endif;
63
+
64
+ if($changed):
65
+ $favicon_url = '<link href="'.$favicon.'" rel="shortcut icon" type="image/x-icon" />';
66
+ $favicon_js = '$("link[rel=\'icon\']").attr(\'href\',\''.$favicon.'\');';
67
+ else:
68
+ $favicon_url = '';
69
+ $favicon_js = '$("link[rel=\'icon\']").remove();';
70
+ endif;
71
+ } else {
72
+ $favicon_url = '<link href="'.$favicon.'" rel="shortcut icon" type="image/x-icon" />';
73
+ $favicon_js = '$("link[rel=\'icon\']").attr(\'href\',\''.$favicon.'\');';
74
  }
75
 
76
  $newHTML = '<!DOCTYPE html>
97
  <style type="text/css">#IntercomDefaultWidget{display:none;}#Intercom{display:none;}</style>
98
  <link href="https://assets3.clickfunnels.com/assets/lander.css" media="screen" rel="stylesheet"/>
99
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
100
+ <script data-cfasync="false" type="text/javascript" src="https://static.clickfunnels.com/clickfunnels/landers/tmp/'.$pagekey.'.js"></script>
101
+ <script data-cfasync="false" type="text/javascript">
102
  // Clean up duplicate meta data
103
  '.$favicon_js.'
104
  $(".metaTagTop").remove();
clickfunnels.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ClickFunnels
4
  * Plugin URI: https://www.clickfunnels.com
5
  * Description: Connect to your ClickFunnels account with simple authorization key and show any ClickFunnels page as your homepage or as 404 error pages or simply choose any of your pages and make clean URLs to your ClickFunnels pages. Don't have an account? <a target="_blank" href="https://www.clickfunnels.com">Sign up for your 2 week <em>free</em> trial now.</a>
6
- * Version: 2.0.3
7
  * Author: Etison, LLC
8
  * Author URI: https://www.clickfunnels.com
9
  */
@@ -362,8 +362,10 @@ class ClickFunnels {
362
  update_post_meta( $post_id, "cf_wptracking_code", $cf_wptracking_code );
363
  update_post_meta( $post_id, "cf_favicon_choice", $cf_favicon_choice );
364
  $cf_options = get_option( "cf_options" );
365
- unset( $cf_options['pages'][$cf_slug] );
366
- update_option( "cf_options", $cf_options );
 
 
367
  if ( $this->is_404( $post_id ) )
368
  $this->set_404( "", "" );
369
  if ( $this->is_home( $post_id ) )
3
  * Plugin Name: ClickFunnels
4
  * Plugin URI: https://www.clickfunnels.com
5
  * Description: Connect to your ClickFunnels account with simple authorization key and show any ClickFunnels page as your homepage or as 404 error pages or simply choose any of your pages and make clean URLs to your ClickFunnels pages. Don't have an account? <a target="_blank" href="https://www.clickfunnels.com">Sign up for your 2 week <em>free</em> trial now.</a>
6
+ * Version: 2.0.4
7
  * Author: Etison, LLC
8
  * Author URI: https://www.clickfunnels.com
9
  */
362
  update_post_meta( $post_id, "cf_wptracking_code", $cf_wptracking_code );
363
  update_post_meta( $post_id, "cf_favicon_choice", $cf_favicon_choice );
364
  $cf_options = get_option( "cf_options" );
365
+ if(isset( $cf_options['pages'][$cf_slug] )):
366
+ unset( $cf_options['pages'][$cf_slug] );
367
+ update_option( "cf_options", $cf_options );
368
+ endif;
369
  if ( $this->is_404( $post_id ) )
370
  $this->set_404( "", "" );
371
  if ( $this->is_home( $post_id ) )
footer.php CHANGED
@@ -1,5 +1,5 @@
1
  <div class="copyrightInfo">
2
- <p><strong style="float: right;font-weight: 600;font-size: 11px;text-align: right;">Running Version 2.0.3</strong> Copyright 2015+ &copy; Eitson, LLC</p>
3
  </div>
4
  <style>
5
  .copyrightInfo {
1
  <div class="copyrightInfo">
2
+ <p><strong style="float: right;font-weight: 600;font-size: 11px;text-align: right;">Running Version 2.0.5</strong> Copyright 2015+ &copy; Eitson, LLC</p>
3
  </div>
4
  <style>
5
  .copyrightInfo {
readme.txt CHANGED
@@ -100,6 +100,11 @@ By re-selecting the page it will ping the server which should refresh your page.
100
 
101
  Stay current with the latest version of the plugin:
102
 
 
 
 
 
 
103
  = Version 2.0.3 =
104
 
105
  * API Not Connected Issue Fix
100
 
101
  Stay current with the latest version of the plugin:
102
 
103
+ = Version 2.0.4 =
104
+
105
+ * White screan fix
106
+ * Favicon fix
107
+
108
  = Version 2.0.3 =
109
 
110
  * API Not Connected Issue Fix