Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function process_tag_removals( $tags, $user_id ) {
- foreach( $tags as $i => $tag ) {
- if( strpos($tag, 'REMOVE_') !== false ) {
- $remove = str_replace('REMOVE_', '', $tag);
- wp_fusion()->user->remove_tags( array( $remove ) );
- unset( $tags[$i] );
- }
- }
- return $tags;
- }
- add_filter( 'wpf_apply_tags', 'process_tag_removals', 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement