[Resuelto] get_current_screen() is null on CRED edit post screen
This support ticket is created hace 6 años. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.
Having to code around this (see screenshot), I noticed post, post_ID, and post_id all had to be checked. It felt cluttered/inefficient. Maybe could clean that up too, please.
Again, using WP_Screen should make much of this code unnecessary.
Ok Beda contacted me with more information on that. I recognize now the screenshot you shared for the code is not part of Toolset but you wrote that custom code and as per our support policy, we do not entertain any custom programming needs.
Your point could be valid but I checked with one of our Dev and get_current_screen() is just works fine when he try to edit the Toolset form on backend (admin). Dev tested with PHP version 7.2.2 - could you please tell us what PHP version you are using?