replacing deprecated wp calls