Version Description
Download this release
Release Info
Developer | marnietave |
Plugin | Free Tools to Automate Your Site Growth |
Version | 1.22 |
Comparing to | |
See all releases |
Code changes from version 1.21 to 1.22
- Readme.txt +7 -1
- classes/class_sumome.php +35 -0
- sumome.php +1 -1
Readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: SumoMe
|
|
3 |
Tags: MailChimp, Aweber, Constant Contact, Campaign Monitor, GetResponse, ActiveCampaign, MyEmma, Mad Mimi, Infusionsoft, Feedblitz, HubSpot, MyNewsletterBuilder, Inbox First, Sailthru, Klaviyo, Vero, Pardot, Zapier, Ontraport, ExactTarget, Vertical Response, Drip, MailerLite, WhatCounts, ConvertKit, MailJet, Maropost, popup, exit intent, growth, subscribers, twitter, facebook share, social plugin, social sharing, subscription, email form, share, sharing, social , social media buttons , links, click to tweet , analytics , newsletter, widget,lightbox, analytics, newsletter, newsletter, Facebook, floating social buttons, google plus, Image sharing, pinterest plugin, pintrest, share image, sharebar, sharing, social bookmarking, social plugin, sms, tweet button, heat map, heatmaps, twitter share, contact form, scroll box, content analytics, inbound marketing, mailing list, share buttons, welcome mat, landing page
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.6.1
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -353,6 +353,9 @@ Why you should encourage Twitter sharing
|
|
353 |
= 1.21 =
|
354 |
* Updating versions.
|
355 |
|
|
|
|
|
|
|
356 |
== Upgrade Notice ==
|
357 |
|
358 |
= 1.04 =
|
@@ -416,3 +419,6 @@ Why you should encourage Twitter sharing
|
|
416 |
|
417 |
= 1.21 =
|
418 |
* Updating versions.
|
|
|
|
|
|
3 |
Tags: MailChimp, Aweber, Constant Contact, Campaign Monitor, GetResponse, ActiveCampaign, MyEmma, Mad Mimi, Infusionsoft, Feedblitz, HubSpot, MyNewsletterBuilder, Inbox First, Sailthru, Klaviyo, Vero, Pardot, Zapier, Ontraport, ExactTarget, Vertical Response, Drip, MailerLite, WhatCounts, ConvertKit, MailJet, Maropost, popup, exit intent, growth, subscribers, twitter, facebook share, social plugin, social sharing, subscription, email form, share, sharing, social , social media buttons , links, click to tweet , analytics , newsletter, widget,lightbox, analytics, newsletter, newsletter, Facebook, floating social buttons, google plus, Image sharing, pinterest plugin, pintrest, share image, sharebar, sharing, social bookmarking, social plugin, sms, tweet button, heat map, heatmaps, twitter share, contact form, scroll box, content analytics, inbound marketing, mailing list, share buttons, welcome mat, landing page
|
4 |
Requires at least: 3.0.1
|
5 |
Tested up to: 4.6.1
|
6 |
+
Stable tag: 1.22
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
353 |
= 1.21 =
|
354 |
* Updating versions.
|
355 |
|
356 |
+
= 1.22 =
|
357 |
+
* Upgrading users that inserted the SumoMe tag manually.
|
358 |
+
|
359 |
== Upgrade Notice ==
|
360 |
|
361 |
= 1.04 =
|
419 |
|
420 |
= 1.21 =
|
421 |
* Updating versions.
|
422 |
+
|
423 |
+
= 1.22 =
|
424 |
+
* Upgrading users that inserted the SumoMe tag manually.
|
classes/class_sumome.php
CHANGED
@@ -16,6 +16,7 @@ class WP_Plugin_SumoMe {
|
|
16 |
}
|
17 |
|
18 |
public function activate_SumoMe_plugin() {
|
|
|
19 |
WP_Plugin_SumoMe::ajax_sumome_show_dashboard_overlay();
|
20 |
}
|
21 |
|
@@ -111,6 +112,40 @@ class WP_Plugin_SumoMe {
|
|
111 |
}
|
112 |
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
public function append_script_code() {
|
115 |
$this->check_generate_site_id();
|
116 |
|
16 |
}
|
17 |
|
18 |
public function activate_SumoMe_plugin() {
|
19 |
+
WP_Plugin_SumoMe::upgrade_manual_sumome_installation();
|
20 |
WP_Plugin_SumoMe::ajax_sumome_show_dashboard_overlay();
|
21 |
}
|
22 |
|
112 |
}
|
113 |
|
114 |
|
115 |
+
public function upgrade_manual_sumome_installation() {
|
116 |
+
$headerFile=get_template_directory()."/header.php";
|
117 |
+
|
118 |
+
if (file_exists($headerFile) && is_writable($headerFile)) {
|
119 |
+
$header_contents = file_get_contents($headerFile);
|
120 |
+
|
121 |
+
$pattern='/<script\\b[^>]*>(.*?)<\\/script>/i';
|
122 |
+
preg_match($pattern, $header_contents, $manuallyInsertedScriptTag);
|
123 |
+
|
124 |
+
if ($manuallyInsertedScriptTag) {
|
125 |
+
$dom = new \DOMDocument('1.0', 'utf-8');
|
126 |
+
$dom->loadHTML($manuallyInsertedScriptTag[0]);
|
127 |
+
$nodes = $dom->getElementsByTagName('script');
|
128 |
+
$manuallyInsertedScriptTagSiteID=$nodes->item(0)->getAttribute('data-sumo-site-id');
|
129 |
+
}
|
130 |
+
|
131 |
+
if (trim($manuallyInsertedScriptTagSiteID)!="") {
|
132 |
+
|
133 |
+
//save users site ID from the manually inserted tag
|
134 |
+
update_option('sumome_site_id', $manuallyInsertedScriptTagSiteID);
|
135 |
+
|
136 |
+
$sumomeScriptTag='<script src="//load.sumome.com/" data-sumo-site-id="' . esc_attr($manuallyInsertedScriptTagSiteID) . '" async="async"></script>';
|
137 |
+
$modified_header = str_replace($sumomeScriptTag,"",$header_contents);
|
138 |
+
|
139 |
+
//make backup of header.php just in case
|
140 |
+
copy($headerFile,get_template_directory()."/header.bak[".date('Y-m-d_H.i.s')."].php");
|
141 |
+
|
142 |
+
//remove manually inserted SumoMe tag
|
143 |
+
if (trim($modified_header)) file_put_contents($headerFile,$modified_header);
|
144 |
+
}
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
|
149 |
public function append_script_code() {
|
150 |
$this->check_generate_site_id();
|
151 |
|
sumome.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: SumoMe
|
4 |
Plugin URI: http://sumome.com
|
5 |
Description: Free Tools to grow your email list from SumoMe.com
|
6 |
-
Version: 1.
|
7 |
Author: SumoMe
|
8 |
Author URI: http://www.SumoMe.com
|
9 |
*/
|
3 |
Plugin Name: SumoMe
|
4 |
Plugin URI: http://sumome.com
|
5 |
Description: Free Tools to grow your email list from SumoMe.com
|
6 |
+
Version: 1.22
|
7 |
Author: SumoMe
|
8 |
Author URI: http://www.SumoMe.com
|
9 |
*/
|