forked from LiveCarta/LiveCartaWP
LAW-5676
This commit is contained in:
@@ -363,4 +363,19 @@ function mark_redirected_user(){
|
||||
setcookie('law_'.LAWCARTA_ENVIRONMENT_NAME, 1,0,"/", $cookieDomain);
|
||||
}
|
||||
}
|
||||
add_action( "template_redirect", "mark_redirected_user" );
|
||||
add_action( "template_redirect", "mark_redirected_user" );
|
||||
|
||||
function old_post_url_redirect(){
|
||||
global $wp;
|
||||
$parts = explode('/',$wp->request);
|
||||
if(
|
||||
$parts
|
||||
&& count($parts) == 4
|
||||
&& is_numeric($parts[0])
|
||||
&& is_numeric($parts[1])
|
||||
&& is_numeric($parts[2])
|
||||
){
|
||||
wp_redirect( home_url( $parts[3] ), 301 );
|
||||
}
|
||||
}
|
||||
add_action( "template_redirect", "old_post_url_redirect" );
|
||||
Reference in New Issue
Block a user