fix merge conflicts
merge conflict
use WP_Error instead of exception
adds doc blocks and formatting
use var_export and pre tag for visualising array vars