forked from LiveCarta/LiveCartaWP
LAW-5676
This commit is contained in:
@@ -364,3 +364,18 @@ function mark_redirected_user(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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