daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 56 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  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 );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top