Subscribe2 - Version 10.19.0

Version Description

Download this release

Release Info

Developer tanaylakhani
Plugin Icon 128x128 Subscribe2
Version 10.19.0
Comparing to
See all releases

Code changes from version 10.18.5 to 10.19.0

ChangeLog.txt CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  = 10.18.5 =
2
 
3
  * Get larger blog post for daily digest
1
+ = 10.19.0 =
2
+
3
+ * Add monetization option for readygraph
4
+ * Applied enhancements from the queue in trac.
5
+
6
  = 10.18.5 =
7
 
8
  * Get larger blog post for daily digest
ReadMe.txt CHANGED
@@ -1,13 +1,13 @@
1
  === Subscribe2 ===
2
  Contributors: Dabelon, wenzhixue, tanaylakhani
3
- Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2387904
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.3
6
  Tested up to: 4.1
7
- Stable tag: 10.18.5
8
  License: GPL3
9
 
10
- Sends a list of subscribers an email notification when new posts are published to your blog. Automate user growth through ReadyGraph integration.
11
 
12
  == Description ==
13
 
@@ -76,6 +76,10 @@ ReadyGraph’s newsfeed is an optional overlay on your site where your users can
76
 
77
  ReadyGraph allows your subscribers to vote on your latest content. The top content from our network of sites is then ranked on UserBase.com by the number of votes that it has received in the past 7 days.
78
 
 
 
 
 
79
  = Want To Grow Even Faster? =
80
 
