Conditions for admin get_current_screen action parent_file edit.php?post_type=page
You can use get_current_screen() to get details about the current screen. We want to hook on or after load-edit.php because get_current_screen() is defined just prior to this hook. By hooking into load-edit.php, we guarantee that this code will only fire on the edit.php page. Then we check the current screen to see if the post … Read more