| @@ -46,26 +46,11 @@ | ||
| 46 | 46 | if ( false !== $protocol_pos ) { |
| 47 | 47 | $site_url = substr( $site_url, $protocol_pos + 3 ); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - $freemius_site_www = 'https://freemius.com'; | |
| 51 | - | |
| 52 | 50 | $freemius_usage_tracking_url = $fs->get_usage_tracking_terms_url(); |
| 53 | 51 | $freemius_plugin_terms_url = $fs->get_eula_url(); |
| 54 | 52 | |
| 55 | - $freemius_site_url = $fs->is_premium() ? | |
| 56 | - $freemius_site_www : | |
| 57 | - $freemius_usage_tracking_url; | |
| 58 | - | |
| 59 | - if ( $fs->is_premium() ) { | |
| 60 | - $freemius_site_url .= '?' . http_build_query( array( | |
| 61 | - 'id' => $fs->get_id(), | |
| 62 | - 'slug' => $slug, | |
| 63 | - ) ); | |
| 64 | - } | |
| 65 | - | |
| 66 | - $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" rel="noopener" tabindex="1">freemius.com</a>'; | |
| 67 | - | |
| 68 | 53 | $error = fs_request_get( 'error' ); |
| 69 | 54 | |
| 70 | 55 | $has_release_on_freemius = $fs->has_release_on_freemius(); |
| 71 | 56 | |
| @@ -75,8 +60,14 @@ | ||
| 75 | 60 | ( $is_premium_code || ! $has_release_on_freemius ) && |
| 76 | 61 | fs_request_get_bool( 'require_license', ( $is_premium_code || $has_release_on_freemius ) ) |
| 77 | 62 | ); |
| 78 | 63 | |
| 64 | + $freemius_activation_terms_url = ($fs->is_premium() && $require_license_key) ? | |
| 65 | + $fs->get_license_activation_terms_url() : | |
| 66 | + $freemius_usage_tracking_url; | |
| 67 | + | |
| 68 | + $freemius_activation_terms_html = '<a href="' . esc_url( $freemius_activation_terms_url ) . '" target="_blank" rel="noopener" tabindex="1">freemius.com</a>'; | |
| 69 | + | |
| 79 | 70 | if ( $is_pending_activation ) { |
| 80 | 71 | $require_license_key = false; |
| 81 | 72 | } |
| 82 | 73 | |
| @@ -264,15 +255,15 @@ | ||
| 264 | 255 | $default_optin_message, |
| 265 | 256 | '<b>' . esc_html( $fs->get_plugin_name() ) . '</b>', |
| 266 | 257 | '<b>' . $current_user->user_login . '</b>', |
| 267 | 258 | '<a href="' . $site_url . '" target="_blank" rel="noopener noreferrer">' . $site_url . '</a>', |
| 268 | - $freemius_link | |
| 259 | + $freemius_activation_terms_html | |
| 269 | 260 | ), |
| 270 | 261 | $first_name, |
| 271 | 262 | $fs->get_plugin_name(), |
| 272 | 263 | $current_user->user_login, |
| 273 | 264 | '<a href="' . $site_url . '" target="_blank" rel="noopener noreferrer">' . $site_url . '</a>', |
| 274 | - $freemius_link, | |
| 265 | + $freemius_activation_terms_html, | |
| 275 | 266 | true |
| 276 | 267 | ); |
| 277 | 268 | } |
| 278 | 269 | |
| @@ -373,10 +364,10 @@ | ||
| 373 | 364 | <?php endif ?> |
| 374 | 365 | <?php if ( $activate_with_current_user ) : ?> |
| 375 | 366 | <form action="" method="POST"> |
| 376 | 367 | <input type="hidden" name="fs_action" |
| 377 | - value="<?php echo $fs->get_unique_affix() ?>_activate_existing"> | |
| 378 | - <?php wp_nonce_field( 'activate_existing_' . $fs->get_public_key() ) ?> | |
| 368 | + value="<?php echo esc_attr( $fs->get_unique_affix() . '_activate_existing' ) ?>"> | |
| 369 | + <?php wp_nonce_field( $fs->get_unique_affix() . '_activate_existing' ) ?> | |
| 379 | 370 | <input type="hidden" name="is_extensions_tracking_allowed" value="1"> |
| 380 | 371 | <input type="hidden" name="is_diagnostic_tracking_allowed" value="1"> |
| 381 | 372 | <button class="button button-primary" tabindex="1" |
| 382 | 373 | type="submit"><?php echo esc_html( $button_label ) ?></button> |
| @@ -384,9 +375,9 @@ | ||
| 384 | 375 | <?php else : ?> |
| 385 | 376 | <form method="post" action="<?php echo WP_FS__ADDRESS ?>/action/service/user/install/"> |
| 386 | 377 | <?php unset( $optin_params['sites']); ?> |
| 387 | 378 | <?php foreach ( $optin_params as $name => $value ) : ?> |
| 388 | - <input type="hidden" name="<?php echo $name ?>" value="<?php echo esc_attr( $value ) ?>"> | |
| 379 | + <input type="hidden" name="<?php echo esc_attr( $name ) ?>" value="<?php echo esc_attr( $value ) ?>"> | |
| 389 | 380 | <?php endforeach ?> |
| 390 | 381 | <input type="hidden" name="is_extensions_tracking_allowed" value="1"> |
| 391 | 382 | <input type="hidden" name="is_diagnostic_tracking_allowed" value="1"> |
| 392 | 383 | <button class="button button-primary" tabindex="1" |
| @@ -395,9 +386,11 @@ | ||
| 395 | 386 | } ?>><?php echo esc_html( $button_label ) ?></button> |
| 396 | 387 | </form> |
| 397 | 388 | <?php endif ?> |
| 398 | 389 | <?php if ( $require_license_key ) : ?> |
| 399 | - <a id="license_issues_link" href="<?php echo $fs->apply_filters( 'known_license_issues_url', 'https://freemius.com/help/documentation/wordpress-sdk/license-activation-issues/' ) ?>" target="_blank"><?php fs_esc_html_echo_inline( 'License issues?', 'license-issues', $slug ) ?></a> | |
| 390 | + <a id="license_issues_link" | |
| 391 | + href="<?php echo esc_url( $fs->apply_filters( 'known_license_issues_url', 'https://freemius.com/help/documentation/wordpress-sdk/license-activation-issues/' ) ) ?>" | |
| 392 | + target="_blank"><?php fs_esc_html_echo_inline( 'License issues?', 'license-issues', $slug ) ?></a> | |
| 400 | 393 | <?php endif ?> |
| 401 | 394 | |
| 402 | 395 | <?php $fs->do_action( 'connect/after_actions', $activation_state ) ?> |
| 403 | 396 | </div><?php |
| @@ -420,14 +413,14 @@ | ||
| 420 | 413 | <div class="fs-permissions"> |
| 421 | 414 | <?php if ( $require_license_key ) : ?> |
| 422 | 415 | <a class="fs-trigger wp-core-ui" href="#" tabindex="1" style="color: inherit;"><?php echo sprintf( |
| 423 | 416 | fs_esc_html_inline( 'For delivery of security & feature updates, and license management, %s needs to', 'license-sync-disclaimer', $slug ) . '<b class="fs-arrow"></b>', |
| 424 | - sprintf( '<nobr class="button-link" style="color: inherit;">%s</nobr>', $fs->get_plugin_title() ) | |
| 417 | + sprintf( '<nobr class="button-link" style="color: inherit;">%s</nobr>', esc_html( $fs->get_plugin_title() ) ) | |
| 425 | 418 | ) ?></a> |
| 426 | 419 | <?php else : ?> |
| 427 | 420 | <a class="fs-trigger wp-core-ui" href="#" tabindex="1" style="color: inherit;"><?php printf( |
| 428 | 421 | fs_esc_html_inline( 'This will allow %s to', 'this-will-allow-x', $slug ) . '<b class="fs-arrow"></b>', |
| 429 | - sprintf( '<nobr class="button-link" style="color: inherit;">%s</nobr>', $fs->get_plugin_title() ) | |
| 422 | + sprintf( '<nobr class="button-link" style="color: inherit;">%s</nobr>', esc_html( $fs->get_plugin_title() ) ) | |
| 430 | 423 | ) ?></a> |
| 431 | 424 | <?php endif ?> |
| 432 | 425 | <ul><?php |
| 433 | 426 | foreach ( $permissions as $permission ) { |
| @@ -450,14 +443,18 @@ | ||
| 450 | 443 | </div> |
| 451 | 444 | <?php endif ?> |
| 452 | 445 | </div> |
| 453 | 446 | <div class="fs-terms"> |
| 454 | - <a class="fs-tooltip-trigger<?php echo is_rtl() ? ' rtl' : '' ?>" href="<?php echo $freemius_site_url ?>" target="_blank" rel="noopener" tabindex="1">Powered by Freemius<?php if ( $require_license_key ) : ?> <span class="fs-tooltip" style="width: 170px"><?php echo $fs->get_text_inline( 'Freemius is our licensing and software updates engine', 'permissions-extensions_desc' ) ?></span><?php endif ?></a> | |
| 447 | + <a class="fs-tooltip-trigger<?php echo is_rtl() ? ' rtl' : '' ?>" href="<?php echo esc_url( $freemius_activation_terms_url ) ?>" target="_blank" rel="noopener" tabindex="1">Powered by Freemius<?php if ( $require_license_key ) : ?> <span class="fs-tooltip" style="width: 170px"><?php echo esc_html( $fs->get_text_inline( 'Freemius is our licensing and software updates engine', 'permissions-extensions_desc' ) ) ?></span><?php endif ?></a> | |
| 455 | 448 | - |
| 456 | 449 | <a href="https://freemius.com/privacy/" target="_blank" rel="noopener" |
| 457 | 450 | tabindex="1"><?php fs_esc_html_echo_inline( 'Privacy Policy', 'privacy-policy', $slug ) ?></a> |
| 458 | 451 | - |
| 459 | - <a href="<?php echo $require_license_key ? $freemius_plugin_terms_url : $freemius_usage_tracking_url ?>" target="_blank" rel="noopener" tabindex="1"><?php $require_license_key ? fs_echo_inline( 'License Agreement', 'license-agreement', $slug ) : fs_echo_inline( 'Terms of Service', 'tos', $slug ) ?></a> | |
| 452 | + <?php if ($require_license_key) : ?> | |
| 453 | + <a href="<?php echo esc_url( $freemius_plugin_terms_url ) ?>" target="_blank" rel="noopener" tabindex="1"><?php fs_echo_inline( 'License Agreement', 'license-agreement', $slug ) ?></a> | |
| 454 | + <?php else : ?> | |
| 455 | + <a href="<?php echo esc_url( $freemius_usage_tracking_url ) ?>" target="_blank" rel="noopener" tabindex="1"><?php fs_echo_inline( 'Terms of Service', 'tos', $slug ) ?></a> | |
| 456 | + <?php endif; ?> | |
| 460 | 457 | </div> |
| 461 | 458 | </div> |
| 462 | 459 | <?php |
| 463 | 460 | /** |