Replace an old WP function by a new one