Guest User

Untitled

a guest
Jun 14th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. function um_custom_disable_redirect( $post_ID, $post_after, $post_before ) {
  2. $post_obj = get_post( $post_ID );
  3.  
  4. if ( isset( $post_obj->post_type ) && 'um_activity' == $post_obj->post_type ) {
  5. add_filter( 'wpseo_premium_post_redirect_slug_change', function( $bool ) {
  6. return true;
  7. }, 10, 1 );
  8. }
  9. }
  10. add_action( 'post_updated', 'um_custom_disable_redirect', 10, 3 );
Add Comment
Please, Sign In to add comment