activate.php
7 months ago
compatible-plugins.php
2 months ago
config.php
1 month ago
connect-jp.php
7 months ago
enter.php
2 years ago
footer.php
1 month ago
get.php
7 months ago
logo.php
2 years ago
notice.php
3 months ago
predefined.php
2 months ago
setup-jetpack.php
7 months ago
setup.php
7 months ago
start.php
1 month ago
stats.php
1 month ago
get.php
33 lines
| 1 | <?php |
| 2 | |
| 3 | //phpcs:disable VariableAnalysis |
| 4 | // There are "undefined" variables here because they're defined in the code that includes this file as a template. |
| 5 | |
| 6 | $submit_classes_attr = 'akismet-button'; |
| 7 | |
| 8 | if ( isset( $classes ) && ( is_countable( $classes ) ? count( $classes ) : 0 ) > 0 ) { |
| 9 | $submit_classes_attr = implode( ' ', $classes ); |
| 10 | } |
| 11 | |
| 12 | $query_args = array( |
| 13 | 'passback_url' => Akismet_Admin::get_page_url(), |
| 14 | 'redirect' => isset( $redirect ) ? $redirect : 'plugin-signup', |
| 15 | ); |
| 16 | |
| 17 | // Set default UTM parameters, overriding with any provided values. |
| 18 | $utm_args = array( |
| 19 | 'utm_source' => isset( $utm_source ) ? $utm_source : 'akismet_plugin', |
| 20 | 'utm_medium' => isset( $utm_medium ) ? $utm_medium : 'in_plugin', |
| 21 | 'utm_campaign' => isset( $utm_campaign ) ? $utm_campaign : 'plugin_static_link', |
| 22 | 'utm_content' => isset( $utm_content ) ? $utm_content : 'get_view_link', |
| 23 | ); |
| 24 | |
| 25 | $query_args = array_merge( $query_args, $utm_args ); |
| 26 | |
| 27 | $url = add_query_arg( $query_args, 'https://akismet.com/get/' ); |
| 28 | ?> |
| 29 | <a href="<?php echo esc_url( $url ); ?>" class="<?php echo esc_attr( $submit_classes_attr ); ?>" target="_blank"> |
| 30 | <?php echo esc_html( is_string( $text ) ? $text : '' ); ?> |
| 31 | <span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'akismet' ); ?></span> |
| 32 | </a> |
| 33 |