How to get custom page template being edited in gutenberg editor


I want to know custom page template name (the one chosen in page attributes – template) in PHP, before page opens in order to enqueue additional scripts according to chosen template.
I know how to get this information in javascript admin frontend part, however it would be more convenient if I could get it in PHP.

, , , , Lovor 2 years 2020-09-04T05:10:36-05:00 0 Answers 55 views 0

Leave an answer