richtabor / MerlinWP

Better WordPress Theme Onboarding
https://merlinwp.com
GNU General Public License v3.0
691 stars 140 forks source link

get_current_page was called incorrectly #203

Open andrejarh opened 2 years ago

andrejarh commented 2 years ago

Upon activating a custom theme with the merlin, I noticed a php notice:

Notice : get_current_page was called incorrectly . Current page retrieval should be called on or after the current_screen hook. Please see Debugging in WordPress for more information.

If I comment out the do_action( 'admin_head' ) in class-merlin.php protected function header(), then the notice is gone. However I do not fully understand the consequences of commenting out this line, so I am not sure if this is a good idea.