Skip to content

Instantly share code, notes, and snippets.

@jdevalk
Created April 22, 2015 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdevalk/ca4fefd3a3122e86ce49 to your computer and use it in GitHub Desktop.
Save jdevalk/ca4fefd3a3122e86ce49 to your computer and use it in GitHub Desktop.
This gist allows you to prevent the redirect to the about page, the intro tour from showing up and the tracking popup from ever showing.
<?php
/**
* Filter the contents of the WP SEO option
*
* @param array $option The WP SEO main option values
*
* @return array
*/
function filter_yst_wpseo_option( $option ) {
$option['seen_about'] = true; // Prevent redirects to the about page
$option['ignore_tour'] = true; // Prevent showing the tour popup
$option['tracking_popup_done'] = true; // Prevent showing the tracking popup
$option['allow_tracking'] = true; // Allows our anonymous usage tracking, we'd appreciate this :)
return $option;
}
add_filter( 'option_wpseo', 'filter_yst_wpseo_option' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment