Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/class-tiny-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,10 @@ public function get_api_key_pending_notice() {

public function add_limit_reached_notice( $email ) {
$encoded_email = str_replace( '%20', '%2B', rawurlencode( $email ) );
$url = 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . $encoded_email;
$link = '<a href="' . $url . '" target="_blank">' .
$url = 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . $encoded_email .
'&utm_source=wordpress-plugin&utm_medium=referral' .
'&utm_campaign=upgrade&utm_content=limit-reached-notice';
$link = '<a href="' . esc_url( $url ) . '" target="_blank">' .
esc_html__( 'TinyPNG API account', 'tiny-compress-images' ) . '</a>';

$this->add(
Expand Down
4 changes: 2 additions & 2 deletions src/views/account-status-connected.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<p class="introduction">
<?php
$link = sprintf(
'<a href="https://tinypng.com/dashboard/api" target="_blank">%s</a>',
'<a href="https://tinypng.com/dashboard/api?utm_source=wordpress-plugin&utm_medium=referral&utm_campaign=api-key&utm_content=settings-account" target="_blank">%s</a>',
esc_html__( 'API dashboard', 'tiny-compress-images' )
);
printf(
Expand Down Expand Up @@ -136,7 +136,7 @@
<div class="button-container">
<div class="box">
<?php $encoded_email = str_replace( '%20', '%2B', rawurlencode( self::get_email_address() ) ); ?>
<a href="<?php echo esc_url( 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . $encoded_email ); ?>" target="_blank" class="button button-primary upgrade-account">
<a href="<?php echo esc_url( 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . $encoded_email . '&utm_source=wordpress-plugin&utm_medium=referral&utm_campaign=upgrade&utm_content=settings-account' ); ?>" target="_blank" class="button button-primary upgrade-account">
<?php esc_html_e( 'Upgrade account', 'tiny-compress-images' ); ?>
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/account-status-create-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<p class="introduction">
<?php
$link = sprintf(
'<a href="https://tinypng.com/dashboard/api" target="_blank">%s</a>',
'<a href="https://tinypng.com/dashboard/api?utm_source=wordpress-plugin&utm_medium=referral&utm_campaign=api-key&utm_content=settings-account" target="_blank">%s</a>',
esc_html__( 'API dashboard', 'tiny-compress-images' )
);
echo wp_kses_post(
Expand Down
2 changes: 1 addition & 1 deletion src/views/bulk-optimization-upgrade-notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</p>
</div>
<?php $encoded_email = str_replace( '%20', '%2B', rawurlencode( $email_address ) ); ?>
<a href="<?php echo esc_url( 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . $encoded_email ); ?>" target="_blank" class="button button-primary button-hero upgrade-account">
<a href="<?php echo esc_url( 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . $encoded_email . '&utm_source=wordpress-plugin&utm_medium=referral&utm_campaign=upgrade&utm_content=bulk-optimization-notice' ); ?>" target="_blank" class="button button-primary button-hero upgrade-account">
<?php esc_html_e( 'Upgrade account', 'tiny-compress-images' ); ?>
</a>
<?php if ( $remaining_credits > 0 ) { ?>
Expand Down
2 changes: 1 addition & 1 deletion src/views/bulk-optimization.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
),
(int) Tiny_Config::MONTHLY_FREE_COMPRESSIONS,
esc_html__( 'image sizes', 'tiny-compress-images' ),
'<a target="_blank" href="' . esc_url( 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . str_replace( '%20', '%2B', rawurlencode( $email_address ) ) ) . '">' . esc_html__( ' upgrade here', 'tiny-compress-images' ) . '</a>'
'<a target="_blank" href="' . esc_url( 'https://tinypng.com/dashboard/api?type=upgrade&mail=' . str_replace( '%20', '%2B', rawurlencode( $email_address ) ) . '&utm_source=wordpress-plugin&utm_medium=referral&utm_campaign=upgrade&utm_content=bulk-optimization' ) . '">' . esc_html__( ' upgrade here', 'tiny-compress-images' ) . '</a>'
);
?>
</p>
Expand Down
Loading