Advertisements

redirect_old_akismet_urls

Definition:
function redirect_old_akismet_urls( ) {}

Source code

function redirect_old_akismet_urls( ) {

	global $wp_db_version;

	$script_name = array_pop( split( '/', $_SERVER['PHP_SELF'] ) );



	$page = '';

	if ( !empty( $_GET['page'] ) )

		$page = $_GET['page'];



	// 2.7 redirect for people who might have bookmarked the old page

	if ( 8204 < $wp_db_version && ( 'edit-comments.php' == $script_name || 'edit.php' == $script_name ) && 'akismet-admin' == $page ) {

		$new_url = esc_url( 'edit-comments.php?comment_status=spam' );

		wp_redirect( $new_url, 301 );

		exit;

	}

}

2643

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: