WordPress WP_Error Class: Create, Check, Merge, and Return Structured Er ...
WP_Error: return errors the WordPress way A function that returns false on failure tells the caller that something went wrong, but not what. WordPress has its own error object for this, WP_Error: it carries an error code, a message and optional data, and it can hold several errors at once. Core functions such as wp_insert_post(),…
Details