[ref] Move WordPress constant definitions to local scope