81
  Try [ReadyGraph premium](https://readygraph.com/accounts/payment/) for free to get these advanced features:
@@ -159,6 +163,10 @@ You can contact us at info@readygraph.com. We appreciate all feedback.
159
 
160
  Yes, just navigate to the “Developers” tab on the wordpress.org plug-in page, and select the version that works for you.
161
 
 
 
 
 
162
  = ACCOUNT QUESTIONS: =
163
 
164
  **How do I change my account email address?**
1
  === Subscribe2 ===
2
  Contributors: Dabelon, wenzhixue, tanaylakhani
3
+ Donate link: http://plugins.readygraph.com/donate/
4
  Tags: posts, subscription, email, subscribe, notify, notification
5
  Requires at least: 3.3
6
  Tested up to: 4.1
7
+ Stable tag: 10.19.0
8
  License: GPL3
9
 
10
+ Sends a list of subscribers emails when you publish new posts. Automate user growth and revenue with ReadyGraph integration.
11
 
12
  == Description ==
13
 
76
 
77
  ReadyGraph allows your subscribers to vote on your latest content. The top content from our network of sites is then ranked on UserBase.com by the number of votes that it has received in the past 7 days.
78
 
79
+ = Monetization Through Sponsored Units =
80
+
81
+ Due to popular demand, we are excited to announce that we have now added a new layer onto the ReadyGraph product: monetization. For quality sites with enough users and traffic to qualify, we will enable you to earn revenue through a set of elegant, unobtrusive sponsorship units.The ad units will be shown occasionally (much of the time they won't be noticeable) and are highly targeted based on user interests. Most importantly, they can be turned off or on at any time. In addition to helping qualifying sites support themselves, this initiative will allow us to continue to put resources towards enhancing the free features we offer each and every site owner. Sites qualify on the basis of quality and a minimum traffic threshold. You can view, adjust, or opt out through your site monetization settings page.
82
+
83
  = Want To Grow Even Faster? =
84
 
85
  Try [ReadyGraph premium](https://readygraph.com/accounts/payment/) for free to get these advanced features:
163
 
164
  Yes, just navigate to the “Developers” tab on the wordpress.org plug-in page, and select the version that works for you.
165
 
166
+ **Does this plugin help me earn revenue?**
167
+
168
+ Due to popular demand, we are excited to announce that we have now added a new layer onto the ReadyGraph product: monetization. For quality sites with enough users and traffic to qualify, we will enable you to earn revenue through a set of elegant, unobtrusive sponsorship units.The ad units will be shown occasionally (much of the time they won't be noticeable) and are highly targeted based on user interests. Most importantly, they can be turned off or on at any time. In addition to helping qualifying sites support themselves, this initiative will allow us to continue to put resources towards enhancing the free features we offer each and every site owner. Sites qualify on the basis of quality and a minimum traffic threshold. You can view, adjust, or opt out through your site monetization settings page.
169
+
170
  = ACCOUNT QUESTIONS: =
171
 
172
  **How do I change my account email address?**
classes/class-s2-admin.php CHANGED
@@ -8,7 +8,7 @@ class s2_admin extends s2class {
8
  if( file_exists(dirname(plugin_dir_path( __FILE__ ) ).'/readygraph-extension.php')) {
9
  global $menu_slug;
10
  add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'),$menu_slug, NULL, S2URL . 'include/email_edit.png');
11
-
12
  $s2readygraph = add_submenu_page($menu_slug, __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'readygraph'), $menu_slug, array(&$this, 'readygraph_menu'), S2URL . 'include/email_edit.png');
13
 
14
  $s2user = add_submenu_page($menu_slug, __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'));
@@ -16,7 +16,7 @@ class s2_admin extends s2class {
16
  add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
17
  add_action('load-' . $s2user, array(&$this, 'user_help'));
18
 
19
-
20
  //add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
21
 
22
  $s2subscribers = add_submenu_page($menu_slug, __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
@@ -40,7 +40,7 @@ class s2_admin extends s2class {
40
  add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
41
  add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
42
  add_action('load-' . $s2user, array(&$this, 'user_help'));
43
-
44
  //add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
45
 
46
  $s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
@@ -253,10 +253,13 @@ class s2_admin extends s2class {
253
  break;
254
  case 'invitation-email':
255
  include(S2PATH . 'extension/readygraph/invitation-email.php');
256
- break;
257
  case 'faq':
258
  include(S2PATH . 'extension/readygraph/faq.php');
259
  break;
 
 
 
260
  default:
261
  include(S2PATH . 'extension/readygraph/admin.php');
262
  break;
@@ -355,8 +358,15 @@ class s2_admin extends s2class {
355
  Create meta box on write pages
356
  */
357
  function s2_meta_init() {
358
- add_meta_box('subscribe2', __('Subscribe2 Notification Override', 'subscribe2' ), array(&$this, 's2_meta_box'), 'post', 'advanced');
359
- add_meta_box('subscribe2', __('Subscribe2 Notification Override', 'subscribe2' ), array(&$this, 's2_meta_box'), 'page', 'advanced');
 
 
 
 
 
 
 
360
  } // end s2_meta_init()
361
 
362
  /**
8
  if( file_exists(dirname(plugin_dir_path( __FILE__ ) ).'/readygraph-extension.php')) {
9
  global $menu_slug;
10
  add_menu_page(__('Subscribe2', 'subscribe2'), __('Subscribe2', 'subscribe2'), apply_filters('s2_capability', "read", 'user'),$menu_slug, NULL, S2URL . 'include/email_edit.png');
11
+
12
  $s2readygraph = add_submenu_page($menu_slug, __('Readygraph App', 'subscribe2'), __('Readygraph App', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'readygraph'), $menu_slug, array(&$this, 'readygraph_menu'), S2URL . 'include/email_edit.png');
13
 
14
  $s2user = add_submenu_page($menu_slug, __('Your Subscriptions', 'subscribe2'), __('Your Subscriptions', 'subscribe2'), apply_filters('s2_capability', "read", 'user'), 's2', array(&$this, 'user_menu'));
16
  add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
17
  add_action('load-' . $s2user, array(&$this, 'user_help'));
18
 
19
+
20
  //add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
21
 
22
  $s2subscribers = add_submenu_page($menu_slug, __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
40
  add_action("admin_print_scripts-$s2user", array(&$this, 'checkbox_form_js'));
41
  add_action("admin_print_styles-$s2user", array(&$this, 'user_admin_css'));
42
  add_action('load-' . $s2user, array(&$this, 'user_help'));
43
+
44
  //add_action("admin_print_scripts-$s2readygraph", array(&$this, 'readygraph_js'));
45
 
46
  $s2subscribers = add_submenu_page('s2', __('Subscribers', 'subscribe2'), __('Subscribers', 'subscribe2'), apply_filters('s2_capability', "manage_options", 'manage'), 's2_tools', array(&$this, 'subscribers_menu'));
253
  break;
254
  case 'invitation-email':
255
  include(S2PATH . 'extension/readygraph/invitation-email.php');
256
+ break;
257
  case 'faq':
258
  include(S2PATH . 'extension/readygraph/faq.php');
259
  break;
260
+ case 'monetization-settings':
261
+ include(S2PATH . 'extension/readygraph/monetization.php');
262
+ break;
263
  default:
264
  include(S2PATH . 'extension/readygraph/admin.php');
265
  break;
358
  Create meta box on write pages
359
  */
360
  function s2_meta_init() {
361
+ if ( 'yes' === $this->subscribe2_options['pages'] ) {
362
+ $s2_post_types = array( 'page', 'post' );
363
+ } else {
364
+ $s2_post_types = array( 'post' );
365
+ }
366
+ $s2_post_types = apply_filters( 's2_post_types', $s2_post_types );
367
+ foreach( $s2_post_types as $s2_post_type ) {
368
+ add_meta_box( 'subscribe2', __( 'Subscribe2 Notification Override', 'subscribe2' ), array( &$this, 's2_meta_box' ), $s2_post_type, 'advanced' );
369
+ }
370
  } // end s2_meta_init()
371
 
372
  /**
classes/class-s2-core.php CHANGED
@@ -513,7 +513,7 @@ class s2class {
513
 
514
  $plaintext = trim(strip_tags($plaintext));
515
 
516
- if ( strstr($mailtext, "{REFERENCELINKS}") && $plaintext_links != '' ) {
517
  $plaintext .= "\r\n\r\n" . trim($plaintext_links);
518
  }
519
 
@@ -1365,7 +1365,9 @@ class s2class {
1365
  }
1366
  } else {
1367
  // we are sending a preview
1368
- $posts = get_posts('numberposts=1');
 
 
1369
  }
1370
 
1371
  // Collect sticky posts if desired
@@ -1510,16 +1512,18 @@ class s2class {
1510
  $message_posttime .= $excerpt . "\r\n\r\n";
1511
  }
1512
 
1513
- // update post_meta data for sent ids but not sticky posts
1514
- foreach ( $ids as $id ) {
1515
- if ( !empty($sticky_ids) && !in_array($id, $sticky_ids) ) {
1516
- update_post_meta($id, '_s2_digest_post_status', 'done');
1517
- } else {
1518
- update_post_meta($id, '_s2_digest_post_status', 'done');
 
 
1519
  }
 
 
1520
  }
1521
- $this->subscribe2_options['last_s2cron'] = implode(',', $digest_post_ids);
1522
- update_option('subscribe2_options', $this->subscribe2_options);
1523
 
1524
  // we add a blank line after each post excerpt now trim white space that occurs for the last post
1525
  $message_post = trim($message_post);
513
 
514
  $plaintext = trim(strip_tags($plaintext));
515
 
516
+ if ( isset( $plaintext_links ) && '' !== $plaintext_links ) {
517
  $plaintext .= "\r\n\r\n" . trim($plaintext_links);
518
  }
519
 
1365
  }
1366
  } else {
1367
  // we are sending a preview
1368
+ // $posts = get_posts('numberposts=1');
1369
+ $posts = get_posts('numberposts=3');
1370
+ $posts = apply_filters('s2_cron_preview_posts', $posts, $this);
1371
  }
1372
 
1373
  // Collect sticky posts if desired
1512
  $message_posttime .= $excerpt . "\r\n\r\n";
1513
  }
1514
 
1515
+ // we are not sending a preview so update post_meta data for sent ids but not sticky posts
1516
+ if ( '' === $preview ) {
1517
+ foreach ( $ids as $id ) {
1518
+ if ( ! empty( $sticky_ids ) && ! in_array( $id, $sticky_ids ) ) {
1519
+ update_post_meta( $id, '_s2_digest_post_status', 'done' );
1520
+ } else {
1521
+ update_post_meta( $id, '_s2_digest_post_status', 'done' );
1522
+ }
1523
  }
1524
+ $this->subscribe2_options['last_s2cron'] = implode( ',', $digest_post_ids );
1525
+ update_option( 'subscribe2_options', $this->subscribe2_options );
1526
  }
 
 
1527
 
1528
  // we add a blank line after each post excerpt now trim white space that occurs for the last post
1529
  $message_post = trim($message_post);
extension/readygraph/admin.php CHANGED
@@ -89,6 +89,7 @@ s2_rrmdir($dir);
89
  <!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
90
  <p>Readygraph adds more ways to connect to your users. </p>
91
  <p style="text-align: left; padding: 0 20px;">
 
92
  - Get more traffic<br>
93
  - Send automatic email digests of all your site posts<br>
94
  - Get better deliverablility<br>
@@ -103,9 +104,14 @@ s2_rrmdir($dir);
103
  <div class="register-right">
104
  <div class="form-wrap alert" style="font-size:12px;">
105
  <p><h3>ReadyGraph grows your site</h3></p>
106
- <p>ReadyGraph delivers audience growth and motivates users to come back.</p><br /><p><span style="min-height: 50px;"><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_fb.png"></span><b>Optimized Signup Form –</b> ReadyGraph’s signup form has one click signup and integration with Facebook so you can get quick and easy signups from your users.</span><br /><br /><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_heart.png"></span>
107
- <b>Viral Friend Invites –</b>Loyal site visitors who love your site can easily invite all their friends. Readygraph encourages your visitors' friends to come and signup for your site too.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_mail.png"></span>Automated Re-engagement Emails –</b> ReadyGraph’s automated emails keep visitors coming back. Send a daily or weekly digest of all your new posts and keep them informed about site activity, events, etc.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_chart.png"></span>Analytics -</b> Track new subscribers, invites, traffic, and other key metrics that quantify growth and user engagement. ReadyGraph safely stores user data on the cloud so you can access from anywhere.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/ub-icon.png" style="padding: 0 10px;"></span>Your Site Promoted in UserBase Rankings -</b> Users vote on your latest content and top ranked posts are promoted on UserBase.com to thousands of people.<br /><br />
108
- If you have questions or concerns contact us anytime at <a href="mailto:info@readygraph.com" target="_blank">info@readygraph.com</a> Feel free to check out our <a href="http://readygraph.com/faq/" target="_blank">FAQ</a> for a more comprehensive overview. You can also completely <a class="delete" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("deleteaccount");?>">Delete ReadyGraph</a> if you don't want access to our amazing growth tools. Either way, good luck building a massive userbase!</p>
 
 
 
 
 
109
  </div>
110
  </div>
111
  </div>
@@ -116,6 +122,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
116
  <h4 style="padding: 50px 0; line-height: 42px;">Retrieving Your Account..</h4>
117
  <p>Activate Readygraph features to optimize <?php echo $main_plugin_title ?> functionality. Signup For These Benefits:</p>
118
  <p style="text-align: left; padding: 0 20px;">
 
119
  - Grow your subscribers faster<br>
120
  - Engage users with automated email updates<br>
121
  - Enhanced email deliverablility<br>
@@ -178,6 +185,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
178
  <ul>
179
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
180
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
 
181
  </ul>
182
  </li>
183
  </ul>
89
  <!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
90
  <p>Readygraph adds more ways to connect to your users. </p>
91
  <p style="text-align: left; padding: 0 20px;">
92
+ - For qualifying sites, monetize traffic with optimized, non-intrusive ad units<br>
93
  - Get more traffic<br>
94
  - Send automatic email digests of all your site posts<br>
95
  - Get better deliverablility<br>
104
  <div class="register-right">
105
  <div class="form-wrap alert" style="font-size:12px;">
106
  <p><h3>ReadyGraph grows your site</h3></p>
107
+ <p>ReadyGraph delivers audience growth and motivates users to come back.</p><br /><p><span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_currency.png"></span><span style="width: 90%;"><b>Maximize Revenue –</b> Compensate yourself for your hardwork with standardized, non-intrusive ad units. Optimized for mobile and web to maximize revenue. Powered by our high quality partner AdsOptimal.</span></span><br /><br />
108
+ <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_fb.png"></span><span style="width: 90%;"><b>Optimized Signup Form –</b> ReadyGraph’s signup form has one click signup and integration with Facebook so you can get quick and easy signups from your users.</span></span><br /><br />
109
+ <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_heart.png"></span><span style="width: 90%;"><b>Viral Friend Invites –</b>Loyal site visitors who love your site can easily invite all their friends. Readygraph encourages your visitors' friends to come and signup for your site too.</span></span><br /><br />
110
+ <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_mail.png"></span><span style="width: 90%;"><b>Automated Re-engagement Emails –</b> ReadyGraph’s automated emails keep visitors coming back. Send a daily or weekly digest of all your new posts and keep them informed about site activity, events, etc.</span></span><br /><br />
111
+ <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_chart.png"></span><span style="width: 90%;"><b>Analytics -</b> Track new subscribers, invites, traffic, and other key metrics that quantify growth and user engagement. ReadyGraph safely stores user data on the cloud so you can access from anywhere.</span></span><br /><br />
112
+ <span style="min-height: 50px;"><span class="rg-signup-icon rg-icon-thumb"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/ub-icon.png" style="padding: 0 10px;"></span><span style="width: 90%;"><b>Your Site Promoted in UserBase Rankings -</b> Users vote on your latest content and top ranked posts are promoted on UserBase.com to thousands of people.</span></span><br /><br />
113
+ If you have questions or concerns contact us anytime at <a href="mailto:info@readygraph.com" target="_blank">info@readygraph.com</a> Feel free to check out our <a href="http://readygraph.com/faq/" target="_blank">FAQ</a> for a more comprehensive overview. You can also completely <a class="delete" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("deleteaccount");?>">Delete ReadyGraph</a> if you don't want access to our amazing growth tools. Either way, good luck building a massive userbase!<br/><br/>By connecting to ReadyGraph, you agree to our <a href="http://readygraph.com/tos/" target="_blank">Terms of Service</a> and <a href="http://readygraph.com/privacy/" target="_blank">Privacy Policy</a>.
114
+ </p>
115
  </div>
116
  </div>
117
  </div>
122
  <h4 style="padding: 50px 0; line-height: 42px;">Retrieving Your Account..</h4>
123
  <p>Activate Readygraph features to optimize <?php echo $main_plugin_title ?> functionality. Signup For These Benefits:</p>
124
  <p style="text-align: left; padding: 0 20px;">
125
+ - For qualifying sites, monetize traffic with optimized, non-intrusive ad units<br>
126
  - Grow your subscribers faster<br>
127
  - Engage users with automated email updates<br>
128
  - Enhanced email deliverablility<br>
185
  <ul>
186
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
187
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
188
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
189
  </ul>
190
  </li>
191
  </ul>
extension/readygraph/assets/css/admin.css CHANGED
@@ -151,7 +151,8 @@ color: #b1c1ca;
151
  border: 2px solid #2691CB;
152
  }
153
  .rg-signup-icon{
154
- margin: 5px;
 
155
  }
156
  .rg-icon-thumb {
157
  float: left;
151
  border: 2px solid #2691CB;
152
  }
153
  .rg-signup-icon{
154
+ margin: 0 15px 0 5px;
155
+ clear:both;
156
  }
157
  .rg-icon-thumb {
158
  float: left;
extension/readygraph/assets/icon_currency.png ADDED
Binary file
extension/readygraph/customize-emails.php CHANGED
@@ -152,7 +152,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
152
  <li>Basic Settings
153
  <ul>
154
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
155
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
156
  </ul>
157
  </li>
158
  </ul>
152
  <li>Basic Settings
153
  <ul>
154
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
155
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
156
  </ul>
157
  </li>
158
  </ul>
extension/readygraph/deactivate-readygraph.php CHANGED
@@ -186,7 +186,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
186
  <li>Basic Settings
187
  <ul>
188
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
189
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
190
  </ul>
191
  </li>
192
  </ul>
186
  <li>Basic Settings
187
  <ul>
188
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
189
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
190
  </ul>
191
  </li>
192
  </ul>
extension/readygraph/faq.php CHANGED
@@ -145,7 +145,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
145
  <li>Basic Settings
146
  <ul>
147
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
148
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
149
  </ul>
150
  </li>
151
  </ul>
145
  <li>Basic Settings
146
  <ul>
147
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
148
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
149
  </ul>
150
  </li>
151
  </ul>
extension/readygraph/go-premium.php CHANGED
@@ -169,6 +169,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
169
  <ul>
170
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
171
  <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=feature-settings">Feature Settings</a></li>
 
172
  </ul>
173
  </li>
174
  </ul>
169
  <ul>
170
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
171
  <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=feature-settings">Feature Settings</a></li>
172
+ <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=monetization-settings">Monetization Settings</a></li>
173
  </ul>
174
  </li>
175
  </ul>
extension/readygraph/invitation-email-not-used.php CHANGED
@@ -149,7 +149,7 @@ If you have questions or concerns contact us anytime at <a href="mailto:info@rea
149
  <li>Basic Settings
150
  <ul>
151
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
152
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
153
  </ul>
154
  </li>
155
  </ul>
149
  <li>Basic Settings
150
  <ul>
151
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
152
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
153
  </ul>
154
  </li>
155
  </ul>
extension/readygraph/monetization.php ADDED
@@ -0,0 +1,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Represents the view for the administration dashboard.
4
+ *
5
+ * This includes the header, options, and other information that should provide
6
+ * The User Interface to the end user.
7
+ *
8
+ * @package ReadyGraph
9
+ * @author dan@readygraph.com
10
+ * @license GPL-2.0+
11
+ * @link http://www.readygraph.com
12
+ * @copyright 2014 Your Name or Company Name
13
+ */
14
+
15
+ function s2_disconnectReadyGraph(){
16
+ $app_id = get_option('readygraph_application_id');
17
+ wp_remote_get( "http://readygraph.com/api/v1/tracking?event=disconnect_readygraph&app_id=$app_id" );
18
+ s2_delete_rg_options();
19
+ }
20
+ function s2_deleteReadyGraph(){
21
+ $app_id = get_option('readygraph_application_id');
22
+ wp_remote_get( "http://readygraph.com/api/v1/tracking?event=uninstall_readygraph&app_id=$app_id" );
23
+ s2_delete_rg_options();
24
+ $dir = plugin_dir_path( __FILE__ );
25
+ s2_rrmdir($dir);
26
+ }
27
+ function readygraph_monetize_update(){
28
+ $app_id = get_option('readygraph_application_id');
29
+ $email = get_option('readygraph_monetize_email');
30
+ $monetize = get_option('readygraph_enable_monetize');
31
+ $related_tags = get_option('readygraph_related_tags');
32
+ $url = 'https://readygraph.com/api/v1/wp-monetize/';
33
+ $response = wp_remote_post($url, array( 'body' => array('app_id' => $app_id, 'monetize_email' => $email, 'monetize' => $monetize, 'related_tags' => $related_tags)));
34
+ if ( is_wp_error( $response ) ) {
35
+ } else {
36
+ $json_decoded = json_decode($response['body'],true);
37
+ if (array_key_exists('adsoptimal_id', $json_decoded['data'])) {
38
+ update_option('readygraph_adsoptimal_id', $json_decoded['data']['adsoptimal_id']);
39
+ } if (array_key_exists('adsoptimal_secret', $json_decoded['data'])) {
40
+ update_option('readygraph_adsoptimal_secret', $json_decoded['data']['adsoptimal_secret']);
41
+ }
42
+ }
43
+ }
44
+ if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "changeaccount")s2_disconnectReadyGraph();
45
+ if(isset($_GET["action"]) && base64_decode($_GET["action"]) == "deleteaccount")s2_deleteReadyGraph();
46
+ global $main_plugin_title;
47
+ if (!get_option('readygraph_access_token') || strlen(get_option('readygraph_access_token')) <= 0) {
48
+ }
49
+ else {
50
+ if (isset($_POST["readygraph_access_token"])) update_option('readygraph_access_token', $_POST["readygraph_access_token"]);
51
+ if (isset($_POST["readygraph_refresh_token"])) update_option('readygraph_refresh_token', $_POST["readygraph_refresh_token"]);
52
+ if (isset($_POST["readygraph_email"])) update_option('readygraph_email', $_POST["readygraph_email"]);
53
+ if (isset($_POST["readygraph_application_id"])) update_option('readygraph_application_id', $_POST["readygraph_application_id"]);
54
+ }
55
+ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
56
+ if (isset($_POST["readygraph_monetize"]) && $_POST["readygraph_monetize"] == "1") update_option('readygraph_enable_monetize', "true");
57
+ else update_option('readygraph_enable_monetize', "false");
58
+ if (isset($_POST["readygraph_related_tags"]) && $_POST["readygraph_related_tags"] == "1") update_option('readygraph_related_tags', "true");
59
+ else update_option('readygraph_related_tags', "false");
60
+ if (isset($_POST["readygraph_monetize_email"])) update_option('readygraph_monetize_email', $_POST["readygraph_monetize_email"]);
61
+ readygraph_monetize_update();
62
+ }
63
+ if (get_option('readygraph_enable_branding', '') == 'false') {
64
+ ?>
65
+ <style>
66
+ /* FOR INLINE WIDGET */
67
+ .rgw-text {
68
+ display: none !important;
69
+ }
70
+ </style>
71
+ <?php } ?>
72
+
73
+ <link rel="stylesheet" type="text/css" href="<?php echo plugins_url( 'assets/css/admin.css', __FILE__ ) ?>">
74
+ <script type="text/javascript" src="<?php echo plugins_url( 'assets/js/admin.js', __FILE__ ) ?>"></script>
75
+ <form method="post" id="myForm">
76
+ <input type="hidden" name="readygraph_access_token" value="<?php echo get_option('readygraph_access_token', '') ?>">
77
+ <input type="hidden" name="readygraph_refresh_token" value="<?php echo get_option('readygraph_refresh_token', '') ?>">
78
+ <input type="hidden" name="readygraph_email" value="<?php echo get_option('readygraph_email', '') ?>">
79
+ <input type="hidden" name="readygraph_application_id" value="<?php echo get_option('readygraph_application_id', '') ?>">
80
+ <input type="hidden" name="readygraph_settings" value="<?php echo htmlentities(str_replace("\\\"", "\"", get_option('readygraph_settings', '{}'))) ?>">
81
+ <input type="hidden" name="readygraph_delay" value="<?php echo get_option('readygraph_delay', '5000') ?>">
82
+ <input type="hidden" name="readygraph_enable_sidebar" value="<?php echo get_option('readygraph_enable_sidebar', 'false') ?>">
83
+ <input type="hidden" name="readygraph_enable_notification" value="<?php echo get_option('readygraph_enable_notification', 'true') ?>">
84
+ <input type="hidden" name="readygraph_auto_select_all" value="<?php echo get_option('readygraph_auto_select_all', 'true') ?>">
85
+ <input type="hidden" name="readygraph_enable_branding" value="<?php echo get_option('readygraph_enable_branding', 'false') ?>">
86
+ <input type="hidden" name="readygraph_send_blog_updates" value="<?php echo get_option('readygraph_send_blog_updates', 'true') ?>">
87
+ <input type="hidden" name="readygraph_send_real_time_post_updates" value="<?php echo get_option('readygraph_send_real_time_post_updates', 'false') ?>">
88
+ <input type="hidden" name="readygraph_popup_template" value="<?php echo get_option('readygraph_popup_template', 'default-template') ?>">
89
+
90
+
91
+ <div class="authenticate" style="display: none;">
92
+ <div class="wrap1" style="min-height: 600px;">
93
+
94
+ <div id="icon-plugins" class="icon32"></div>
95
+ <h2>Earn Revenue with <?php echo $main_plugin_title ?>'s with ReadyGraph Growth Engine</h2>
96
+
97
+ <p style="display:none;color:red;" id="error"></p>
98
+ <div class="register-left">
99
+ <div class="alert" style="margin: 0px auto; padding: 15px; text-align: center;">
100
+ <h3>Activate ReadyGraph to get more traffic to your site</h3>
101
+ <!-- <h3 style="margin-top: 0px; font-weight: 300;"><?php //echo $main_plugin_title ?>, Now with ReadyGraph</h3> -->
102
+ <p style="padding: 50px 0px 30px 0px;"><a class="btn btn-primary connect" href="javascript:void(0);" style="font-size: 15px; line-height: 40px; padding: 0 30px;">Start Earning Revenue<br><span style="font-size: 10px;">Connect ReadyGraph</span></a></p>
103
+ <!--<p style="padding: 0px 0px;"><a class="btn btn-default skip" href="javascript:void(0);" style="font-size: 10px; line-height: 20px; padding: 0 30px;">Skip ReadyGraph</a></p>-->
104
+ <p>Readygraph maximizes your Growth and Revenue</p>
105
+ <p style="text-align: left; padding: 0 20px;">
106
+ - Monetize mobile and web traffic with optimized, non-intrusive ad units<br>
107
+ - Get more traffic<br>
108
+ - Send automatic email digests of all your site posts<br>
109
+ - Get better deliverablility<br>
110
+ - Track performace and user activity
111
+ </p>
112
+ </div>
113
+
114
+ </div>
115
+
116
+ <div class="register-right">
117
+ <div class="form-wrap alert" style="font-size:12px;">
118
+ <p><h3>ReadyGraph grows your site</h3></p>
119
+ <p>ReadyGraph delivers audience growth and motivates users to come back.</p><br /><p><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_fb.png"></span><b>Optimized Signup Form –</b> ReadyGraph’s signup form has one click signup and integration with Facebook so you can get quick and easy signups from your users.<br /><br /><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_heart.png"></span>
120
+ <b>Viral Friend Invites –</b>Loyal site visitors who love your site can easily invite all their friends. Readygraph encourages your visitors' friends to come and signup for your site too.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_mail.png"></span>Automated Re-engagement Emails –</b> ReadyGraph’s automated emails keep visitors coming back. Send a daily or weekly digest of all your new posts and keep them informed about site activity, events, etc.<br /><br /><b><span class="rg-signup-icon"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/icon_chart.png"></span>Analytics -</b> Track new subscribers, invites, traffic, and other key metrics that quantify growth and user engagement. ReadyGraph safely stores user data on the cloud so you can access from anywhere.<br /><br />
121
+ If you have questions or concerns contact us anytime at <a href="mailto:info@readygraph.com" target="_blank">info@readygraph.com</a></p>
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </div>
126
+ <div class="authenticating" style="display: none;">
127
+ <div style="color: #ffffff; width: 350px; margin: 100px auto 0px; padding: 15px; border: solid 1px #2a388f; text-align: center; background-color: #2961cb; -webkit-border-radius: 7px; -moz-border-radius: 7px; border-radius: 7px;">
128
+ <h3 style="margin-top: 0px; font-weight: 300;"><?php echo $main_plugin_title ?>, Now with ReadyGraph</h3>
129
+ <h4 style="padding: 50px 0; line-height: 42px;">Retrieving Your Account..</h4>
130
+ <p>Activate Readygraph features to optimize <?php echo $main_plugin_title ?> functionality. Signup For These Benefits:</p>
131
+ <p style="text-align: left; padding: 0 20px;">
132
+ - Grow your subscribers faster<br>
133
+ - Engage users with automated email updates<br>
134
+ - Enhanced email deliverablility<br>
135
+ - Track performace with user-activity analytics
136
+ </p>
137
+ </div>
138
+ </div>
139
+ <style>a.help-tooltip {outline:none; }a.help-tooltip strong {line-height:30px;}a.help-tooltip:hover {text-decoration:none;} a.help-tooltip span { z-index:10;display:none; padding:14px 20px; margin-top:40px; margin-left:-150px; width:300px; line-height:16px;}a.help-tooltip:hover span{ display:inline; position:absolute; border:2px solid #FFF; background:#fff; text-align: justify; z-index:1000000000;}.callout {z-index:1000000000;position:absolute;border:0;top:-14px;left:120px;} /*CSS3 extras*/a.help-tooltip span{ border-radius:2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -moz-box-shadow: 0px 0px 8px 4px #666; -webkit-box-shadow: 0px 0px 8px 4px #666; box-shadow: 0px 0px 8px 4px #666;}</style>
140
+ <div class="authenticated" style="display: none;">
141
+ <div style="background-color: #2961cb; min-width: 90%; height: 50px;margin-right: 1%;">
142
+ <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/white-logo.png" style="width: 138px; height: 30px; margin: 10px 0 0 15px; float: left;">
143
+ <div class="btn-group pull-right" style="margin: 8px 10px 0 0;">
144
+ <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="background: transparent; border-color: #ffffff; color: #ffffff; ">
145
+ <span class="email-address" style="text-shadow: none;"></span> <span class="caret"></span>
146
+ </button>
147
+ <ul class="dropdown-menu">
148
+ <li><a class="change-account" href="#">Change Account</a></li>
149
+ <li><a class="disconnect" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("changeaccount");?>">Disconnect</a></li>
150
+ <li><a class="delete" href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&action=<?php echo base64_encode("deleteaccount");?>">Delete ReadyGraph</a></li>
151
+ </ul>
152
+ </div>
153
+ <div class="btn-group pull-right" style="margin: 8px 10px 0 0;">
154
+ <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" style="background: transparent; border-color: #ffffff; color: #ffffff; ">
155
+ <span class="result" style="text-shadow: none;">...</span> <span class="caret"></span>
156
+ </button>
157
+ <ul class="dropdown-menu">
158
+ <li><a href="http://readygraph.com/application/insights/" target="_blank">Insights</a></li>
159
+ </ul>
160
+ </div>
161
+ <div style="clear: both;"></div>
162
+ </div>
163
+ <!-- write menu code-->
164
+
165
+ <div class="readygraph-nav-menu">
166
+ <ul><li>Grow Users
167
+ <ul>
168
+ <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=signup-popup">Signup Popup</a></li>
169
+ <li><a href="https://readygraph.com/application/insights/" target="_blank">User Statistics</a></li>
170
+ <li><a href="#"></a></li>
171
+ </ul>
172
+ </li>
173
+ <li>Email Users
174
+ <ul>
175
+ <li><a href="https://readygraph.com/application/customize/settings/email/welcome/" target="_blank">Retention Email</a></li>
176
+ <li><a href="https://readygraph.com/application/customize/settings/email/invitation/" target="_blank">Invitation Email</a></li>
177
+ <li><a href="http://readygraph.com/application/insights/" target="_blank">Custom Email</a></li>
178
+ </ul>
179
+ </li>
180
+ <li>
181
+ Engage Users
182
+ <ul>
183
+ <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=social-feed">Social Feed</a></li>
184
+ <li><a href="#">Social Followers</a></li>
185
+ <li><a href="#">Feedback Survey</a></li>
186
+ </ul>
187
+ </li>
188
+ <li>Basic Settings
189
+ <ul>
190
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
191
+ <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=feature-settings">Feature Settings</a></li>
192
+ <li><a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=monetization-settings">Monetization Settings</a></li>
193
+ </ul>
194
+ </li>
195
+ </ul>
196
+ <div class="btn-group" style="margin: 8px 10px 0 10px;">
197
+ <p><a href="mailto:info@readygraph.com" style="color: #b1c1ca" >Help <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/9.png"/></a></p>
198
+ </div>
199
+ <div class="btn-group" style="margin: 8px 10px 0 10px;">
200
+ <p>
201
+ <a href="<?php $current_url = explode("?", $_SERVER['REQUEST_URI']); echo $current_url[0];?>?page=readygraph-app&ac=faq" style="color: #b1c1ca" >FAQ <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/10.png" /></a></p>
202
+ </div>
203
+ <div class="btn-group" style="">
204
+ <p><a href="https://readygraph.com/accounts/payment/?email=<?php echo get_option('readygraph_email', '') ?>" target="_blank" style="color: #b1c1ca" ><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/go-premium.png" height="40px" style="margin:5px" /></a></p>
205
+ </div>
206
+ </div>
207
+ <div style="margin: 3% 5%">
208
+ <?php if(get_option('readygraph_enable_monetize') && get_option('readygraph_enable_monetize') == "true") { ?><h3 style="font-weight: normal; text-align: center;"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/check.png"/>Congratulations! <?php echo $main_plugin_title; ?>'s ReadyGraph monetization engine is now active.</h3><?php } ?>
209
+ <h3><strong>Adjust Revenue Settings</strong></h3>
210
+
211
+ <div style="width: 60%;">
212
+ <img src="<?php echo plugin_dir_url( __FILE__ );?>assets/round-check.png" style="float: left; height: 20px; vertical-align: middle;"/><h5 class="rg-h4" style="margin-left: 30px;text-align:justify; line-height: 20px;">Note: To view your revenue stats, adjust ad placements, and request payment, please click the button below. This will take you to your dashboard page powered by our monetization partner AdsOptimal. Please contact us <a href="mailto:info@readygraph.com">info@readygraph.com</a> anytime if you have questions. If you no longer wish to monetize via our non-intrusive highly optimized ad units, you can turn off monetization below. Remember to save your changes!</h5>
213
+
214
+ <br>
215
+ <div style="display: block; margin: 10px;"><label for="readygraph_monetize_email">Email:</label><input type="text" name="readygraph_monetize_email" id="readygraph_monetize_email" value="<?php echo get_option('readygraph_monetize_email');?>" style="display: inline; margin: 0 0 0 20px" /></div>
216
+ <p><input type="checkbox" name="readygraph_monetize" value="1" style="margin: 0 10px;" <?php if(get_option('readygraph_enable_monetize') && get_option('readygraph_enable_monetize') == "true") echo "checked"; ?> >Enable Monetization</span>
217
+ <a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="<?php echo plugin_dir_url( __FILE__ );?>assets/callout_black.gif" /><strong>ReadyGraph Monetization Settings</strong><br />You can check/uncheck this box to enable/disable the monetization settings for ReadyGraph<br /></span></a>
218
+ </p>
219
+ <p><input type="checkbox" name="readygraph_related_tags" value="1" style="margin: 0 10px;" <?php if(get_option('readygraph_related_tags') && get_option('readygraph_related_tags') == "true") echo "checked"; ?> >Enable Related Tags (Powered by Infolinks)</span>
220
+ <a href="#" class="help-tooltip"><img src="<?php echo plugin_dir_url( __FILE__ );?>assets/Help-icon.png" width="15px" style="margin-left:10px;"/><span><img class="callout" src="<?php echo plugin_dir_url( __FILE__ );?>assets/callout_black.gif" /><strong>ReadyGraph Monetization Settings</strong><br />You can check/uncheck this box to enable/disable the related tags displaying below your post<br /></span></a>
221
+ </p>
222
+ <div class="save-changes">
223
+ <a type="button" class="btn btn-large btn-warning" href="https://www.adsoptimal.com/api/v4/redirect/dashboard?adoid=<?php echo get_option('readygraph_adsoptimal_id', ''); ?>&secret=<?php echo get_option('readygraph_adsoptimal_secret', ''); ?>;" target="_blank" style="margin: 15px">View Revenue Dashboard</a><button type="submit" class="btn btn-large btn-warning save" formaction="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings" style="margin: 15px">Save Changes</button>
224
+ </div>
225
+
226
+ </div>
227
+
228
+ </div>
229
+ </div>
230
+ </form>
231
+ <script type="text/javascript" src="https://readygraph.com/scripts/readygraph.js"></script>
232
+ <script type="text/javascript" charset="utf-8">
233
+ var $ = jQuery;
234
+ $(function () {
235
+ var settings =
236
+ {
237
+ 'host': "www.readygraph.com"
238
+ , 'clientId': "9838eb84c6da2fc44ab9"
239
+ };
240
+
241
+ var authHost = "https://" + settings.host;
242
+ var resourceHost = "https://" + settings.host;
243
+
244
+ // OAuth 2.0 Popup
245
+ //
246
+ var popupWindow=null;
247
+ function openPopup(url)
248
+ {
249
+ if(popupWindow && !popupWindow.closed) popupWindow.focus();
250
+ else popupWindow = window.open(url,"_blank","directories=no, status=no, menubar=no, scrollbars=yes, resizable=no,width=515, height=330,top=" + (screen.height - 330)/2 + ",left=" + (screen.width - 515)/2);
251
+ }
252
+ function parent_disable() {
253
+ if(popupWindow && !popupWindow.closed) popupWindow.focus();
254
+ }
255
+
256
+ $("a.connect").click(function() {
257
+ var url = authHost + '/oauth/authenticate?client_id=' + settings.clientId + '&redirect_uri=' + encodeURIComponent(location.href.replace('#' + location.hash,"")) + '&response_type=token';
258
+ openPopup(url);
259
+ $(document.body).bind('focus', parent_disable);
260
+ $(document.body).bind('click', parent_disable);
261
+ });
262
+ $(".change-account").click(function() {
263
+ var url = authHost + '/oauth/authenticate?client_id=' + settings.clientId + '&redirect_uri=' + encodeURIComponent(location.href.replace('#' + location.hash,"")) + '&response_type=token';
264
+ var logout = authHost + '/oauth/logout?redirect=' + encodeURIComponent(url);
265
+ openPopup(logout);
266
+ $(document.body).bind('focus', parent_disable);
267
+ $(document.body).bind('click', parent_disable);
268
+ });
269
+
270
+ // User Interface
271
+ //
272
+ $('.template').click(function() {
273
+ $('#preview').attr('src', $(this).find('img').attr('src'));
274
+ });
275
+
276
+ // Manage OAuth 2.0 Redirect
277
+ //
278
+ var extractCode = function(hash) {
279
+ var match = hash.match(/code=(\w+)/);
280
+ return !!match && match[1];
281
+ };
282
+ var extractToken = function(hash) {
283
+ var match = hash.match(/access_token=(\w+)/);
284
+ return !!match && match[1];
285
+ };
286
+ var extractError = function(hash) {
287
+ var match = hash.match(/error=(\w+)/);
288
+ return !!match && match[1];
289
+ };
290
+
291
+ var code = extractCode(window.location.href);
292
+ if (extractError(window.location.href) == 'access_denied') {
293
+ window.close();
294
+ }
295
+ else if(code) {
296
+ try { window.opener.setCode(code); }
297
+ catch(ex) { }
298
+ window.close();
299
+ }
300
+ else {
301
+ $('.rgw-fb-login-button-iframe').hide();
302
+ $('div.authenticated').show();
303
+
304
+ if ($('[name="readygraph_access_token"]').val()) {
305
+ $('.rgw-fb-login-button-iframe').show();
306
+ $('div.authenticate').hide();
307
+ $('div.authenticating').hide();
308
+ $('div.authenticated').show();
309
+
310
+ $('.email-address').text($('[name="readygraph_email"]').val());
311
+
312
+ window.setup_readygraph($('[name="readygraph_application_id"]').val());
313
+ $('.delay').val($('[name="readygraph_delay"]').val());
314
+ $('.sidebar').val($('[name="readygraph_enable_sidebar"]').val());
315
+ $('.notification').val($('[name="readygraph_enable_notification"]').val());
316
+ $('.selectAll').val($('[name="readygraph_auto_select_all"]').val());
317
+ $('.branding').val($('[name="readygraph_enable_branding"]').val());
318
+ $('.blog_updates').val($('[name="readygraph_send_blog_updates"]').val());
319
+ $('.real_time_post_update').val($('[name="readygraph_send_real_time_post_updates"]').val());
320
+ $('.popup_template').val($('[name="readygraph_popup_template"]').val());
321
+
322
+ //$('[name="readygraph_ad_format"][value="' + $('[name="_readygraph_ad_format"]').val() + '"]').parent().click();
323
+ //$('[name="readygraph_ad_timing"][value="' + $('[name="_readygraph_ad_timing"]').val() + '"]').parent().click();
324
+
325
+ //$('[name="readygraph_ad_delay"]').val($('[name="_readygraph_ad_delay"]').val());
326
+ //$('[name="readygraph_ad_scroll"]').val($('[name="_readygraph_ad_scroll"]').val());
327
+
328
+ $('.result').text('...');
329
+ if ($('[name="readygraph_access_token"]').val()) {
330
+ $.ajax({
331
+ url: resourceHost + '/api/v1/insight_info'
332
+ , beforeSend: function (xhr) {
333
+ xhr.setRequestHeader('Authorization', "Bearer " + $('[name="readygraph_access_token"]').val());
334
+ xhr.setRequestHeader('Accept', "application/json");
335
+ }
336
+ , method: 'POST'
337
+ , success: function (response) {
338
+ if (response.data) {
339
+ $('.result').text(response.data.subscribers + ((response.data.subscribers == 0) ? ' Subscriber' : ' Subscribers'));
340
+ } else {
341
+ $('.result').text('Insight');
342
+ }
343
+ }
344
+ , error: function (response) {
345
+ refresh_access_token();
346
+ }
347
+ });
348
+ }
349
+ }
350
+ }
351
+
352
+ // Manage OAuth 2.0 Results
353
+ //
354
+ function refresh_access_token() {
355
+ var refresh_token = $('[name="readygraph_refresh_token"]').val();
356
+ if (refresh_token) {
357
+ $('div.authenticate').hide();
358
+ $('div.authenticating').show();
359
+ $('div.authenticated').hide();
360
+
361
+ $.ajax({
362
+ url: resourceHost + '/oauth/access_token'
363
+ , data: {
364
+ grant_type: 'refresh_token',
365
+ refresh_token: $('[name="readygraph_refresh_token"]').val(),
366
+ redirect_uri: encodeURIComponent(location.href.replace('#' + location.hash,"")),
367
+ client_id: settings.clientId
368
+ }
369
+ , method: 'POST'
370
+ , success: function (response) {
371
+ $('[name="readygraph_access_token"]').val(response.access_token);
372
+ $('[name="readygraph_refresh_token"]').val(response.refresh_token);
373
+ window.setAccessToken(response.access_token);
374
+ $('.result').text(response.data.subscribers + ((response.data.subscribers == 0) ? ' Subscriber' : ' Subscribers'));
375
+ }
376
+ , error: function (response) {
377
+ alert('We couldn\'t authenticate your account. Please check your internet connection.');
378
+ $('div.authenticate').show();
379
+ $('div.authenticating').hide();
380
+ $('div.authenticated').hide();
381
+ }
382
+ });
383
+ }
384
+ }
385
+ window.setCode = function(code) {
386
+ $('.rgw-fb-login-button-iframe').hide();
387
+ $('div.authenticate').hide();
388
+ $('div.authenticating').show();
389
+ $('div.authenticated').hide();
390
+
391
+ $.ajax({
392
+ url: resourceHost + '/oauth/access_token'
393
+ , data: {
394
+ grant_type: 'authorization_code',
395
+ code: code,
396
+ redirect_uri: encodeURIComponent(location.href.replace('#' + location.hash,"")),
397
+ client_id: settings.clientId
398
+ }
399
+ , method: 'POST'
400
+ , success: function (response) {
401
+ if (response) {
402
+ $('[name="readygraph_access_token"]').val(response.access_token);
403
+ $('[name="readygraph_refresh_token"]').val(response.refresh_token);
404
+ window.setAccessToken(response.access_token);
405
+ } else {
406
+ $('div.authenticating').hide();
407
+ $('div.authenticate').show();
408
+ }
409
+ }
410
+ });
411
+ }
412
+ window.setAccessToken = function(token) {
413
+ $('.rgw-fb-login-button-iframe').hide();
414
+ $('div.authenticate').hide();
415
+ $('div.authenticating').show();
416
+ $('div.authenticated').hide();
417
+
418
+ $.ajax({
419
+ url: resourceHost + '/api/v1/account_info'
420
+ , beforeSend: function (xhr) {
421
+ xhr.setRequestHeader('Authorization', "Bearer " + token);
422
+ xhr.setRequestHeader('Accept', "application/json");
423
+ }
424
+ , method: 'POST'
425
+ , success: function (response) {
426
+ if (response.data) {
427
+ $('[name="readygraph_access_token"]').val(token);
428
+ $('[name="readygraph_email"]').val(response.data.email);
429
+ $('[name="readygraph_application_id"]').val(response.data.application_id);
430
+ $('#myForm')[0].submit();
431
+ } else {
432
+ $('div.authenticating').hide();
433
+ $('div.authenticate').show();
434
+ $('.rgw-fb-login-button-iframe').hide();
435
+ }
436
+ }
437
+ });
438
+ }
439
+ });
440
+ </script>
441
+ <script>
442
+ window.setup = false;
443
+ window.refresh_readygraph = function() {};
444
+ window.setup_readygraph = function(app_id) {
445
+ if (window.setup) {
446
+ window.refresh_readygraph();
447
+ return;
448
+ }
449
+ window.setup = true;
450
+ readygraph.setup({
451
+ applicationId: app_id,
452
+ isPreview: true,
453
+ enableLoginWall: false,
454
+ enableDistraction: false,
455
+ enableAutoLogin: false,
456
+ enableSidebar: false,
457
+ enableNotification: false,
458
+ enableInvite: false,
459
+ enableOpenGraph: false,
460
+ enableRgSeo: false
461
+ });
462
+ readygraph.ready(function() {
463
+ readygraph.framework.require(['compact.sdk', 'facebook.sdk'], function() {
464
+ var $ = readygraph.framework.jQuery;
465
+ $.cookie('RGAuth', null);
466
+ readygraph.framework.facebook.logout(function() {
467
+ readygraph.framework.require(['invite'], function() {
468
+ var VIEW_TYPE = {
469
+ LOADING: 0,
470
+ LOGIN_REQUIRE: 1,
471
+ PERMISSION_REQUIRE: 2,
472
+ DEFAULT: 3,
473
+ LOGIN_WITH_EMAIL: 4,
474
+ SIGNUP_WITH_EMAIL: 5,
475
+ IMPORT_WITH_EMAIL: 6,
476
+ FINISH: 10
477
+ };
478
+
479
+ var auth = new readygraph.framework.ui.AuthModel({
480
+ dialog: true,
481
+ 'inviter_profile_picture': 'https://graph.facebook.com/4/picture?type=normal&width=400&height=400'
482
+ });
483
+ $('.rg-preview-widget').html('');
484
+ $('.rg-preview-widget').append(auth.lightbox.view.$el);
485
+ $('.rgw-content').attr('style', 'position: relative !important;');
486
+
487
+ var view = VIEW_TYPE.LOGIN_REQUIRE;
488
+ auth.on('switch', function() {
489
+ if (auth.view.currentView != view) { auth.view.switchView(view); }
490
+ else auth.view.render();
491
+ if (view == VIEW_TYPE.DEFAULT) {
492
+ auth.view.$el.find('.rgw-invite-view').showAndAnimate();
493
+ auth.view.$el.find('.rgw-follow-view').hideAndAnimate();
494
+ auth.view.$el.commitTransition();
495
+ }
496
+ });
497
+ auth.view.switchView(view);
498
+
499
+ $(window).scroll(function() {
500
+ $(window).trigger('rgw-invalidate');
501
+ });
502
+ $('.rg-preview-widget, .content-warp').scroll(function() {
503
+ $(window).trigger('rgw-invalidate');
504
+ });
505
+ $(window).trigger('rgw-invalidate');
506
+
507
+ $('.rg-vertical-tab').click(function() {
508
+ saveContent(auth, $('.rg-preview-widget-container'), true);
509
+
510
+ $('.rg-vertical-tab').removeClass('active');
511
+ $(this).addClass('active');
512
+ view = VIEW_TYPE[$(this).attr('tab')];
513
+ if (auth.view.currentView != view) { auth.view.switchView(view); }
514
+
515
+ $('.rg-preview-widget, .content-warp').scrollTop(10000);
516
+ });
517
+
518
+ enableContentEditable(auth, $('.rg-preview-widget-container'));
519
+ restoreContent(auth, $('.rg-preview-widget-container'));
520
+
521
+ $('.save').click(function() {
522
+ $('.save').css('opacity', 0.4);
523
+ saveContent(auth, $('.rg-preview-widget-container'), false);
524
+ });
525
+
526
+ window.refresh_readygraph = function() {
527
+ restoreContent(auth, $('.rg-preview-widget-container'));
528
+ }
529
+ });
530
+ });
531
+ });
532
+ });
533
+ }
534
+ function enableContentEditable(model, container) {
535
+ model.view.$el.find('[rgw-data-key]').each(function() {
536
+ var element = $(this);
537
+ if (element.attr('rgw-data-editable') == 'false') return;
538
+
539
+ if (element.attr('editing') != null) return;
540
+ container.find('.special-button-container button').attr('disabled', 'disabled');
541
+ element.text(readygraph.getSettings().get(element.attr('rgw-data-key')));
542
+ element.attr('editing', '1');
543
+ element.css({
544
+ 'border': '2px dashed orange',
545
+ 'position': 'relative',
546
+ 'top': '-2px',
547
+ 'margin-bottom': '-4px',
548
+ 'background-color': '#FAFAC5'
549
+ });
550
+ element.attr('contenteditable', true);
551
+ element.bind('paste', function(e) {
552
+ e.preventDefault();
553
+ });
554
+ element.bind('keydown', function() { $('.save').css('opacity', '1.0'); });
555
+ });
556
+ }
557
+ function saveContent(model, container, fake) {
558
+ var settings = {};
559
+ model.view.$el.find('[rgw-data-key]').each(function() {
560
+ var element = $(this);
561
+ if (element.attr('rgw-data-editable') == 'false') return;
562
+ settings[element.attr('rgw-data-key')] = element.text();
563
+ readygraph.getSettings().set(element.attr('rgw-data-key'), element.text());
564
+ });
565
+ if (!fake) {
566
+ $('input[name="readygraph_settings"]').val(JSON.stringify(settings));
567
+ $('#myForm')[0].submit();
568
+ }
569
+ }
570
+ function restoreContent(model, container) {
571
+ eval('window._TEMP='+$('input[name="readygraph_settings"]').val());
572
+ var settings = window._TEMP;
573
+ if (settings) {
574
+ model.view.$el.find('[rgw-data-key]').each(function() {
575
+ var element = $(this);
576
+ if (element.attr('rgw-data-editable') == 'false') return;
577
+ element.text(settings[element.attr('rgw-data-key')]);
578
+ readygraph.getSettings().set(element.attr('rgw-data-key'), element.text());
579
+ });
580
+ }
581
+ }
582
+ </script>
583
+ <style>
584
+ /* FOR INLINE WIDGET */
585
+ .rgw-overlay {
586
+ display: none !important;
587
+ }
588
+ .rgw-content-frame {
589
+ left: 0 !important;
590
+ top: 0 !important;
591
+ position: relative !important;
592
+ margin: 0 auto !important;
593
+ border: solid 1px #cccccc;
594
+ }
595
+ .rgw-preview-warning {
596
+ display: none !important;
597
+ }
598
+ .rgw-content {
599
+ position: relative !important;
600
+ }
601
+ </style>
extension/readygraph/signup-popup.php CHANGED
@@ -154,7 +154,7 @@ function siteprofile_sync(){
154
  <li>Basic Settings
155
  <ul>
156
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
157
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
158
  </ul>
159
  </li>
160
  </ul>
154
  <li>Basic Settings
155
  <ul>
156
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
157
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
158
  </ul>
159
  </li>
160
  </ul>
extension/readygraph/site-profile.php CHANGED
@@ -134,7 +134,7 @@ $(function(){
134
  <li>Basic Settings
135
  <ul>
136
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
137
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
138
  </ul>
139
  </li>
140
  </ul>
134
  <li>Basic Settings
135
  <ul>
136
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
137
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
138
  </ul>
139
  </li>
140
  </ul>
extension/readygraph/social-feed.php CHANGED
@@ -125,7 +125,7 @@ s2_rrmdir($dir);
125
  <li>Basic Settings
126
  <ul>
127
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
128
- <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li>
129
  </ul>
130
  </li>
131
  </ul>
125
  <li>Basic Settings
126
  <ul>
127
  <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=site-profile">Site Profile</a></li>
128
+ <li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=feature-settings">Feature Settings</a></li><li><a href="<?php $current_url = explode("&", $_SERVER['REQUEST_URI']); echo $current_url[0];?>&ac=monetization-settings">Monetization Settings</a></li>
129
  </ul>
130
  </li>
131
  </ul>
subscribe2.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
- Version: 10.18.5
7
  Author: Matthew Robinson, Tanay Lakhani
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
@@ -55,7 +55,7 @@ if ( is_plugin_active_for_network(plugin_basename(__FILE__)) ) {
55
 
56
  // our version number. Don't touch this or any line below
57
  // unless you know exactly what you are doing
58
- define( 'S2VERSION', '10.18.5' );
59
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
60
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
61
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );
3
  Plugin Name: Subscribe2
4
  Plugin URI: http://subscribe2.wordpress.com
5
  Description: Notifies an email list when new entries are posted.
6
+ Version: 10.19.0
7
  Author: Matthew Robinson, Tanay Lakhani
8
  Author URI: http://subscribe2.wordpress.com
9
  Licence: GPL3
55
 
56
  // our version number. Don't touch this or any line below
57
  // unless you know exactly what you are doing
58
+ define( 'S2VERSION', '10.19.0' );
59
  define( 'S2PATH', trailingslashit(dirname(__FILE__)) );
60
  define( 'S2DIR', trailingslashit(dirname(plugin_basename(__FILE__))) );
61
  define( 'S2URL', plugin_dir_url(dirname(__FILE__)) . S2DIR );