CSS for Resizing Video
Just a handy chunk of CSS to make your video embeds behave better. It’s out there but not a bad thing to spread farther.
You’ve got a scenario where someone is signing up to multisite via Gravity Forms’ user registration plugin. The following function will automatically add them to as many additional sites as you’d like.
I looked around for a WordPress plugin that would delete content every X hours and didn’t find anything. It may be this is a strange desire or I could be bad at searching but in any case I built something to do that. The idea I had was that people in a multisite environment could try out sites and get a good feel for how the plugin/theme would work but without the barrier of adding it to their site or creating an entirely new site. The plugin also creates a page that has the shortcode on it which will trigger the cleansing manually. AssumptionsAcknowledged laziness. I assume we’re going to delete all the content that wasn’t created by the admin. That lets us leave some directions and some demo content if needed that will persist after the site is purged of content. I figured we’d auto-add people using the Join My Multisite plugin and setting the user to editor or lower. It might make more sense to create a custom role and/or restrict the ability to maliciously or accidentally change the author of content. I used wp_schedule_event and set the refresh at every 24hrs. I am only deleting pages, posts, and media. I haven’t gotten around to finding/deleting custom post types.
There are a bunch of these out there but the ones I knew of didn’t quite do what was needed by the Focused Inquiry faculty involved in this project. They wanted a couple things to be possible. The ability to link to specific elements via URL and have them expand. The URL to those elements to remain consistent even if the order of the elements was changed. An “email this URL” link to enable faculty to send the URL to students Plus/Minus indicators based on expanded/collapsed. Most shortcode plugins I’ve seen either don’t have an ID for the collapse element or make it sequential (which changes if you shift the order). Neither works well for a URL that needs to be consistent. I’ve never seen one to do the email element. In my head, I made this way harder than it needed to be. It ends up being just two shortcodes- one for the collapsible container and one for the item-level elements. I found this Bootstrap snippet that did most of the functional Bootstrap stuff that I needed. I found a script to let me expand elements via URL parameters. I reminded myself what a freaking mailto link structure looked like. Now I just had to figure out what variables needed to be set in the shortcode and how the […]