Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
My script accesses an api to populate posts. I can add any errors to the WP_Error class, but can I add success messages to a global variable?
you could test for the absence of an error and then display a success message
if(!is_wp_error( $thing )) echo "yay!!";
! is_wp_error( $foo ) and print 'win!';
Required, but never shown