Password Protect Posts Created via Gravity Forms
A quick little plugin that sets the password for posts created via Gravity Forms. This came about as the result of a faculty request today. In this case it’ll grab the first form field and use that for the password. You could hardcode it into the plugin itself but I thought this gave a bit more flexibility. With this option you can make that field something that the user could set or you can make it hidden and set it consistently for all submissions.
Simple but maybe handy for someone else.
This may be one of those things that everyone knows but it was new to me. I’m also duplicating the information I found in the StackOverflow post because I think it’s good to have information in multiple places where it might be found by other people. Additionally, writing the post makes it easy for me to find later when I forget and the act of writing the post helps get it stuck in my own head. With all of that as the lead up . . . A common way to trigger events in WordPress is the save_post action. It runs any time the post is created, published, or updated. What I found out though was that it also runs when you try to delete the post. That makes sense. It is an update and it’s no big deal if the function is relatively small and/or if you’re not trying to get rid of a ton of posts. My current experiment had both a fairly involved function and a couple hundred posts I wanted deleted. Luckily, I found this post on StackOverflow. Now I can set a simple check at the beginning of the function that looks to make sure it’s the right post type (site) and it’s a trashed post. In either of those cases the function gets skipped.
We have a bunch of world language professors prying at the edges of Pressbooks. One of the requests yesterday was to be able to create a mini-dictionary of target language words at the beginning of sections written in that target language. Mousing over the words would show their English equivalent. The intent is to have ready assistance for those who need it so that writing in the target language can happen earlier in the course. ACF came to mind pretty quickly for this case. I really just needed the ability to generate two values that are paired together- the target language word and the English definition. I need to be able to make as many of these pairs as the person wants to put in there. That’s custom made for the ACF repeater field. Now that I had an easy way for people to add the words, I just needed a way to do the tooltip display. There are 12,000 ways to do this but I just looked around for one that bragged on its accessibility. I found this example on codepen and went with it. This bit of php builds that content. Now that we have the the content and way to handle the tooltip piece, I needed to stick it at the top of the posts. That’s just […]
This WordPress tutorial is aimed at teachers (or anyone else) who is just starting out with some server space and Fantastico support. It covers a lot of the basic installation questions and gets into how to add themes and plugins to the blog. Most everything is done in video format. I made it for our ITRTs who are mainly using LunarPages for their server space. It also covers the basic blog usage questions regarding activating plugins, changing themes and doing all the other normal stuff. We also get into some of the settings we use to make sure comments are moderated etc. There are also some tutorial on what plugins etc. I used to create different projects (like the Byrd Books audio blog) It’s a solid intro into the world of assisted WordPress installation and administration.