This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
grisefest-web/wp-content/plugins/google-analytics-for-wordpress/admin/ajax.php
T
2013-10-01 11:13:22 +02:00

20 lines
486 B
PHP

<?php
function yoast_ga_store_tracking_response() {
if ( !wp_verify_nonce( $_POST['nonce'], 'wpga_activate_tracking' ) )
die();
$options = get_option( 'Yoast_Google_Analytics' );
$options['tracking_popup'] = 'done';
if ( $_POST['allow_tracking'] == 'yes' )
$options['yoast_tracking'] = true;
else
$options['yoast_tracking'] = false;
update_option( 'Yoast_Google_Analytics', $options );
}
add_action( 'wp_ajax_wpga_tracking_data', 'yoast_ga_store_tracking_response' );