Added generic function for wp-cli