In responding to some data requests, I delved into the WP tables to pull some rampages data.
All users ever . . .
I need to set up something more automated but for this I dumped the MySQL tables as CSVs and then just imported them to Google Sheets. With very minimal functions, I got this data.
This happened with one of our individual installs and it’s happened before (but I forgot the solution) so I’m writing it down. After the upgrade to 4.7.1, the front of the sight still worked but attempts to get to wp-admin failed with a 500 error and the URL was redirecting to something with upgrade.php? in the URL. Solution Change the name of the plugin folder (I just prepend an underscore). Revisit your login URL. Run the database upgrade as prompted. You should now be in the admin zone. Fix your plugin folder name. Easy but also easy to forget.
Towards the end of the day I was asked for an easy way for students and others to do “properly-formatted (hanging indent) citations.” As I use URLs for citation I had never thought of this. A little googling and it seems to be a common issue for people and I eventually hit this old vintageYouTube defines vintage as anything over a year old. video from Clint Lalonde (who I recognized immediately from his Twitter avatar). After seeing one jerk’s comment I felt a great need to make something even sort-of-good come from Clint’s effort to share something good with the world. Behold. The simplest possible WordPress shortcode plugin (SPWPSP – if you’re playing at home). And while it’s no SPLOT, it is very, very simple and it gives you the magical hanging indent. Just write [hangit]”None to Claim Their Bones: Relics of an Old Brooklyn Graveyard.” New York Times 8 Apr. 1888: 3-4. ProQuest Newspapers. Web. 10 June 2006.[/hangit] and you’ll get a nice hanging indent. I did have to change the shortcode to an enclosing shortcode (one that opens and close- like an HTML tag) to deal with quotes and apostrophes that are likely to show up in the citations. This is all it takes. Get it on Github here.
When you use Gravity Forms to make a post, you can provision ACF fields but what I found was that the data wasn’t showing up correctly until I manually went and updated the created post. I tried using the WordPress wp_update_post() function but found that didn’t do it. I ended up taking a look at the post_meta in the database directly.I use Sequel Pro. That’s something that I find myself doing more and more. When you can look directly at evidence, do that. Don’t assume. So what I saw was this . . . You can see that the base custom fields are there. The data is visible. Now I hit update and refreshed the database view and saw lots of new custom fields get generated. This data associates the human readable fields with the field keys that ACF creates. Note the underscores which prevent those fields from showing up in the backend of WP even if you have view custom fields selected. I feel like this has something to do with acf/save_post but couldn’t figure out how to make that work. When my knowledge fails,And many, many Google searches . . . I resort to force. First, I turned on the ability to see the field keys in ACF. It’s easy to miss and easy to forget that this […]