CoreFiles by mySites.guru
get.php32 lines, 1,353 bytes, from wordpress-7.2-beta2.zip
Raw History Compare with 7.2-beta1
md5
133731f771fa9bc2d10eb9099e22e004
sha1
d8b472356d8236c7ec51dbc86890b3419483d304
sha256
04963f672187baa88256a92d9ece1fd55042aa018294bbc2c7826949fa7f2720
<?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>

The same content is in 14 releases, WordPress 7.1 to 7.2-RC2. See them all, or every version of this file.