I'm learning how to develop WP plugins.
I would like to try calling some methods to see what they return. It would be great if I could do so in the console instead of writing tests or log messages.
Is there such a thing as a Wordpress console? That is, I'd like to log in to WP in the terminal and call methods directly.
I'm learning how to develop WP plugins.
I would like to try calling some methods to see what they return. It would be great if I could do so in the console instead of writing tests or log messages.
Is there such a thing as a Wordpress console? That is, I'd like to log in to WP in the terminal and call methods directly.
Share Improve this question asked May 16, 2019 at 21:28 user3574603user3574603 3411 gold badge2 silver badges11 bronze badges 2 |1 Answer
Reset to default -1If you want to see notices/messages in the admin area, try 'Admin Notices' . See https://codex.wordpress/Plugin_API/Action_Reference/admin_notices .
A good tutorial is here: https://www.wpbeginner/wp-tutorials/how-to-add-admin-notices-in-wordpress/.
I recommend setting the 'is_dismissable' class in the HTML of the message you want to display. That will allow you to close/exit the notice.
wp shell
which is what I need. – user3574603 Commented May 16, 2019 at 21:44