Pristine upstream, unpacked from the official wordpress.org tarball. https://wordpress.org/wordpress-7.1.1.tar.gz sha1 2a9d68474e8703aa3a66f80427b325e0941b6a1e (published by wordpress.org) sha256 3996fee13448ef12e07e9f0c77db2f655ffa1b7cde71c80a4965d3bf1fb956b3 This branch carries nothing but upstream releases, one commit each, and is never edited. It is the other side of the git-subtree merge that brings security releases into SiriusPress/wordpress/ — see SiriusPress/docs/upstream-merges.md.
32 lines
1.3 KiB
PHP
32 lines
1.3 KiB
PHP
<?php
|
|
|
|
//phpcs:disable VariableAnalysis
|
|
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
|
|
|
|
$submit_classes_attr = 'akismet-button';
|
|
|
|
if ( isset( $classes ) && ( is_countable( $classes ) ? count( $classes ) : 0 ) > 0 ) {
|
|
$submit_classes_attr = implode( ' ', $classes );
|
|
}
|
|
|
|
$query_args = array(
|
|
'passback_url' => Akismet_Admin::get_page_url(),
|
|
'redirect' => isset( $redirect ) ? $redirect : 'plugin-signup',
|
|
);
|
|
|
|
// Set default UTM parameters, overriding with any provided values.
|
|
$utm_args = array(
|
|
'utm_source' => isset( $utm_source ) ? $utm_source : 'akismet_plugin',
|
|
'utm_medium' => isset( $utm_medium ) ? $utm_medium : 'in_plugin',
|
|
'utm_campaign' => isset( $utm_campaign ) ? $utm_campaign : 'plugin_static_link',
|
|
'utm_content' => isset( $utm_content ) ? $utm_content : 'get_view_link',
|
|
);
|
|
|
|
$query_args = array_merge( $query_args, $utm_args );
|
|
|
|
$url = add_query_arg( $query_args, 'https://akismet.com/get/' );
|
|
?>
|
|
<a href="<?php echo esc_url( $url ); ?>" class="<?php echo esc_attr( $submit_classes_attr ); ?>" target="_blank" rel="noopener">
|
|
<?php echo esc_html( is_string( $text ) ? $text : '' ); ?>
|
|
<?php echo Akismet::get_new_tab_screen_reader_html(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Returns markup escaped in the helper. ?>
|
|
</a>
|