Flushing Rewrite Rules on All Sites in a Multisite Network

TL;DR: Loop through all sites and delete_option( 'rewrite_rules' ). Don’t call flush_rewrite_rules(). Full example. Every once in awhile I’ll run into a situation where something will break permalinks on all the sites in a WordPress Multisite network, like a plugin network-activation gone wrong. On a single site, it’s easy enough to fix by manually visiting Settings > […]

Continue reading...

Designing Object-Oriented Plugins for a Procedural Application

Note: This was originally a post to the Seattle PHP Meetup mailing list, but I’m reproducing it here to generate a discussion about the topic with people outside the meetup. * * * * I write a lot plugins for WordPress, and I like to make them object-oriented, even though WordPress itself is mostly procedural. […]

Continue reading...