Use of undefined constant user_nicename

I have noticed that this snippet that I have been using since ages…:

<?php the_author_meta( user_nicename ); ?>

Is now returning an error in the PHP logs:

Use of undefined constant user_nicename – assumed ‘user_nicename’

Any idea why? Should I add a check that the variable is defined before echoing it?

Read more here:: Use of undefined constant user_nicename

Leave a Reply

Your email address will not be published. Required fields are marked *