Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function um_custom_disable_redirect( $post_ID, $post_after, $post_before ) {
- $post_obj = get_post( $post_ID );
- if ( isset( $post_obj->post_type ) && 'um_activity' == $post_obj->post_type ) {
- add_filter( 'wpseo_premium_post_redirect_slug_change', function( $bool ) {
- return true;
- }, 10, 1 );
- }
- }
- add_action( 'post_updated', 'um_custom_disable_redirect', 10, 3 );
Add Comment
Please, Sign In to add comment