shane.blog A WordPress Blog

Tagbash

Loop through an array

L

Today I needed to loop through the output of a command on the WP CLI. The most simple way I could think to do that was to save the output of the command into an array and loop through it. What I did was use wp site list to get the subsites on a WordPress Multisite. I needed to pass each of those sites as an argument to a command and give it some time in between each execution since it was going...

shane.blog A WordPress Blog