PluginProbe
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs / 5.0.1
BlockSpare – Gutenberg Blocks, AI Content Generator & Site Builder for News, Magazine & Blogs v5.0.1
5.0.1 4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 All 39 releases
← All changes | freemius/templates/forms/affiliation.php +17 -16 2.1.2 → 5.0.1 View file →
@@ -12,10 +12,12 @@
12 12
13 13 /**
14 14 * @var array $VARS
15 15 * @var Freemius $fs
16 + * @var string $plugin_title
16 17 */
17 - $fs = freemius( $VARS['id'] );
18 + $fs = freemius( $VARS['id'] );
19 + $plugin_title = $VARS['plugin_title'];
18 20
19 21 $slug = $fs->get_slug();
20 22
21 23 $user = $fs->get_user();
@@ -21,9 +23,8 @@
21 23 $user = $fs->get_user();
22 24 $affiliate = $fs->get_affiliate();
23 25 $affiliate_terms = $fs->get_affiliate_terms();
24 26
25 - $plugin_title = $fs->get_plugin_title();
26 27 $module_type = $fs->is_plugin() ?
27 28 WP_FS__MODULE_TYPE_PLUGIN :
28 29 WP_FS__MODULE_TYPE_THEME;
29 30
@@ -44,9 +45,9 @@
44 45 $promotion_method_social_media = false;
45 46 $promotion_method_mobile_apps = false;
46 47 $statistics_information = false;
47 48 $promotion_method_description = false;
48 - $members_dashboard_login_url = 'https://members.freemius.com/login/';
49 + $members_dashboard_login_url = 'https://users.freemius.com/login';
49 50
50 51 $affiliate_application_data = $fs->get_affiliate_application_data();
51 52
52 53 if ( $is_affiliate && $affiliate->is_pending() ) {
@@ -67,12 +68,15 @@
67 68 $promotion_method_social_media = in_array( 'social_media', $promotion_methods );
68 69 $promotion_method_mobile_apps = in_array( 'mobile_apps', $promotion_methods );
69 70 }
70 71 } else {
71 - $current_user = Freemius::_get_current_wp_user();
72 - $full_name = trim( $current_user->user_firstname . ' ' . $current_user->user_lastname );
73 - $email_address = $current_user->user_email;
74 - $domain = fs_strip_url_protocol( get_site_url() );
72 + if ( ! is_object( $user ) ) {
73 + $current_user = Freemius::_get_current_wp_user();
74 + $full_name = trim( $current_user->user_firstname . ' ' . $current_user->user_lastname );
75 + $email_address = $current_user->user_email;
76 + }
77 +
78 + $domain = Freemius::get_unfiltered_site_url( null, true );
75 79 }
76 80
77 81 $affiliate_tracking = 30;
78 82
@@ -85,8 +89,10 @@
85 89 $apply_to_become_affiliate_text = fs_text_inline( 'Apply to become an affiliate', 'apply-to-become-an-affiliate', $slug );
86 90
87 91 $module_id = $fs->get_id();
88 92 $affiliate_program_terms_url = "https://freemius.com/plugin/{$module_id}/{$slug}/legal/affiliate-program/";
93 +
94 + $has_tabs = $fs->_add_tabs_before_content();
89 95 ?>
90 96 <div id="fs_affiliation_content_wrapper" class="wrap">
91 97 <form method="post" action="">
92 98 <div id="poststuff">
@@ -364,9 +370,9 @@
364 370 affiliate.promotion_methods = promotionMethods.join(',');
365 371 }
366 372
367 373 $.ajax({
368 - url : ajaxurl,
374 + url : <?php echo Freemius::ajax_url() ?>,
369 375 method : 'POST',
370 376 data : {
371 377 action : '<?php echo $fs->get_ajax_action( 'submit_affiliate_application' ) ?>',
372 378 security : '<?php echo $fs->get_ajax_security( 'submit_affiliate_application' ) ?>',
@@ -498,12 +504,7 @@
498 504 });
499 505 </script>
500 506 </div>
501 507 <?php
502 - $params = array(
503 - 'page' => 'affiliation',
504 - 'module_id' => $module_id,
505 - 'module_slug' => $slug,
506 - 'module_version' => $fs->get_plugin_version(),
507 - );
508 - fs_require_template( 'powered-by.php', $params );
509 -?>
508 + if ( $has_tabs ) {
509 + $fs->_add_tabs_after_content();
510 + }