Lesser-Known Features in WordPress 4.6
Drew Jaynes has a pretty neat post up about some features you may not have noticed in WordPress 4.6. I have to admit that I’d not been paying super close attentions to everyone’s release notes posts, but this stuff was almost completely new to me. The most significant to me (by far) of Drew’s list is the last:
One code change that really didn’t get a lot of play in feature announcements was that deprecating hooks is now possible in core. Add-on developers may now collectively rejoice!
No core hooks were deprecated in 4.6, but that shouldn’t stop plugin and theme developers from using it right away.
Two new global functions were added,
apply_filters_deprecated(), along with the private helper they both use:
_deprecated_hook(). All in all, deprecating hooks is pretty straightforward…
I had no idea that WordPress core team had plan to make deprecating hooks possible, but I really like the idea of making it easier for people to slowly but deliberately change and modify their code by deprecating hooks and then later removing them entirely. The ability to more smoothly refactor and modify code without leaving people scrambling is almost always a good thing, and so welcome for WordPress!